General-Purpose Communication
6.3.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.
DT203
Higher
byte
H35
H34
H33
H32
H31
Lower
byte
Higher
byte
Lower
byte
Higher
byte
Lower
byte
DT202
DT201
(5)
(4)
(3)
(2)
(1)
Received No. of bytes
DT200
Higher
byte
Lower
byte
H5
H0
H0D
(CR)
KEY POINTS
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".
6.3.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) by the user program.
Once reset is completed, (X10) turns ON. Subsequently, turn OFF the "Request to reset"
(Y10).
Reset CH1
of COM port
R100
Request to
reset an error
Request to
reset CH1
X10
CH1 error
reset done
Y10
(
)
DF
Y10
Request to
reset CH1
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).
(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.
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: [email protected]
Содержание AFP7CPS Series
Страница 1: ...Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Страница 15: ...2 Installation and Wiring Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Страница 19: ...3 I O Number Allocation Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Страница 42: ...Setting Communication Conditions Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Страница 51: ...6 General Purpose Communication Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Страница 66: ...General Purpose Communication Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Страница 67: ...7 Specifications Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Страница 78: ...Specifications Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...