IDEC FC4A-C10R2 User Manual page 301

Fc4a series microsmart micro programmable logic controller
Table of Contents

Advertisement

Example 2: BCC is calculated for the first byte through the sixth byte using the ADD format, converted in binary to
ASCII, and compared with the BCC code appended to the seventh and eighth bytes of the incoming data.
Incoming Data
"1"
"2"
(31h)
(32h)
BCC Calculation Range
BCC Calculation Result
31h + 32h + 33h + 34h + 35h + 36h = 135h
Receive Completion Output
Designate an output, Q0 through Q107, or internal relay, M0 through M1277, as an operand for the receive completion
output.
When the start input for a RXD instruction is turned on, preparation for receiving data is initiated, followed by data con-
version and storage. When a sequence of all data receive operation is complete, the designated output or internal relay is
turned on.
Conditions for Completion of Receiving Data
After starting to receive data, the RXD instruction can be completed in three ways:
• When an end delimiter is received (except when a BCC exists immediately after the end delimiter).
• When receive timeout occurs.
• When a specified byte count of data has been received.
Data receiving is completed when one of the above three conditions is met. To abort a RXD instruction, use the user com-
munication receive instruction cancel flag M8022 or M8023. See page 17-24.
Receive Status
Designate a data register, D0 through D1298 or D2000 through D7998, as an operand to store the receive status informa-
tion including a receive status code and a user communication error code.
Receive Status Code
Receive
Status Code
16
Preparing data receive
32
Receiving data
48
Data receive complete
64
Receive instruction complete
User communication receive
128
instruction cancel flag active
If the receive status code is other than shown above, an error of receive instruction is suspected. See User Communication
Error Code on page 17-27.
"3"
"4"
"5"
"6"
"0"
(33h)
(34h)
(35h)
(36h)
(30h)
Binary to ASCII Conversion
"3"
(33h)
Status
« FC4A M
17: U
"7"
(37h)
BCC
Comparison result is false.
Error code 9 is stored in the receive
status data register.
"5"
(35h)
From turning on the start input for a RXD instruction to read the
receive format, until the RXD instruction is enabled by an END pro-
cessing
From enabling the RXD instruction by an END processing, until incom-
ing data is received
From receiving incoming data, until the received data is converted and
stored in data registers according to the receive format
All data receive operation is completed and the next data receive is
made possible
RXD instructions are cancelled by special internal relay M8022 or
M8023
S
U
'
M
ICRO
MART
SER
S
ANUAL
C
SER
OMMUNICATION
Description
»
I
NSTRUCTIONS
17-23

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents