7DATA COMMUNICATION USING THE BIDIRECTIONAL PROTOCOL
7.1 Data Reception from the External Device
This section explains the data reception from the external device.
7.1.1 Receiving methods
The following shows how to receive data sent from the external device using the bidirectional protocol. Since the size of each message received is recognized using the "data length" information contained in the message, messages of any size can be sent from the external device.
| PLC CPU |
| Q series C24 |
|
|
|
|
|
|
|
|
|
| |||
| Sequence |
| Buffer memory |
|
|
|
|
|
|
|
|
| External | |||
|
|
|
|
|
|
|
|
|
|
|
|
| device | |||
| program |
|
|
|
|
|
|
|
|
|
|
|
| |||
|
| Receive area |
|
|
|
|
| |||||||||
|
|
|
|
|
|
|
|
|
|
|
| |||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||
2) |
| (When normal) | 1) |
| Arbitrary data |
|
|
|
|
| ||||||
|
|
| Read request |
|
|
|
|
|
|
|
|
| ||||
|
|
|
|
|
|
|
| ENQ | Data length Data area | Sum check code | ||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
| (When abnormal) (00H to FFH) |
|
|
|
|
| |||
|
|
|
|
|
|
|
|
|
|
|
| |||||
3) |
|
|
|
|
|
|
|
|
| 2) | ||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||
Read |
|
|
|
| Ignored |
|
|
|
|
|
| |||||
|
|
|
|
|
|
|
|
| ||||||||
(BIDIN |
|
|
|
|
|
|
| Error code | NAK |
| ||||||
|
|
|
|
|
|
|
| |||||||||
instructions) |
|
|
|
|
|
|
|
|
|
|
|
|
| |||
|
|
|
|
|
|
|
|
|
|
|
|
| ||||
|
|
| Arbirary data |
|
|
|
|
|
|
|
|
|
| 4) | ||
|
|
|
|
|
|
|
|
|
|
|
| |||||
|
|
| (00H to FFH) |
|
|
|
|
|
|
|
|
|
| ACK |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7
Contents | CH1/CH2 |
|
|
|
| Control Timing | |||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Reception data read request signal | X3/XA |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||
|
|
|
|
|
|
|
|
|
|
|
|
| |
BIDIN instruction completion device |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
BIDIN instruction |
|
|
|
|
|
|
|
| |||||
|
|
|
|
| BIDIN |
|
|
|
| ||||
|
|
|
|
| |||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 - 2 | 7 - 2 |