User`s manual
101
FX3U Series Programmable Controllers
User’s Manual - MODBUS Serial Communication Edition
11 Practical Program Examples
11.1 Setting Program for Master Station
11
Practical
Program
Examples
12
Troubleshooting
M2
ADPRW
M8029
H4 H0F K32 K16 X000
CALL P0
RST M2
M8402
SET M3
M1
ADPRW
M8029
H4 H3 K10 K5 D20
CALL P0
RST M1
M8402
SET M2
M3
ADPRW
M8029
H4 H10 K0 K4 D1000
CALL P0
RST M3
M8402
FEND
M8000
SRET
MOV
D8402 D4000
MOV
D8403 D4001
MOV
D8404 D4002
P0
Read Holding Registers Command
Command Complete Processing
When Error Flag is ON, call Error Handing
Routine
Reset Read Holding Registers Command
Set Next Command in Sequence
Write Coils Command
Command Complete Processing
When Error Flag is ON, call Error Handing
Routine
Reset Write Coil Command
Set Next Command in Sequence
Write Registers Command
Command Complete Processing
When Error Flag is ON, call Error Handing
Routine
Reset Write Registers Command
End MODBUS Command Sequence
Error Processing Routine
Store MODBUS Error Code to D4000
Store MODBUS Error Details to D4001
Store MODBUS Error Step # to D4002
End Error Processing Routine