Receiving Data From Target Device; Receiving Methods - Mitsubishi Electric MELSEC iQ-R Series User Manual

Serial communication module
Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

4.1

Receiving Data from Target Device

This section explains the data reception from a target device.

Receiving methods

The following shows how to receive data sent from the target device using the bidirectional protocol.
Since the size of each message to be received is recognized using the "data length" information contained in the message,
messages of any size can be sent from the target device.
CPU module
Program
Ó
Read request
Ô
Read
(BIDIN instructions)
Arbitrary data
(00H to FFH)
Contents
Reception data read request
BIDIN instruction completion device
BIDIN instruction
When the control code ENQ is received, C24 starts data reception processing.
When data portion for the data length is received, C24 ends the reception processing of arbitrary data portion.
• When sum check code is enabled in the transmission setting of Engineering tool, C24 checks whether the message is
normal or abnormal using the sum check code received immediately after the message and the sum check code calculated
by internal processing.
• When sum check code is disabled in the transmission setting of Engineering tool, messages are not checked using the sum
check codes.
 When the message has normally been received, the 'CH reception data read request' (X3/XA) turns ON.
• If an error has been detected when receiving the message, C24 transmits an abnormal completion response message
(NAK message) to the target device.
• The reception data read request will not be sent to the CPU module. (The 'CH reception abnormal detection' (X4/XB)
does not turn ON.)
 C24 stores the control data in the device designated with the BIDIN instruction, and then executes the BIDIN instruction.
• Received data is read from the receive area in the buffer memory.
 When the BIDIN instruction has been executed, C24 transmits a normal completion response (ACK message) to the target
device.
C24
Buffer memory
Reception area
Ò
(When normal)
ENQ
Data length
(When abnormal)
Ignored
CH1/CH2
X3/XA
4 DATA COMMUNICATION USING BIDIRECTIONAL PROTOCOL
Arbitrary data
Sum check code
Data area
(00H to FFH)
Error code
NAK
ACK
Control Timing
BIDIN
4.1 Receiving Data from Target Device
4
Target device
Ó
Õ
87

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents