RIO#
A RIO
object is returned from get_rio.
For example:
rio = get_rio(RIO44, 1)
input = rio:get_input(1)
output_state = rio:get_output(1)
Member functions#
The following are member functions of RIO
objects.
get_input#
get_input(inputNum)
Returns the state of the input with integer number inputNum
as a boolean if the input is set to Digital or Contact Closure, or an integer if the input is set to Analog.
For example:
rio = get_rio(RIO44, 3)
input = rio:get_input(1)
get_output#
get_output(outputNum)
Returns the state of the output with integer number outputNum
as a boolean.
For example:
rio = get_rio(RIO44, 2)
output_state = rio:get_output(1)
set_output#
set_output(outputNum, state)
Sets the output of a RIO to on or off according to the parameters:
Parameter |
Value Type |
Description |
Value Example |
---|---|---|---|
|
integer (1-8) |
Number of the RIO output to change the state of. Range depends on type of RIO. |
|
|
boolean or integer |
State to set the output to. Can be any of: |
|