FP
Σ
Communication Function 2 General-purpose Serial Communication
9 - 26
Sample program
The following shows an example in which an FP series PLC is connected to the COM.
1 port.
R0
DF
R10
R10
F159 MTRN , DT 100
, K19
, K1
R9038
DF
, D201 , DT208
, DT0
R11
F10 BKMV
R11
R11
, DT 100
, K0
, K1
F159 MTRN
M 00001
**
, DT107
F95 ASC ,
M %01#RDD00000, DT101
F95 ASC ,
R11
=, DT1, H2431
DF
R12
, DT3
, DT50
F72 AHEX
, K8
R12
Transmission
Reception
Data transmission command
The internal relay “R10” is turned on at the
timing of the transmission condition “R0”.
Data conversion
“%01#RDD00000” is converted to ASCII
code, and written to DT101 to DT106.
“00001
**
” is converted to ASCII code, and
written to DT107 to DT112.
Data transmission
The data in the transmission buffer is sent
from the COM. 1 port
Reception done detection
The internal relay “R11” is turned on at the
reception done contact “R9038” timing.
Retrieving received data
The received data in the received buffer is
read from the area in which it is stored
(DT201 to ) and sent to DT0.
Preparing to receive the next data
To prepare to receive the next data, the
F159
instruction resets the buffer writing
point and turns off the reception done con-
tact “R9038”, based on the empty data.
Five spaces inserted
Check of received data
To determine whether the received data is
a normal response, the comparison in-
struction is used to check whether the
character string “1$” is stored in DT1.
Check of received data
The eight-character ASCII code beginning
with DT3 is converted to a hexadecimal
value and stored in DT50 and DT51.
With DT100 as the transmission buffer
the contents consisting of 19 bytes of it
are sent from COM. 1 (K1) port.
Starting from DT100
the contents consisting of 0 bytes
are sent from the COM. 1 (K1) port.
The contents of 8 words from DT201 to DT208
are written to data registers DT0 to DT7.
Figure 191: FP
Σ
Sample program (for FP series PLC)
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...