10: U
SER
C
OMMUNICATION
I
NSTRUCTIONS
FC5A M
ICRO
S
MART
U
SER
’
S
M
ANUAL
FC9Y-B1268
10-19
the receive format. Only one instruction each of RXD1 through RXD7 without a start delimiter can be executed at a time.
If start inputs to two or more RXD instructions without a start delimiter are turned on simultaneously, one at the smallest
address is executed and the corresponding completion output is turned on.
Example:
(1) When a RXD instruction without a start delimiter is executed
****h
D100
When D100 is designated as the first data register
“0”
(30h)
“1”
(31h)
1st
character
“2”
(32h)
“3”
(33h)
Incoming Data
****h
D100+n
****h
D101
The incoming data is divided, converted, and stored to data registers according to the receive format.
(2) When RXD instructions with start delimiters STX (02h) and ENQ (05h) are executed
****h
D100
RXD Instruction 1
STX
(02h)
“1”
(31h)
“2”
(32h)
“3”
(33h)
Incoming Data
****h
D100+n
****h
D101
The incoming data is divided, converted, and stored to data registers according to the receive format.
Start delimiters are not stored to data registers.
ENQ
(05h)
“A”
(41h)
“B”
(42h)
“C”
(43h)
STX (02h)
When D100 is designated as the first data register
****h
D200
RXD Instruction 2
****h
D200+n
****h
D201
ENQ (05h)
When D200 is designated as the first data register
Compare
Multi-byte Start Delimiter (System program 200 or higher)
Multi-byte start delimiter is available on the CPU modules with system program version 200 or higher.
A start delimiter can be programmed at the first bytes 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.
A maximum of 5 consecutive constants that are either character or hexadecimal from the first byte of the receive format
are considered a multi-byte start delimiter.
If a RXD instruction with a start delimiter is executed and another RXD instruction with the same start delimiter is exe-
cuted, user communication error code 5 is stored in the data register designated as the receive status of the second RXD
instruction. When the error occurs, the second RXD instruction is canceled, and the first RXD instruction keeps executed.
If a multi-byte start delimiter is designated, and the incoming data does not match the entire multi-byte start delimiter,
the MicroSmart discards the incoming data and waits for the next communication.
When the first one byte is received, a timer is started to monitor the interval between incoming data even when a multi-
byte start delimiter is designated. If data is not received in the period specified for the receive timeout value after receiv-
ing one byte of data, a receive timeout error occurs, and user communication error code 11 is stored in the status data
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: [email protected]