Prototype: var get_lio (blade, card, circuit)
Prototype: set_lio (blade, card, circuit, val)
Use the table below to figure out what to use for "circuit" in the above commands (blade is the slot for the blade you're using in the device map, card is almost always a zero, val is 1 for on, 0 for off of course):
LIO # | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
LIO Port 1 | 2 | 3 | 4 | 5 | 6 | 7 | X | X | X | X | X | X |
LIO Port 2 | X | X | X | X | X | X | 2 | 3 | 4 | 5 | 6 | 7 |
Script Index | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
You can also use these commands in your code rather than using the built-in lio_set and lio_get if you want. Those commands make it possible for the wizard to set up certain functions for you, but if you're coding anyway, you may prefer to use the following for SLIO control:
Prototype: var get_lio_soft (blade, slio)
Prototype: set_lio_soft (blade, slio, val)
The blade mentioned in all of the above commands is from the Blade section of the device map for your script. You don't use the LIO device map for these command.
Set the button you want to use to None/Custom in the wizard and
use some code along these lines:
action:
BTN_1_PRESS {
btn_led (1, 1)
set_lio (1,0,1,1) //For Blade 1, card 0 (almost always 0)
pin # (runs 0-11 for LIOs 1-6
and 7-12
//on the blade), and the last number is a 1
or zero for the value
}
To set the LIO back to off use:
action:
BTN_1_RELEASE {
btn_led (1, 0)
set_lio (1,0,1,0)
}