Communication with External Devices
FP2 Serial Data Unit
4
−
19
4.4
Sample Program
Notes
•
Contents of the response:
If K100 is stored in DT0 and K200 is stored in DT1 of the FP
series PLC on the other side, “%01$RD6400C800F1C
R
” is
returned from the FP series PLC on the other side as the
response when the program is executed. The received data is
stored in the data registers as shown below.
DT0
H25
(%)
H30
(0)
H31
(1)
H24
($)
H52
(R)
H44
(D)
DT1
DT2
DT3
H36
(6)
H34
(4)
H30
(0)
H30
(0)
H0D
(C
R
)
DT4
DT8
H31
DT7
H30
(0)
H30
(0)
DT6
H43
(C)
H38
(8)
DT5
Upper
byte
Lower
byte
Upper
byte
Lower
byte
Upper
byte
Lower
byte
Upper
byte
Lower
byte
Upper
byte
Lower
byte
Upper
byte
Lower
byte
Upper
byte
Lower
byte
Upper
byte
Lower
byte
Upper
byte
Lower
byte
Value of DT0 in the PLC on the other side
H46
Value of DT1 in the PLC
on the other side
(F)
(1)
BCC
•
Extracting the data register values from the PLC on the other
side
In the program, the data segment of the response from the PLC
on the other side is converted to hexadecimal data using the
F72 (AHEX) (hexadecimal ASCII
∋
HEX conversion) instruction
and stored in DT50 and DT51, only if the character “$1” stored
in DT1 detected as a comparison instruction.
DT3
H36
(6)
H34
(4)
H30
(0)
H30
(0)
DT4
H30
(0)
H30
(0)
DT6
H43
(C)
H38
(8)
DT5
16 Hexadecimal ASCII
∋
DT50
H64
(K100)
H00
HC8
(K200)
H00
DT51
Value of DT1 in the PLC
on the other side
Value of DT0 in the PLC
on the other side
Value of DT1 in the
PLC on the other side
Upper
byte
Lower
byte
Upper
byte
Lower
byte
Upper
byte
Lower
byte
Upper
byte
Lower
byte
Upper
byte
Lower
byte
Upper
byte
Lower
byte
Value of DT0 in the
PLC on the other side
HEX conversion
If an error occurs, “%01! O O
ϕ ϕ
C
R
” is returned as the
response. (O O is the error code and
ϕ ϕ
is the BCC.)
Summary of Contents for FP2 Series
Page 1: ......
Page 6: ...FP2 Serial Data Unit Table of Contents iv ...
Page 18: ...FP2 Serial Data Unit Functions of Serial Data Unit 1 2 ...
Page 22: ...FP2 Serial Data Unit Functions of Serial Data Unit 1 6 1 3 Restrictions on Units Combination ...
Page 24: ...FP2 Serial Data Unit Parts and Functions 2 2 ...
Page 30: ...FP2 Serial Data Unit Confirming the Unit Settings and Design Contents 3 2 ...
Page 44: ...FP2 Serial Data Unit Communication with External Devices 4 2 ...
Page 66: ...FP2 Serial Data Unit Precautions Regarding Serial Data Unit Operation and Programs 5 2 ...
Page 72: ...FP2 Serial Data Unit Operation If an Error Occurs 6 2 ...
Page 78: ...FP2 Serial Data Unit Specifications 7 2 ...
Page 86: ...FP2 Serial Data Unit Specifications 7 10 7 4 Transmission Format ...
Page 88: ...FP2 Serial Data Unit Sample Programs 8 2 ...
Page 98: ...FP2 Serial Data Unit Sample Programs 8 12 8 2 Table of ASCII Codes ...
Page 100: ...Record of changes FP2 Serial Data Unit R 2 ...
Page 101: ......
Page 102: ......