GW-7552 (Modbus RTU Master)
Example for SIMATIC STEP 7
• Before connecting
• Example 1:Reads and Writes DO module data
• Example 2:Reads DI module data
• Example 3:Reads and Writes AO module data
• Example 4:Reads AI module data
Before connecting
Set the parameters of device as shown as below
SIMATIC PLC Comport Settings:
* PROFIBUS Device 0(Master) • Baud rate:115200
• Data bit: 8
• Stop bit : 1
• Parity: None
• Byte order: Big Endian
• Output Data Mode: Auto
GW-7552
• PROFIBUS Device 2 (Slave)
• Modbus Device (RTU Master)
Before connecting
Add a profibus master system and a profibus slave (GW-7552)
Before connecting
Set the address of PLC in profibus as below
SIMATIC PLC
* PROFIBUS Device 0 (Master)
1.Double Click DP icon
2.Click “Properties”
3.Change address
4. Click OK
Before connecting
Set the address of GW-7552 as below
GW-7552
• PROFIBUS Device 2 (Slave)
• Modbus Device (RTU Master)
1.Double click GW7552 icon
2.Click PROFIBUS
3. Change the address
4.Click OK
Before connecting
Set Gw-7552 comport setting as below
Comport Settings:
• Baudrate:115200
• Data bit: 8
• Stop bit : 1
• Parity: None
• Byte order: Big Endian
• Output Data Mode: Auto
1.Double click GW7552 icon
2.Click Parameter Assignment
3.Change
Baud rate:115200
Data bit :8
Stop bit :1
Parity :None
Byte order: big Endian
Output Data Mode: Auto
4.Click “OK”
You can change parameters here
Before connecting
Make sure the switch of the GW-7552 is at Normal mode.
Refer to GW-7552 user manual 2.6
Before connecting
Setup the address by the DIP switch to set
Refer to GW-7552 user manual 2.4
GW-7552’s address as 2 in PROFIBUS
Read 16-channel DO and Write 16-channel DO
SIMATIC PLC
* PROFIBUS Device 0 (Master)
SIMATIC
Manager
PROFIBUS DP
GW-7552
• PROFIBUS Device 2 (Slave)
• Modbus Device (RTU Master)
MODBUS RTU
16-channel DO module Comport Settings:
* Modbus Device 10 (RTU Slave) • Baudrate:115200
* Data Address: 000018~00033 • Data bit: 8
* Data Length: 2 • Stop bit : 1
• Parity: None
Read 16-channel DO and Write 16-channel DO
(2)Double click
1. “System setting module”
2. “Output Relay/Coil – 2 byte”
(1)Select GW-7552 module 3. “Input Relay/Coil – 2byte”
Read 16-channel DO and Write 16-channel DO
(2)Parameter Assignment
Modbus Slave Device ID (M) : 10
Start Address(M):17
No.of Relay/Coil (M):16 BITS
(3)Click OK
(1)Double click “output Relay/Coil – 2 byte “ module
Read 16-channel DO and Write 16-channel DO
(2)Parameter Assignment
Modbus Slave Device ID (M) : 10
Start Address(M):17
No.of Relay/Coil (M):16 BITS
Modeule Type(M):Read DO
(3)Click OK
(1)Double click “input Relay/Coil – 2 byte “module
Read 16-channel DO and Write 16-channel DO
Save and Compile
Read 16-channel DO and Write 16-channel DO
Download to PLC
Read 16-channel DO and Write 16-channel DO
Double click
Read 16-channel DO and Write 16-channel DO
Type output(QB #)& input (IB #)
IB : input Byte ; QB : output Byte
IW: input Word ; QW : output Word
Read 16-channel DO and Write 16-channel DO
The addresses in VAT_1 correspond module addresses
Click “Monitor“ button
Read 16-channel DO and Write 16-channel DO
Monitor Variable
00018~00025
Bit 25 24 23 22 21 20 19 18
0 0 0 0 0 0 0 0
27 26 25 24 23 22 21 20
Bit 33 32 31 30 29 28 27 26
0 0 0 0 0 0 0 0
27 26 25 24 23 22 21 20
00026~00033
Read 16-channel DO and Write 9-channel DO
Modify the value to send ModBus command
The Data to transfer Data transfer
Data received
Setup QB3 QB4,click modify variable button
Read 16-channel DO and Write 9-channel DO
Step 15 :Modify the value to send ModBus command
Data 03
Address 33 32 31 30 29 28 27 26
bit 0 0 0 0 0 0 1 1
Write DO(8bit) Write X X X X X X V V
Write DO(8bit)
Data 03
Address 25 24 23 22 21 20 19 18
bit 0 0 0 0 0 0 0 1
Write X X X X X X X V
Read DO(8bit)
Read DO(8bit)
User can read the data to the Modbus
DO module at address IB4 、IB5
Read 13-channel DI
SIMATIC PLC
* PROFIBUS Device 0(Master)
SIMATIC
Manager
PROFIBUS DP
GW-7552
• PROFIBUS Device 2 (Slave)
• Modbus Device (RTU Master)
MODBUS RTU
16-channel DI module Comport Settings:
* Modbus Device 5 (RTU Slave) • Baudrate:115200
* Data Address:10057~100069 • Data bit: 8
* Data Length: 2 • Stop bit : 1
• Parity: None
Read 13-channel DI
(2)Double click
(1)Select GW-7552 module 1.“System setting”
2.“Input Relay/Coil—2 byte
Read 13-channel DI
Modbus Slave Device ID (M) : 5
Start Address(M):56
No.of Relay/Coil (M):13 BITS
(1)Double click DI module
(3)Click OK
Read 13-channel DI
Save and Compile
Read 13-channel DI
Download to PLC
Read 13-channel DI
Double click
Read 13-channel DI
Click “Monitor“ button
Read 13-channel DI
Read DI(8bit)
00000111 (binary)= 07 (hex) User can read the data to the Modbus
00101 (binary)= 05 (hex) DI module at address IB 4 、IB 5
Read DI(5bit)
Read and Write 6-channel AO
SIMATIC PLC
* PROFIBUS Device 0(Master)
SIMATIC
Manager
PROFIBUS DP
GW-7552
• PROFIBUS Device 2 (Slave)
• Modbus Device (RTU Master)
MODBUS RTU
AO module Comport Settings:
* Modbus Device 11 (RTU Slave) • Baudrate:115200
* Data Address: 40001~40006 • Data bit: 8
* Data Length: 6 • Stop bit : 1
• Parity: None
Read and Write 6-channel AO
(1)Select GW-7552 module (2)Double click
1.“System setting”
2.“Output Register—6 word”
3.”Input Register—6 word”
Read and Write 6-channel AO
(2)Parameter
Modbus Slave Device ID (M) : 11
(1)Double click
AO module
Read and Write 6-channel AO
(2)Parameter
Modbus Slave Device ID (M) : 11
Module Type (M):Read AO
(1)Double click
AI module (3)Click OK
Read and Write 6-channel AO
Save and Compile
Read and Write 6-channel AO
Download to PLC
Read and Write 6-channel AO
Double click
Read and Write 6-channel AO
Click “Monitor“ button
Read and Write 6-channel AO
Read AO(6 word)
Read and Write 6-channel AO
(2)Click “Modify variable“ button
(1)Set the data to transfer
Read AO(6 word)
Read and Write 6-channel AO
Write AO(6 word)
Read AO(6 word)
Read 4-channel AI
SIMATIC PLC
* PROFIBUS Device 0(Master)
SIMATIC
Manager
PROFIBUS DP
GW-7552
• PROFIBUS Device 2 (Slave)
• Modbus Device (RTU Master)
MODBUS RTU
AI module Comport Settings:
* Modbus Device 20 (RTU Slave) • Baudrate:115200
* Data Address: 30001~30004 • Data bit: 8
* Data Length: 4 • Stop bit : 1
• Parity: None
Read 4-channel AI
(1)Select GW-7552 module
(2)Double click
1.“System setting”
2.“Input Register—4 word “
Read 4-channel AI
(2)Parameter Assignment
Modbus Slave Device ID (M) : 20
(1)Double click AI module
Read 4-channel AI
Save and Compile
Read 4-channel AI
Download to PLC
Read 4-channel AI
Double click
Read 4-channel AI
Click “Monitor“ button
Read 4-channel AI
Read AI(4word)
Read 4-channel AI
Read AI(4word)