6 DATA COMMUNICATION USING THE NON PROCEDURE PROTOCOL
6.1.3 Sequence program for data reception
This section explains the sequence program for data reception.
For details on the INPUT instruction for data reception, see Chapter 9.
| X3 Read request |
|
|
|
|
|
|
|
|
|
|
|
| Create control data from D0 |
| (CH1 side) | ||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||||||||
| X4 |
| Abnormal |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||
|
| detection |
|
|
|
|
|
|
|
|
|
|
|
|
| G.INPUT |
| Un |
|
| D0 |
|
| D10 |
| M0 |
|
|
| |||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||
|
| M0 | M1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Processing for normal completion |
|
|
| |||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||||||||
|
|
|
|
|
| M1 |
|
|
|
|
|
|
|
|
|
| (receive data is stored) |
|
|
|
|
|
|
|
| |||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Processing for abnormal completion |
|
| |||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| (Reading and discarding received data, |
|
|
| ||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||||||||
|
|
|
|
|
|
|
|
|
|
| (CH1 side) | resent request, etc. |
|
|
|
|
|
|
|
|
|
|
|
| ||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||
Q series C24 ready signal | (X1E) |
| 1) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||||||||
Reception data read request | (X3) |
| 2) |
|
|
|
|
|
|
| 2) |
|
|
|
|
|
|
|
|
|
| |||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||||||||||||
signal |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
| ON during abnormal |
|
|
|
|
|
|
| ON during abnormal | |||||||||||
Reception abnormal detection | (X4) |
|
|
|
|
|
|
|
|
|
|
|
| |||||||||||||||||||
signal |
|
|
|
|
|
|
|
|
| reception detection |
|
|
|
|
|
|
| reception detection | ||||||||||||||
|
|
|
|
|
|
|
| 3) |
|
|
|
|
|
|
| 3) |
|
|
|
|
|
|
|
|
| |||||||
INPUT instruction |
|
|
|
|
|
|
|
| INPUT |
|
|
|
|
| INPUT |
|
| |||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||||||
INPUT instruction complete |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||||||
(M0) |
|
|
|
|
|
|
| 4) |
|
|
|
|
|
| 4) |
|
| |||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||||||||||||||
device |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||
INPUT instruction complete | (M1) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||||
device +1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||
(Normal completion/abnormal completion) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 scan | |||||||||
Received data count storage area |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||||||
| m |
| n |
|
|
|
|
|
| 1 |
|
| ||||||||||||||||||||
(Buffer memory address: 600H) |
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||
Received data storage area |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||
|
|
|
|
|
|
|
|
|
|
| Receive data 1 |
|
|
|
|
|
|
|
|
|
| Receive data 2 | ||||||||||
(Buffer memory address: 601H to) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||||||
|
|
|
|
| Data reception |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||||||
|
|
|
|
|
|
|
|
|
|
| Data |
| Data |
|
|
|
|
|
|
|
|
1)Start the
The values specified with GX Developer are stored in the Q series C24.
2)When the amount of data specified by the received data count or data containing the receive complete code is received from the external device, the reception data read request signal turns ON.
3)After the control data for the INPUT instruction is stored in the device, the sequence program executes the INPUT instruction and reads the receive data.
6 - 11 | 6 - 11 |