NAiS FP Series User Manual page 176

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

Advertisement

FPΣ
Sample program for data transmission
This program transmits the character "ABCDEFGH" to external device using COM.1
port.
R0
DF
R10
F95 ASC , M ABCDEFGH
R10
F159MTRN ,DT 100
Starting from DT100
the contents of 8 bytes
are sent from the COM.1 (K1) port.
Figure 170: FPΣ Sample program for data transmission
The program described above is executed in the following sequence.
(1) "ABCDEFGH" is converted to an ASCII code and stored in a data register.
(2) That data is sent from the COM. 1 port using the F159 (MTRN) instruction.
Explanatory diagram
The character is converted to ASCII code
and the data is stored in transmission buffer.
"H4142434445464748"
"ABCDEFGH"
Figure 171: FPΣ Data transmission explanatory diagram
Explanation of data table
This is used as a data table for transmission, starting at the data register specified in
"S".
S
S+1
2
1
4
3
S+2
S+n
Figure 172: FPΣ Data table for transmission
Use an F0(MV) or F95(ASC) instruction to write the data to be transmitted to the
transmission data storage area specified in "S".
9.2 Overview of Communication with External Devices
R10
, DT101
, K8
,K1
Data register (DT)
Transmission
buffer
FPΣ
At the beginning of transmission,
the number of bytes to be transmitted is set.
At the end of transmission, "0" is set.
Transmission data
storage area
The circled numbers indicate the order of
transmission.
Data transmission command
The internal relay "R10" is turned on at the tim-
ing of the transmission condition "R0".
Data conversion
The character "ABCDEFGH" is converted to an
ASCII code, and written to DT101 to DT104.
Data transmission
The data in the transmission buffer is sent from
the COM. 1 port.
Data transmission using
F159 (MTRN) instruction
Device with
RS232C port
9 - 9

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fps seriesFpg-c32tFpg-c32t2Fpg-c24r2

Table of Contents