
Programmable Serial Controller
17
3.23 RS232 Command Summary
The HR-4P uses a simple command protocol that can be used by other software in order
to control and/or configure the unit.
•
The unit uses a baud rate of 19200, 8 Data bits, 1 Stop bit and No Parity for all
communications and from the device when it is
RUN MODE
(Power Led is
NOT blinking)
•
The HR-4P supports both a short and long command format style.
•
Long command format have the sequence
HRTxx
before the actual
command.
o
The
xx
is a numeric value from 00 to 99 which sets the units
address
o
All HR-4P units will listen to address 00 (for example
HRT00VER?
)
o
Only units with the correct address that matches the
xx
address
value will respond or execute the commands received.
•
Short command format uses only the command portion listed in the table
•
<cr><lf> in the table below denote the CARRIAGE RETURN (0x0D) and
LINEFEED (0x0A) Characters
•
Each command is terminated by a single CARRIAGE RETURN <cr>
Command
Function
Response
VER?<cr>
Read Firmware version
Version x.y<cr><lf> where X.Y is the
firmware version
ADR?<cr>
Read Address of Unit
Device address = nn<cr><lf>
ADnn<cr>
Set an address of the unit to nn
nn = 00 to 99
Set device address (01-99)nn<cr><lf>
CLnm<cr>
Configure I/O line n to m
n = 1 to 4
m = 1 : 2 : 3 : ? = contact input :
voltage input : output : status
Nothing except Status Reads return:
CLX1 = I/O line X configured as contact
type input<cr><lf>
CLX2 = I/O line X configured as voltage
type input<cr><lf>
CLX3 = I/O line X configured as
output<cr><lf>
IOnm<cr>
Set or Read State of I/O line n to m
n = 1 to 4 = output
m = 0 : 1 : ? = low : high : status
Input X = 1 or 0<cr><lf>
Output X = 1 or 0<cr><lf>
TOGn<cr>
Toggle the state of I/O line n
n = 1 to 4
Input X = 1 or 0<cr><lf>
Output X = 1 or 0<cr><lf>
IRCn<cr>
Set or inquire IR
n = 0 : 1 : ? = input : output : status
IRC0 = IR configured as Rxd<cr><lf>
IRC1 = IR configured as Txd<cr><lf>
IRSn,m<cr> Send IR code stored in 1 of 32 IR memory
locations
n = 6 (Learned IR)
m = 1 – 32 (Memory Location)
Nothing