FP
Σ
9.2 Overview of Communication with External Devices
9 - 9
Sample program for data transmission
This program transmits the character “ABCDEFGH” to external device using COM.1
port.
Data transmission command
The internal relay “R10” is turned on at the tim-
ing of the transmission condition “R0”.
are sent from the COM.1 (K1) port.
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.
Starting from DT100
the contents of 8 bytes
R10
R10
R0
R10
DF
F95 ASC , M ABCDEFGH , DT101
F159MTRN ,DT 100 , K8
,K1
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”
FP
Σ
Data register (DT)
Device with
RS232C port
Data transmission using
F159 (MTRN)
instruction
Transmission
buffer
“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”.
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”.
At the beginning of transmission,
the number of bytes to be transmitted is set.
At the end of transmission, “0” is set.
The circled numbers indicate the order of
transmission.
Transmission data
storage area
S
S+1
S+2
S+n
1
2
3
4
Summary of Contents for FP Series
Page 15: ...FP Functions and Restrictions of the Unit 1 2...
Page 25: ...FP Specifications and Functions of Control Unit 2 2...
Page 37: ...FP Expansion 3 2...
Page 44: ...Chapter 4 I O Allocation 4 1 I O Allocation 4 3...
Page 45: ...FP I O Allocation 4 2...
Page 51: ...FP Installation and Wiring 5 2...
Page 77: ...FP High speed Counter and Pulse Output Functions 6 2...
Page 133: ...FP High speed Counter and Pulse Output Functions 6 58...
Page 135: ...FP Communication Cassette 7 2...
Page 147: ...FP Communication Function 1 Computer Link 8 2...
Page 169: ...FP Communication Function 2 General purpose Serial Communication 9 2...
Page 205: ...FP Communication Function 2 General purpose Serial Communication 9 38...
Page 207: ...FP Communication Function 3 PLC Link Function 10 2...
Page 232: ...Chapter 11 Other Functions 11 1 Analog Potentiometer 11 3 11 2 Clock Calendar Function 11 4...
Page 233: ...FP Other Functions 11 2...
Page 239: ...FP Self Diagnostic and Troubleshooting 12 2...
Page 249: ...FP Self Diagnostic and Troubleshooting 12 12...
Page 251: ...FP Specifications 13 2...
Page 323: ...Index FP I 4...
Page 325: ...FP Record of changes R 2...