GW-7553 Example For SIMATIC STEP 7: (Modbus TCP Slave)
GW-7553 Example For SIMATIC STEP 7: (Modbus TCP Slave)
GW-7553
1
Directory
2
Example 1: PLC receives AO data from Modbus master.
2. HW Config – Parameter assignment (ex: Com port settings, Modbus type: Slave, Modbus format:
TCP, Byte Order: Big Endian). Confirm the GW-7553’s Com Port setting is the same with MBTCP tool
(ex: baud rate-115200, data bits-8, stop bits-1, parity-none). About the MBTCP tool, please refer to the
“Communication test” in the below.
Double Click
3
3. Save and Compile
4
5.Insert a new Organization Block (OB1,OB82,OB86)
5
Double Click
6
7. S7 program download
Setup IP of GW-7553 with Utility (the user can download the latest Utility at
ftp://ftp.icpdas.com/pub/cd/fieldbus_cd/profibus/gateway/gw-7553/utilities/
1. Before the connection, please make sure the RUN LED of the GW-7553 is on and the
switch of the GW-7553 is at setting mode.
7
2. Set the Com Port Setting of the Utility
3.Click connect.
8
4. Connection success
9
6. Set the IP of the Modbus TCP Slave and click “Save to Device” button
to save the settings.
7.Set the switch of the GW-7553 to Normal Mode then reset the power of
GW-7553.
10
Communication test
1. Confirm the GW-7553’s Com Port setting is the same with Modbus Master tool (ex: MBTCP, you
can download MBTCP from http://ftp.icpdas.com.tw/pub/cd/8000cd/napdos/modbus/modbus_utility/)
2. Send command 01 10 00 00 00 02 04 F9 F9 F9 F9 write two byte AO
3. Response value 01 10 00 00 00 02
4. PLC will receives the “AO Value (0xF9, 0xF9, 0xF9, 0xF9)” at PLC address PIW256, PIW257,
PIW258, PIW259
11
Example 2: PLC receives DO data from Modbus master.
2. HW Config – Parameter assignment (ex: Com port settings, Modbus type: Slave, Modbus format:
TCP, Byte Order: Big Endian). Confirm the GW-7553’s Com Port setting is the same with MBTCP tool
(ex: baud rate-115200, data bits-8, stop bits-1, parity-none). About the MBTCP tool, please refer to the
“Communication test” in the below.
Double Click
12
3. Save and Compile
13
5.Insert a new Organization Block (OB1,OB82,OB86)
14
Double Click
6. S7 program edit
15
7. S7 program download
Setup IP of GW-7553 with Utility (the user can download the latest Utility at
ftp://ftp.icpdas.com/pub/cd/fieldbus_cd/profibus/gateway/gw-7553/utilities/
1. Before the connection, please make sure the RUN LED of the GW-7553 is on and the
switch of the GW-7553 is at setting mode.
16
2. Set the Com Port Setting of the Utility
3.Click connect.
17
4. Connection success
18
6. Set the IP of the Modbus TCP Slave and click “Save to Device” button
to save the settings.
7.Set the switch of the GW-7553 to Normal Mode then reset the power of
GW-7553.
19
Communication test
1. Confirm the GW-7553’s Com Port setting is the same with Modbus Master tool (ex: MBTCP, you
can download MBTCP from http://ftp.icpdas.com.tw/pub/cd/8000cd/napdos/modbus/modbus_utility/)
4. PLC will receives the “DO Value (0x22, 0x33)” at PLC address IB6&IB7.
20
Example 3: PLC refreshes DI data to Modbus master.
2. HW Config – Parameter assignment (ex: Com port settings, Modbus type: Slave, Modbus format:
TCP, Byte Order: Big Endian). Confirm the GW-7553’s Com Port setting is the same with MBTCP tool
(ex: baud rate-115200, data bits-8, stop bits-1, parity-none). About the MBTCP tool, please refer to the
“Communication test” in the below.
Double Click
21
3. Save and Compile
22
5.Insert a new Organization Block (OB1,OB82,OB86)
23
Double Click
24
Using T2 trigger T1 .C1 and Tri will add 1 every 1s.
25
If Tri is equal to 256, reset counter (C1)
7. S7 program download
26
Setup IP of GW-7553 with Utility (the user can download the latest Utility at
ftp://ftp.icpdas.com/pub/cd/fieldbus_cd/profibus/gateway/gw-7553/utilities/
1. Before the connection, please make sure the RUN LED of the GW-7553 is on and the
switch of the GW-7553 is at setting mode.
27
3.Click connect.
4. Connection success
28
5. Click IP setting→Load from device to show IP setting dialog
6. Set the IP of the Modbus TCP Slave and click “Save to Device” button
to save the settings.
29
7.Set the switch of the GW-7553 to Normal Mode then reset the power of GW-7553.
Communication test
1. Confirm the GW-7553’s Com Port setting is the same with Modbus Master tool (ex: MBTCP, you
can download MBTCP from http://ftp.icpdas.com.tw/pub/cd/8000cd/napdos/modbus/modbus_utility/)
30
2. Input command (” 01 02 00 00 00 10”) in MBTCP and click <Send Command> button to send
Modbus command: “01 02 00 00 00 10”. We can get the DI value (0x6F, 0xDE) from the
response message
3. We change QB3 to 0xFE and QB4 to 0xDC, and then we can click <Send Command>
button to read DI again at MBTCP and we will get the new DI value (0xFE, 0xDC) from the
response message.
31
32
Example 4: PLC refreshes AI data to Modbus master.
2. HW Config – Parameter assignment (ex: Com port settings, Modbus type: Slave, Modbus format:
TCP, Byte Order: Big Endian). Confirm the GW-7553’s Com Port setting is the same with MBTCP tool
(ex: baud rate-115200, data bits-8, stop bits-1, parity-none). About the MBTCP tool, please refer to the
“Communication test” in the below.
33
3. Save and Compile
34
5.Insert a new Organization Block (OB1,OB82,OB86)
35
Double Click
36
37
7. S7 program download
38
Setup IP of GW-7553 with Utility (the user can download the latest Utility at
ftp://ftp.icpdas.com/pub/cd/fieldbus_cd/profibus/gateway/gw-7553/utilities/
1. Before the connection, please make sure the RUN LED of the GW-7553 is on and the
switch of the GW-7553 is at setting mode.
39
3.Click connect.
4. Connection success
40
5. Click IP setting→Load from device to show IP setting dialog
6. Set the IP of the Modbus TCP Slave and click “Save to Device” button
to save the settings.
41
7.Set the switch of the GW-7553 to Normal Mode then reset the power ofGW-7553.
Communication test
1. Confirm the GW-7553’s Com Port setting is the same with Modbus Master tool (ex: MBTCP, you
can download MBTCP from http://ftp.icpdas.com.tw/pub/cd/8000cd/napdos/modbus/modbus_utility/)
42
2. Input command (” 01 04 00 00 00 02”) in MBTCP and click <Send Command> button to send
Modbus command: “01 04 00 00 00 02”. We can get the AI value (0x006F, 0x00DE) from the
response message.
3. We change PQW256 to 0x00FE and PQW258 to 0x00DC, and then we can click <Send
Command> button to read AI again at MBTCP and we will get the new AI value (0x00FE,
0x00DC) from the response message.
43
44