Creating Programs For The Slave Station - Mitsubishi FX3U Series User Manual

Hide thumbs Also See for FX3U Series:
Table of Contents

Advertisement

FX
Series Programmable Controllers
3U
User's Manual - MODBUS Serial Communication Edition
Restart Communication with Slave 0x0A
M10
ADPRW
Command Complete Flag
M8029
Read/Write Multiple Registers from/to Slave 0x05
M20
ADPRW
Command Complete Flag
M8029
10.3

Creating Programs for the Slave Station

Create a program for the slave station with user defined MODBUS Device Address Assignment similar to the
example program in Section 9.4 of this manual.
98
H0A
H8
H1
H0FF00
RST
K90
MOVP
K150
MOVP
K27
MOVP
K31
MOVP
H5
H17
D10
RST
→ For more details on Master Station instructions, refer to Chapter 8.
Program for Restarting Communication
Slave Address: 0x0A
Command Code: 0x08
R0
Subcommand Code: 0x01
Subcommand Parameter: 0xFF00
(Reset Event Log)
Destination Device Head: R0
Communication is restarted between the
Master and Slave 0x0A, and the Slave
M10
Communication Event Log and Event and
Error Counter is reset.
Program for Reading/Writing Multiple Regtisters
D10
Command Parameters:
D11
D12
Slave Address: 0x05
Command Code: 0x17
Write Address: 90 (D10)
D13
Read Address: 150 (D11)
Write Count: 27 (D12)
Read Count: 31 (D13)
Source/Destination Device Head: D100
27 register device value starting at D100 of
D12
D100
the Master are written to MODBUS Address
90 and onward for Slave 5, and 31 register
device values starting at MODBUS Address
150 of Slave 5 are read to D127 and onward
for the Master.
M20
→ For cautions on program creation, refer to Section 10.4.
10 Creating Programs
10.3 Creating Programs for the Slave Station
D10 = 90
D11 = 150
D12 = 27
D13 = 31

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents