I am writing a macro to control a device. This device has an input pin to turn it on/off and an output pin to show its current state.
My macro needs to read an input pin to see if the device is running or not, and if it is not, pulses an output pin to turn the device on.
Pulsing the output pin is easy using exec.Setoutpin(port,pin); exec.Clroutpin(port,pin);
I can not find a similar function to return the state of an input pin. I know I can read the LED from the diagnostics page, but this is not as nice as specifying the port and pin.
Have I missed a function somewhere?