7-36
7.5 Communication Function: General-purpose Serial
Communication
7.5.1 General-purpose Serial Communication
Overview
• In general-purpose serial communication, data is sent and received over the COM ports to and from an
external device such as an image processing device or a bar code reader.
• Data is read from and written to an external device connected to the COM port by means of an FPΣ
program and the FPΣ data registers.
Outline of operation
To send data to and receive it from an external device using the general-purpose serial communication
function, the data transmission and data reception functions described below are used. The F159
(MTRN) instruction and the “reception done” flag are used in these operations, to transfer data between
the FPΣ and an external device.
Sending data
Data to be transmitted from the PLC is stored in the data register used as the send buffer (DT). When
F159 (MTRN) is executed, the data is output from the COM port.
• The terminator specified in the system
register is automatically added to the data
that has been sent.
• The maximum volume of data that can be
sent is 2048 bytes.