Wiki source code of cRIO-OutputControl Commands
Last modified by Michael Sibayan on 2022/05/03 16:48
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | 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. | ||
| 2 | |||
| 3 | The format for commands sent to a cRIO is as follows: | ||
| 4 | Base_command,Parameter_1,Parameter_2,Parameter_3,Parameter_N | ||
| 5 | |||
| 6 | Base commands are: | ||
| 7 | |OPEN|Sets a channel to TRUE | ||
| 8 | |ON|Sets a channel to TRUE | ||
| 9 | |TRUE|Sets a channel to TRUE | ||
| 10 | |CLOSE|Sets a channel to FALSE | ||
| 11 | |OFF|Sets a channel to FALSE | ||
| 12 | |FALSE|Sets a channel to FALSE | ||
| 13 | |CLOSE-ALL|Sets all channels on all modules to FALSE | ||
| 14 | |SHUTDOWN|Sets all channels on all modules to FALSE | ||
| 15 | |FLUSH-QUEUE|Clears the scheduled event queue | ||
| 16 | |SCHEDULE|Creates a new scheduled event in the queue | ||
| 17 | |||
| 18 | __Parameters__ | ||
| 19 | OPEN/ON/TRUE/CLOSE/OFF/FALSE: | ||
| 20 | |Parameter 1|Module number|Integer representation of module number|Valid modules for an NI-9074 are 1, 2, 3, 4, 5, 6, 7, 8| | ||
| 21 | |Parameter 2|Channel number|Integer representation of channel number|Valid channels are module dependent (0-8, 0-16, 0-32)| | ||
| 22 | |||
| 23 | |||
| 24 | CLOSE-ALL/SHUTDOWN: | ||
| 25 | These commands have no parameters | ||
| 26 | |||
| 27 | |||
| 28 | FLUSH-QUEUE: | ||
| 29 | The flush queue command has no parameters | ||
| 30 | |||
| 31 | |||
| 32 | SCHEDULE: | ||
| 33 | |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| | ||
| 34 | |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| | ||
| 35 | |Parameter 3|Module number|Integer representation of module number|Valid modules for an NI-9074 are 1, 2, 3, 4, 5, 6, 7, 8| | ||
| 36 | |Parameter 4|Channel number|Integer representation of channel number|Valid channels for an NI-9074 are 0-32| | ||
| 37 | |||
| 38 | Some example commands are shown below: | ||
| 39 | |||
| 40 | {{box}} | ||
| 41 | FLUSH-QUEUE | ||
| 42 | OPEN,1,0 | ||
| 43 | CLOSE,3,16 | ||
| 44 | SCHEDULE,2014/10/31@22:00:00,OPEN,3,16 | ||
| 45 | SCHEDULE,2014/10/31@23:00:00,CLOSE,3,16 | ||
| 46 | {{/box}} | ||
| 47 | |||
| 48 | These commands will: | ||
| 49 | Clear the command queue | ||
| 50 | Open (set to true) channel 0 on module 1 immediately | ||
| 51 | Close (set to false) channel 16 on module 3 immediately | ||
| 52 | Create a scheduled event for Oct. 31, 2014 at 10:00 PM to open (set to true) channel 16 on module 3 | ||
| 53 | Create a scheduled event for Oct. 31, 2014 at 11:00 PM to close (set to false) channel 16 on module 3 |