17: USER COMMUNICATION INSTRUCTIONS
17-14 OPENNET CONTROLLER USER’S MANUAL
Selections and Operands in Receive Instruction Dialog Box
Receive Format
Receive format, designated by source operand S1, specifies data registers to store received data, data digits for storing
data, data conversion type, and repeat cycles. A start delimiter and an end delimiter can be included in the receive format to
discriminate valid incoming communication. When some characters in the received data are not needed, “skip” can be
used to ignore a specified number of characters. BCC code can also be appended to the receive format to verify the
received data. One RXD instruction can receive 200 bytes of data at the maximum.
S1 (Source 1)
Designating Data Register as S1
When a data register is designated as source operand S1, receive digits and conversion type must also be designated. The
received data is divided into a block of specified receive digits, converted in a specified conversion type, and stored to the
designated data register. Conversion types are available in ASCII to Binary, ASCII to BCD, and no conversion.
When repeat is designated, received data is divided, converted, and stored into data registers as many as the repeat cycles,
starting with the designated data register. Repeat cycles can be up to 99.
Receive Digits
The received data is divided into a block of specified receive digits before conversion as described below:
Example: Received data of 6 bytes are divided in different receive digits. (Repeat is also designated.)
(1) Receive digits = 2 (2) Receive digits = 3
Type
TXD Transmit instruction
RXD Receive instruction
Port
Port 1 Receive user communication through RS232C port 1 (RXD1)
Port 2 Receive user communication through RS232C port 2 (RXD2)
S1 Source 1
Enter the receive format in this area.
The receive format can include a start delimiter, data register to store incoming data, end
delimiter, BCC, and skip.
D1 Destination 1 Receive completion output can be an output or internal relay.
D2 Destination 2
Receive status register can be data register D0 through D7998.
The next data register stores the byte count of received data.
Receive
Format
Operand
Receive
Digits
(Bytes)
Conversion Type Repeat Calculation
Calculation
Start
Position
Skip
Bytes
Data Register D0-D7999
1-4
1-5
1-2
A: ASCII to Binary
B: ASCII to BCD
–: No conversion
1-99 ———
Start Delimiter 00h-FFh (7Fh) — No conversion ————
End Delimiter 00h-FFh (7Fh) — No conversion ————
BCC — 1-2
A: Binary to ASCII
–: No conversion
—
X: XOR
A: ADD
1-15 —
Skip ——— ———1-99
“1”
(31h)
“2”
(32h)
“3”
(33h)
“4”
(34h)
2 digits
“5”
(35h)
“6”
(36h)
2 digits
2 digits
1st block 2nd block 3rd block
“1”
(31h)
“2”
(32h)
“3”
(33h)
“4”
(34h)
3 digits
“5”
(35h)
“6”
(36h)
3 digits
1st block 2nd block
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: info@clrwtr.com