^25 - The Current Output Level Port
This port is a read only value of the current level of the specified output.
It reports a single specified output level.
The value is in hex with 0xFE as full.
Syntax
LDA ^25,x
Where x is the output number(base zero) you want the level of.
LDA ^25,0 will give the state of output 1.
LDA ^25,1 will give the state of output 2.
This port will report the current level not the target level so it may be misleading if a long fade hasn’t completed. Use port ^26,x the Target Output Level port if worried about this. |
Example
Master toggle button that checks the state of relays on the controller.
Task1()
{
LDA ^25,2 //Load the state of relay3
BNE TOGGLE_OFF //If on turn all lights off, if off keep checking
LDA ^25,3 //Load the state of relay4
BNE TOGGLE_OFF
LDA ^25,4 //Load the state of relay5
BNE TOGGLE_OFF
LDA ^25,5 //Load the state of relay6
BNE TOGGLE_OFF
LDA ^25,6 //Load the state of relay7
BNE TOGGLE_OFF
LDA ^25,7 //Load the state of relay8
BNE TOGGLE_OFF
LDA ^25,8 //Load the state of relay9
BNE TOGGLE_OFF
LDA ^25,9 //Load the state of relay10
BNE TOGGLE_OFF
LDA ^25,10 //Load the state of relay11
BNE TOGGLE_OFF
Preset(A=BedroomArea,P=1,F=0) //Turn on bedroom
Null
TOGGLE_OFF:
Preset(A=BLA,P=4,F=0) //Turn off everything
Null
}