General-Purpose Communication
9-12
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.
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".
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).
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, 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.
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: [email protected]
Содержание AFP7CCM1
Страница 1: ...Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Страница 10: ...Table of Contents viii Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Страница 21: ...2 Names and Functions of Parts Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Страница 24: ...Names and Functions of Parts 2 4 Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Страница 25: ...3 Wiring the COM Port Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Страница 45: ...3 I O Allocation Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Страница 52: ...I O Allocation 4 8 Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Страница 57: ...6 PLC Link Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Страница 97: ...9 General Purpose Communication Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Страница 114: ...General Purpose Communication 9 18 Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Страница 115: ...4 Troubleshooting Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Страница 124: ...Troubleshooting 10 10 Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Страница 125: ...11 Specifications Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...