Programming
88 NI Series WebConsole & Programming Guide
IR/Serial Send_Commands (Cont.)
Command Description
SET BAUD
Set the IR port's DATA mode
communication parameters.
Only valid if the port is in Data Mode (see SET MODE command).
Syntax:
SEND_COMMAND <DEV>,"'SET BAUD
<baud>,<parity>,<data>,<stop>'"
Variables:
baud = baud rates are: 19200, 9600, 4800, 2400, and 1200.
parity = N (none), O (odd), E (even), M (mark), S (space).
data = 7 or 8 data bits.
stop = 1 and 2 stop bits.
Example:
SEND_COMMAND IR_1,"'SET BAUD 9600,N,8,1'"
Sets the IR_1 port's communication parameters to 9600 baud, no parity, 8 data
bits, and 1 stop bit.
Note: The maximum baud rate for ports using SERIAL mode is 192000. Also,
SERIAL mode works best when using a short cable length (< 10 feet).
SET IO LINK
Link an IR or Serial port to a
selected I/O channel for use
with the 'DE', 'POD', 'PON',
and 'POF' commands.
The I/O status is automatically reported on channel 255 on the IR port. The I/O
channel is used for power sensing (via a PCS or VSS). A channel of zero
disables the I/O link.
Syntax:
SEND_COMMAND <DEV>,"'SET IO LINK <I/O number>'"
Variable:
I/O number = 1 - 8. Setting the I/O channel to 0 disables the I/O link.
Example:
SEND_COMMAND IR_1,"'SET IO LINK 1'"
Sets the IR_1 port link to I/O channel 1. The IR port uses the specified I/O input
as power status for processing 'PON' and 'POF' commands.
SET MODE
Set the IR/Serial ports for IR
or Serial-controlled devices.
Sets an IR port to either IR, Serial, or Data mode.
Syntax:
SEND_COMMAND <DEV>, 'SET MODE <mode>'"
Variable:
mode = IR, SERIAL, or DATA.
Example:
SEND_COMMAND IR_1,"'SET MODE IR'"
Sets the IR_1 port to IR mode for IR control.
Note: The maximum baud rate for ports using SERIAL mode is 192000. Also,
SERIAL mode works best when using a short cable length (< 10 feet).
SP
Generate a single IR pulse.
Use the 'CTON' to set pulse lengths and the 'CTOF' for time Off between
pulses.
Syntax:
SEND_COMMAND <DEV>,"'SP',<code>"
Variable:
code = IR code value 1 - 252 (253-255 reserved).
Example:
SEND_COMMAND IR_1, "'SP',25"
Pulses IR code 25 on IR_1 device.