7 DATA COMMUNICATIONS USING BIDIRECTIONAL PROTOCOL
7.2.3 Sequence program for data transmission
A sequence program for data transmission is explained below.
For details on the BIDOUT instruction for data transmission, see Chapter 9.
Transmission |
|
| (In case of the CH1 side) | ||
instruction |
|
| |||
|
|
| |||
|
|
| Create transmission data from D11 |
|
|
|
|
|
| ||
|
|
|
|
|
|
Create control data from D0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| G.BIDOUT | Un | D0 | D11 | M0 |
|
|
| ||
|
| M0 |
| M1 |
|
|
|
|
|
|
|
|
| |||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Processing for normal completion |
|
|
| ||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| M1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Processing for abnormal completion | |||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||||||
|
|
|
|
|
|
|
|
|
| 1) |
|
|
|
| (retransmission, etc.) |
|
|
| ||||||
Q series C24 ready signal | (X1E) |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||||
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||||||||
Transmission instruction |
|
|
| 2) |
|
|
|
|
|
|
|
|
|
|
|
| ||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||||||
BIDOUT instruction |
|
|
| 3) |
|
| BIDOUT |
|
|
|
|
|
| |||||||||||
|
|
|
|
|
|
|
|
| 4) |
|
|
|
|
| ||||||||||
BIDOUT instruction complete device |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ON when transmission | |||
BIDOUT instruction complete device + 1 |
|
|
|
|
|
|
|
|
|
|
| abnormal completion | ||||||||||||
(Normal completion/abnormal completion) |
|
|
|
|
|
|
|
|
|
|
|
| 1 scan | |||||||||||
Transmission data count designation area |
|
|
|
|
|
|
|
|
|
|
| |||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||||||
(buffer memory address: 400H) |
|
|
|
| 0 |
|
|
|
|
|
| n |
| |||||||||||
Transmission data storage area |
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||||||
|
|
|
|
|
|
|
|
|
|
|
| Transmission data |
| |||||||||||
(buffer memory address: 401H to) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||
|
|
|
|
| Data transmission |
|
| Receiving response | ||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 - 19 | 7 - 19 |