Siemens

Version 2.2 by Leo Wei on 2023/08/24 14:11

Siemens 

S7-200 Smart Ethernet 

download link

S7-300 Ethernet 

Supported Series: Siemens S7-300 series PLC

1)V-BOX setting

ItemsSettingsNote
ProtocolSimens S7-300 Ethernet 
ConnectionEthernet 
Port No.102 
PLC station No.2Need to be same as the PLC setting

2)Address List

TypeDevice registerHMI registerFormatRangeNote
BitIII ddddd.o0.0~99999.7 
QQQ ddddd.o0.0~99999.7 
MMM ddddd.o0.0~99999.7 
DB0.DB~DB99.DBDBxDBDDBxDB nndddd.o0.0~99999999.7

nn: block number;

dddd: address;

WordIIWIW ddddd0~99999 
QQWQW ddddd0~99999 
MMBMB ddddd0~99999 
MWMW ddddd0~99999

MW0=MB(0~1)

MW2=MB(2~3)

Address value is a multiple of 2

MDMD ddddd0~99999

MD0=MB(0~3)

MD4=MB(4~7)

Address value is a multiple of 4

DB0.DB~DB99.DBDBxDBBDBxDBB nndddd0~99999999

nn: block number;

dddd: address

DBxDBWDBxDBW nndddd0~99999999
DBxDBDDBxDBD nndddd0~99999999

3)Configure the communication protocol

image-20220824161345-1.png

4)Cable Wiring

image-20220824161450-2.png

S7-1200 Ethernet 

download link

S7-XXX Ethernet l

Supported Series: Siemens S7-400, S7-1200 and S7-1500

1)V-BOX setting

ItemsSettingsNote
ProtocolSiemens S7-XXX 
ConnectionEthernet 
Port No.102 
Device No.Slot (Default 1 for S7-1500/ 2 for S7-1200/ 3 for S7-400) 
HMI No.Rack (Default as 0) 

Slot from TIA Portal is equal to Device No. of V-net

Rack from TIA Portal is equal to HMI No. of V-net

image-20220824162459-3.png

image-20220824163305-2.png

2)Address List

TypeDevice registerHMI registerFormatRangeNote
BitIIM d.o

d:0--9999

o:0-7

 
QQQ d.o

d:0--9999

o:0-7

 
MMM d.o

d:0--9999

o:0-7

 
DB0.DB-DB99.DBDBxDBDBxDBnndddd.o

nn:0-9999,

dddd:0-9999,

o:0-7

nn:DB No.

dddd:address value

o: digit address

WordMMBMB dd:0-99999 
MMWMW dd:0-99999

MW0=MB(0~1)

MW2=MB(2~3)

Address value is a multiple of 2

MMDMD dd:0-99999

MD0=MB(0~3)

MD4=MB(4~7)

Address value is a multiple of 4

IIWIW dd:0-99999 
QQWQW dd:0-99999 
DB0.DB-DB99.DBDBxDBBDBxDBBnndddd

nn:0-9999

dddd:0-9999

nn:DB No.

dddd:address value

DB0.DB-DB99.DBDBxDBWDBxDBWnndddd

nn:0-9999

dddd:0-9999

nn:DB No.

dddd:address value

Address value is a multiple of 2

DB0.DB-DB99.DBDBxDBDDBxDBDnndddd

nn:0-9999

dddd:0-9999

nn:DB No.

dddd:address value

Address value is a multiple of 4

3)Configure the communication protocol

image-20220824163448-3.png

✎Note:

  • The S7-1200 supports simultaneous connection of three devices, so the driver supports simultaneous access to PLC by three V-BOX.
  • V-BOX access PLC, use S7 protocol, access PLC TSAP 02.01 (s7-1200 PROFINET interface only supports three connections, the default support), detailed reference to the system manual of S7-1200.

4)Cable Wiring

image-20220824162342-2.png

LOGO Ethernet 

Supported Series: Siemens Logo 0BA0, 0BA1 series

V-BOX Settings

ItemsSettingsNote
ProtocolSiemens LOGO 
ConnectionEthernet 
Port No.102 
PLC station No.2 

Address List

NumberAddress TypeData TypeRangeDB AddressPLC Address
1RTCWord1-7DB1.DBX984.00x001ec0
2VBByte0-1469DB1.DBX0.00x000000
3VDDouble Word0-1466DB1.DBX0.00x000000
4VWWord0-1468DB1.DBX0.00x000000
5NAQWord1-32DB1.DBX1406.00x002bf0
6NAIWord1-64DB1.DBX1262.00x002770
7AMWord1-64DB1.DBX1118.00x0022f0
8AQWord1-16DB1.DBX1072.00x002180
9AIWord1-16DB1.DBX1032.00x002040
10IBit1-64DB1.DBX1024.00x002000
11QBit1-64DB1.DBX1064.00x002140
12MBit1-112DB1.DBX1104.00x002280
13NIBit1-128DB1.DBX1246.00x0026f0
14NQBit1-128DB1.DBX1390.00x002b70
15VBit0-14697DB1.DBX0.00x000000

PLC Settings in LOGO Software:

Click [Tools]--[Ethernet Connections],shown as below.

12.PLC Protocol_html_8b9d2322edf89519.png

Set Ethernet connection parameter. IP, Subnet Mask, shown as below.

image-20221228142937-4.png

TSAP set:The value set by local TSAP is the remote TSAP set in HMI. PLC's remote TSAP is the opposite,shown as below.

image-20221228143047-5.png

 Download Project: Click "Address book" to add the IP address to be downloaded (fi."Detect" to check whether the IP address can be detected. Then click “ok”, and the system will prompt that PLC will be "STOP" mode. Click “YES” to start download.

image-20221228143246-6.png

V-BOX Communication Settings

Set PLC IP in [IP Address] settings;

LldwDGntf4.png

Enable V-BOX Ethernet in [Network];

WgvjfWbQif.png

TSAP setting

  • The initialization script needs to set the source TSAP address and the target TSAP address, otherwise the communication will not be successful.

function init.main()
 addr_setword("@W_0#HSW1200",8192) -- Set the source TSAP address
 addr_setword("@W_0#HSW1201",4096) -- Set the destination TSAP address
end

Note: The name of the test script is init, 8192 and 4096 are the data used for the test, there is no HSW address in the register option, but you can directly set the value of the corresponding address through the code.

✎Note:

  • Communication port configuration: 
    • Continuous length needs to be set to 0.
    • Integration interval needs to be set to 1. (no change may result in data errors)
    • Set Port and Device Station NO.
    • Other set as defaulted.
  • Notes on the use of registers:
    • Register VD: Use only registers that are multiples of 4, such as 0, 4, 8, etc.
    • Register VW: Use only registers thay are multiples of 2, such as 0, 2, 4 etc. (Using an odd-length register may result in data errors, such as 2 3 4 )