NAiS FP Series User Manual page 172

Applicable plc
Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

FPΣ
9.1.2
Program of General - purpose Serial Communication
The F159 (MTRN) instruction is used to send and receive data using the COM. port. The
F159 (MTRN) instruction is used only with the FPΣ, and is an updated version of the
earlier F144 (TRNS) instruction that allows multiple communication ports to be
accommodated. Please be aware that the earlier F144 (TRNS) instruction cannot be
used with the FPΣ.
F159 (MTRN) instruction
Data is sent to and received from an external device through the specified COM. port.
R0
F159 MTRN , DT 100
Starting from DT100
the contents of 8 bytes
Devices that can be specified for S
Devices that can be specified by n
Devices that can be specified by D
Figure 165: FPΣ F159 (MTRN) instruction (program)
Transmission of data
The amount of data specified by "n" is sent to the external device from among the data
stored in the data table starting with the area specified by "S", through the COM. port
specified by "D". Data can be sent with the start code and end code automatically
attached. A maximum of 2,048 bytes can be sent. When the above program is run, the
eight bytes of data contained in DT101 to DT104, stored in the transmission buffer
starting from DT100, are sent from the COM. 1 port.
Reception of data
Reception of data is controlled by turning the reception done flag "R9038 or R9048" on
and off. The received data is stored in the received buffer specified by the system
register. Data can be received when the F159 (MTRN) instruction turns the reception
done flag "R9038 or R9048" off.
S
n
D
, K8
, K1
are sent from the COM.1 (K1) port.
. . . . . . .
Only data registers (DT) can be specified as the
transmission buffer.
. . . . . . . .
WX, WY, WR, WL, SV, EV, DT, LD, I (I0 to ID), K, H
. . . . . . .
Only the K constants (only K1 and K2)
9.1 General - purpose Serial Communication
Serial data communication
9 - 5

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fps seriesFpg-c32tFpg-c32t2Fpg-c24r2

Table of Contents