10: U
SER
C
OMMUNICATION
I
NSTRUCTIONS
10-18
FC5A M
ICRO
S
MART
U
SER
’
S
M
ANUAL
FC9Y-B1268
Repeat Cycles
When a data register is designated to repeat, the received data is divided and converted in the same way as specified, and the con-
verted data is stored to consecutive data registers as many as the repeat cycles.
Example:
Received data of 6 bytes is divided into 2-digit blocks, converted in ASCII to Binary, and stored to data registers
starting at D20.
(1) Repeat cycles = 2
0012h
D20
Repeat 1
0034h
D21
ASCII to Binary conversion
Repeat 2
“1”
(31h)
“2”
(32h)
2 digits
1st block
“3”
(33h)
“4”
(34h)
2 digits
2nd block
(2) Repeat cycles = 3
0012h
D20
Repeat 1
0034h
D21
ASCII to Binary conversion
Repeat 2
“1”
(31h)
“2”
(32h)
2 digits
1st block
“3”
(33h)
“4”
(34h)
2 digits
2nd block
“5”
(35h)
“6”
(36h)
2 digits
3rd block
0056h
D22
Repeat 3
Delimiter (System program 200 or higher)
A delimiter for the data register in the receive format can be designated. Using a delimiter, incoming data of variable
length can be received and stored to data registers.
Delimiter
How the incoming data is stored to data registers
Designated
The incoming data is stored to data registers until all the data specified with receive digits, conversion type,
and repeat is processed or the specified delimiter is received.
No delimiter
The incoming data is stored to data registers until all the data specified with receive digits, conversion type,
and repeat is processed.
Note:
Delimiters for data registers can be used in the receive format of RXD instructions only.
Delimiters can be used only when using CPU modules with system program version 200 or higher and WindLDR 5.2 or
higher, and can be selected from one-byte Hex values or ASCII characters.
Designating Constant as Start Delimiter
A start delimiter can be programmed at the first byte in the receive format of a RXD instruction; the MicroSmart will rec-
ognize the beginning of valid communication, although a RXD instruction without a start delimiter can also be executed.
When a constant value is designated at the first byte of source device S1, the one-byte data serves as a start delimiter to
start the processing of the received data.
A maximum of five instructions each of RXD1 through RXD7 with different start delimiters can be executed at the same
time. When the first byte of the incoming data matches the start delimiter of a RXD instruction, the received data is pro-
cessed and stored according to the receive format specified in the RXD instruction. If the first byte of the incoming data
does not match the start delimiter of any RXD instruction that is executed, the MicroSmart discards the incoming data
and waits for the next communication.
While a RXD instruction without a start delimiter is executed, any incoming data is processed continuously according to
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: [email protected]