Working with LIOs/SLIOs and SS8/SSP8 Panel

Working with LIOs/SLIOs and SS8/SSP8 Panel

If you read the online help documentation, it talks about the LIO setup in the Device Map.
lio_set, lio_get etc refer to the SLIOs set up in the LIO section of the device map (it's labeled LIO Map but they are SLIOs) on the Device Properties tab:



Physical LIOs (and other SLIOs)

To control a physical LIO you need to use the commands set_lio and get_lio (to read current status if needed). They need the parameters mentioned in the SS8 help file. These commands do NOT refer to the SLIOs in the device map and can be used with physical OR soft LIOs (see below). 
get_lio

Prototype: var get_lio (blade, card, circuit)

set_lio

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:
get_lio_soft

Prototype: var get_lio_soft (blade, slio)

set_lio_soft

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) 


}