NetLinx Programming
94
NX-Series Controllers - WebConsole & Programming Guide
IR/Serial SEND_COMMANDs (Cont.)
Command Description
CP Halt and clear all active or buffered IR commands, and then send a single IR pulse.
Set the Pulse and Wait times with the 'CTON' and 'CTOF' commands.
Syntax:
SEND_COMMAND <DEV>,"'CP',<code>"
Variable:
code = IR port's channel value 0 - 252 (253 - 255 reserved).
Example:
SEND_COMMAND IR_1,"'CP',2"
Clears the active/buffered commands and pulses IR_1 port's channel 2.
CTOF Set the duration of the Off time (no signal) between IR pulses for channel and IR function transmissions. Off time
settings are stored in non-volatile memory. This command sets the delay time between pulses generated by the 'CH' or
'XCH' send commands in tenths of seconds.
Syntax:
SEND_COMMAND <DEV>,"'CTOF',<time>"
Variable:
time = 0 - 255. Given in 1/10ths of a second. Default is 5 (0.5 seconds).
Example:
SEND_COMMAND IR_1,"'CTOF',10"
Sets the off time between each IR pulse to 1 second.
CTON Set the total time of IR pulses transmitted and is stored in non-volatile memory. This command sets the pulse length for
each pulse generated by the 'CH' or 'XCH' send commands in tenths of seconds.
Syntax:
SEND_COMMAND <DEV>,"'CTON',<time>"
Variable:
time = 0 - 255. Given in 1/10ths of a second. Default is 5 (0.5 seconds).
Example:
SEND_COMMAND IR_1,"'CTON',20"
Sets the IR pulse duration to 2 seconds.
GET BAUD Get the IR port’s current DATA mode communication parameters. The port sends the parameters to the device that
requested the information. Only valid if the port is in Data Mode (see SET MODE command).
Syntax:
SEND_COMMAND <DEV>,"'GET BAUD'"
The port responds with:
<port #> <baud>,<parity>,<data bits>,<stop bits>
Example:
SEND_COMMAND IR_1,"'GET BAUD'"
System response example:
PORT 11,9600,N,8,1
GET FAULT Check the activation status of fault detection on the port.
Syntax:
SEND_COMMAND <DEV>, "'GET FAULT'"
Example:
SEND_COMMAND IR_1,"'GET FAULT'"
Responds with a COMMAND event: DISABLED, NONE, SHORT, or NO DEVICE.
GET MODE Poll the IR/Serial port's configuration parameters and report the active mode settings to the device requesting the
information.
Syntax:
SEND_COMMAND <DEV>,"'GET MODE'"
The port responds with:
<port #> <mode>,<carrier>,<io link channel>
Example:
SEND_COMMAND IR_1,"'GET MODE'"
The system could respond with:
PORT 4 IR,CARRIER,IO LINK 0
GET STATUS Check the fault detection status of the port.
Syntax:
SEND_COMMAND <DEV>, "'GET STATUS'"
Example:
SEND_COMMAND IR_1,"'GET STATUS'"
Responds with a COMMAND event: STATUS: NORMAL or STATUS: FAULT.