IDEC FC6A-C16K1CE Communications Manual page 93

Fc6a series microsmart all-in-one type
Hide thumbs Also See for FC6A-C16K1CE:
Table of Contents

Advertisement

(3) When a RXD instruction with end delimiter ETX (03h) and one-byte BCC is executed
Incoming Data
"1"
"2"
(31h)
(32h)
End Delimiter
End of receiving data
The incoming data is divided, converted, and stored to data registers according to the receive format.
The end delimiter and BCC code are not stored to data registers.
After receiving the end delimiter, the FC6A Series MicroSmart receives only the one-byte BCC code.
Constant for Verification
Constants excluding start and end delimiters can be configured in the receive format to verify the incoming data with the
constants, which are either characters or hexadecimal values. As many constants can be configured for the verification as required.
The verification result is stored in the receive status of the RXD instruction.
Example: Programming Constant for Verification
The following example shows the advantage of using constant for verification. The incoming data contains a constant value "1" in
the middle, and that constant value needs to be verified to see whether the incoming data is valid.
Using Data Register
The incoming data including the constant value needs to be stored in data registers. When the RXD instruction completes receiving
the incoming data, the receive status contains 64, meaning the RXD instruction has completed without errors, even if the constant
value is not an expected value. Extra ladder programming is needed to see whether the constant value in the incoming data is
correct or not.
STX
(02h) (3xh)
(3xh)
Start
Stored to D1 through D5
Delimiter
Using Constant for Verification
A constant to verify the constant value in the incoming data is designated in the receive format. If the constant value is not an
expected value when the RXD instruction completes receiving the incoming data, the receive status contains 74, meaning the RXD
instruction has completed but user communication error code 5 occurred. No extra ladder programming is needed to see whether
the constant value in the received data is correct or not.
STX
(02h) (3xh)
(3xh)
Start
Delimiter
Note: When configuring constants, which are either characters or hexadecimal values, in the receive format, and the incoming data does not match
the constants in the receive format, then a user communication error code is stored in the receive status. The error code contained in the receive
status depends on whether the constants are used as a start delimiter or as constants for verification. If used as a start delimiter, user
communication error code 7 is stored in the receive status, and the RXD instruction keeps waiting for valid incoming data. On the other hand, if used
as constants for verification, the receive status contains 74, and the RXD instruction finishes the execution. To repeat receiving incoming
communication, turn on the input for the RXD instruction.
When D100 is designated
as the first data register
ETX
BCC
(03h)
Code
"1"
CR
(31h) (3xh) (3xh)
(13h)
End
Delimiter
"1"
CR
(31h) (3xh) (3xh)
(13h)
Constant
End
Delimiter
Stored to D3 and D4
Stored to D1 and D2
FC6A S
M
S
A
ERIES
ICRO
MART
LL
5: U
-
-O
T
C
IN
NE
YPE
OMMUNICATION
C
SER
OMMUNICATION
**** h
D100
**** h
D101
D100+n
**** h
M
FC9Y-B1730
ANUAL
I
NSTRUCTIONS
5-17

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents