Receiving data from external devices
Data input from the COM port is stored in the
receive buffer specified by the system register,
and the “reception done” flag goes on. If the
“reception done” flag is off, data can be received
at any time.
Data table for reception (receive buffer)
This is the state when the above program is executed.
•
DT200 to DT204 are used as the receive
buffer. System register settings are as follows:
- System register 416: K200
- System register 417: K5
Sample program for receiving data
10-byte data received in the receive buffer through COM1 port are copied to DT0.
The program described above is executed in the following sequence.
1) The data sent from external devices is stored in the receive buffer.
2) The “reception done” contact R9038 (R9048) is turned on.
3) The received data is sent from the receive buffer to the area starting with data register DT0.
4) The F159 (MTRN) instruction is executed with no data to reset the buffer writing point and to turn off
the reception done” contact R9038 (R9048). The system is now ready to receive the next data.
(The data in the receive buffer is not cleared.)
Note:
•
Be aware that the “reception done” flag R9038 or R9048 changes even while a scan is in progress
(e.g., if the “reception done” flag is used multiple times as an input condition, there is a possibility of
different statuses existing within the same scan.) To prevent multiple read access to the special internal
relay you should generate a copy of it at the beginning of the program.
Explanatory diagram
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: [email protected]
Summary of Contents for AFPX-C30R
Page 6: ...Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Page 12: ...Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Page 28: ...Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Page 54: ...Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Page 102: ...Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Page 295: ...Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Page 300: ...Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Page 309: ...Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Page 311: ...Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Page 314: ...Program Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Page 347: ...Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Page 352: ...Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Page 361: ...Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Page 363: ...Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Page 366: ...Program Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Page 384: ...Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Page 398: ...Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Page 410: ...Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Page 430: ...Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Page 448: ...Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Page 543: ...17 7 ASCII Codes Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...