9.4.2 Contents of Received Data
When data are copied into a given data register, based on GPRECV instruction, the data are
saved in the following manner.
Example: The data “12345 CR” is transmitted from a device with RS-232C device.
● At the beginning of the data register, the No. of received bytes is saved.
● The received data are saved in ascending order from lower bytes to higher bytes, starting
with DT201.
● The received data that are copied based on the GPRECV instruction do not include a start
code or end code.
● It is also possible to receive binary data based on the GPRECV instruction. In this case, the
terminator should be specified using "Time".
9.4.3 Precautions on Receiving Data
■
Reset communication ports
● If a communication abnormality has occurred, communication ports can be reset by turning
on the "Request to reset" signal (Y10, Y11, Y12, Y13) by the user program.
● Once reset is completed, (X10, X11, X12, X13) turns ON. Subsequently, turn OFF the
"Request to reset" (Y10, Y11, Y12, Y13).
■
Procedure for repeated reception of data
For repeated reception of data, perform the following steps 1 to 4:
1. Receive data.
2. Turn on the "General-purpose communication reception done" flag (X0, X1, X2, X3).
3. Specify a port to receive data based on the UNITSEL instruction.
4. Execute the GPRECV instruction and read the received data from the reception buffer.
9.4 Receiving Operation
9-20 WUME-FP7COM-07