cRIO-OutputControl Commands
Commands are sent as comma delimited ASCII text. White space characters are removed but should be avoided. Multiple commands can be sent in a single transaction, and each command must be separated by <CR><LF> (0x0D & 0x0A HEX) characters.
The format for commands sent to a cRIO is as follows:
Base_command,Parameter_1,Parameter_2,Parameter_3,Parameter_N
Base commands are:
OPEN | Sets a channel to TRUE |
ON | Sets a channel to TRUE |
TRUE | Sets a channel to TRUE |
CLOSE | Sets a channel to FALSE |
OFF | Sets a channel to FALSE |
FALSE | Sets a channel to FALSE |
CLOSE-ALL | Sets all channels on all modules to FALSE |
SHUTDOWN | Sets all channels on all modules to FALSE |
FLUSH-QUEUE | Clears the scheduled event queue |
SCHEDULE | Creates a new scheduled event in the queue |
Parameters
OPEN/ON/TRUE/CLOSE/OFF/FALSE:
Parameter 1 | Module number | Integer representation of module number | Valid modules for an NI-9074 are 1, 2, 3, 4, 5, 6, 7, 8 | |
Parameter 2 | Channel number | Integer representation of channel number | Valid channels are module dependent (0-8, 0-16, 0-32) |
CLOSE-ALL/SHUTDOWN:
These commands have no parameters
FLUSH-QUEUE:
The flush queue command has no parameters
SCHEDULE:
Parameter 1 | Date-Time stamp | The date and time for the task to be executed | Format must be "YYYY/MM/DD@hh:mm:ss" in 24-hour format | |
Parameter 2 | Task command | The command to execute at the specified date + time | Valid commands are OPEN,ON,TRUE,CLOSE,OFF,FALSE,CLOSE-ALL,SHUTDOWN | |
Parameter 3 | Module number | Integer representation of module number | Valid modules for an NI-9074 are 1, 2, 3, 4, 5, 6, 7, 8 | |
Parameter 4 | Channel number | Integer representation of channel number | Valid channels for an NI-9074 are 0-32 |
Some example commands are shown below:
FLUSH-QUEUE
OPEN,1,0
CLOSE,3,16
SCHEDULE,2014/10/31@22:00:00,OPEN,3,16
SCHEDULE,2014/10/31@23:00:00,CLOSE,3,16
These commands will:
Clear the command queue
Open (set to true) channel 0 on module 1 immediately
Close (set to false) channel 16 on module 3 immediately
Create a scheduled event for Oct. 31, 2014 at 10:00 PM to open (set to true) channel 16 on module 3
Create a scheduled event for Oct. 31, 2014 at 11:00 PM to close (set to false) channel 16 on module 3