Siemens

Version 23.1 by Hunter on 2023/08/24 18:12

Siemens

S7-200 Smart Ethernet

Supported Series: Siemens S7-200 SMART Series Ethernet Module.

Website: http://www.siemens.com/entry/cc/en/

HMI Setting

ItemsSettingsNote
ProtocolSimens S7-200 Smart Ethernet 
ConnectionEthernet 
Port No.102 
PLC station No.2 

Address List

TypeDevice registerHMI registerFormatRangeNote
BitIII ddddd.o0.0~99999.7 
QQQ ddddd.o0.0~99999.7 
VVWbitVWbit ddddd.o0.0~99999.7 
VVV ddddd.o0.0~99999.7 
MMM ddddd.o0.0~99999.7 
SMSMddddd.o0.0~99999.7 
SSddddd.o0.0~99999.7Read only
TTddddd0~99999Timer state, read only
CCddddd0~99999Counter state, read only
WordIIWIW ddddd0~99999 
QQWQW ddddd0~99999 
AIAIWAIW ddddd0~99999 
AQVBVB ddddd0~99999 
VVWVW ddddd0~99998

VW0=VB (0~1)

VW2=VB (2~3)

Address value is a multiple of 2

VVDVD ddddd0~99998

VD0=VB (0~3)

VD2=VB (4~7)

Address value is a multiple of 4

MMBMB ddddd0~99999 
MMWMW ddddd0~99999

MW0=MB(0~1)

MW2=MB(2~3)

Address value is a multiple of 2

MMDMD ddddd0~99999

MD0=MB(0~3)

MD4=MB(4~7)

Address value is a multiple of 4

TTWTW ddddd0~99999Value of timer
CCWCW ddddd0~99999Value of counter
WSWSW ddddd0~99999 

Communication Settings

Enable HMI Ethernet in [Project Settings];

12.PLC Protocol_html_43b671f18153910d.png

Set PLC IP in [Device IP] settings;

12.PLC Protocol_html_70b0c4c2ee21b10d.png

  • PLC IP Address: PLC IP
  • PLC pot No.: 102(fixed)
  • Network:TCP_Client_2N(fixed)

12.PLC Protocol_html_5891afd92901b7ad.png

  • Wait timeout: depend on actual network situation (more than 1500 ms)

Cable Wiring

12.PLC Protocol_html_2297240b57346b2a.png

S7-300 Ethernet

Supported Series: Siemens S7-300 series PLC

HMI Setting

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

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~DB9999.DBDBxDBDDBxDB nnnndddd.o0.0~99999999.7

nnnn: 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~DB9999.DBDBxDBBDBxDBB nnnndddd0~99999999

nnnn: block number;

dddd: address

DBxDBWDBxDBW nnnndddd0~99999999
DBxDBDDBxDBD nnnndddd0~99999999

Communication Settings

Enable HMI Ethernet in [Project Settings];

12.PLC Protocol_html_43b671f18153910d.png

Set PLC IP in [Device IP] settings;

12.PLC Protocol_html_910b1a0aa9e2201c.png

  • PLC IP Address: PLC IP
  • PLC pot No.: 102(fixed)
  • Network:TCP_Client_2N(fixed)

12.PLC Protocol_html_5891afd92901b7ad.png

  • Wait timeout: depend on actual network situation (more than 1500 ms)

Cable Wiring

12.PLC Protocol_html_2297240b57346b2a.png

S7-1200 Ethernet

Supported Series: Siemens S7-1200

HMI Setting

ItemsSettingsNote
ProtocolSiemens S7-1200 
ConnectionEthernet 
Port No.102 
PLC station No.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

Communication Settings

Enable HMI Ethernet in [Project Settings];

12.PLC Protocol_html_43b671f18153910d.png

Set PLC IP in [Device IP] settings;

12.PLC Protocol_html_f7b3eb9abda33833.png

✎Note:

  • The S7-1200 supports simultaneous connection of three devices, so the driver supports simultaneous access to PLC by three touch screens.
  • HMI 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.
  • S7-1200 String type, the default first two bytes are used to store the maximum character and valid characters, so the text data will be shifted back one word address. When interacting with the data, what way this address plc is displayed with is unknown. And because of an extra word of data causes us to display the wrong. The solution is if we use String, then the actual data address we want to operate on is actually shifted back two bytes, so as long as the address on the project is shifted back 2 bits to correspond with the actual data address.
  • HMI operation character length needs to be set to 2 times the length of the Siemens character for proper display. 

PLC Settings

Add BD

  • Please uncheck [Symbolic access only] option;

12.PLC Protocol_html_643144c591994418.png

Address settings, using BD2 as example.

  • DB×DBB2xxxx, DB×DBW2xxxx, DB×DBD2xxxx for accessing data of DB2 in B1.
  • 2 represent DB block number
  • xxxx represent address

Such as:

  • DBxDBB20000 = DB2.DBB0
  • DBxDBW20004 = DB2.DBW4

12.PLC Protocol_html_87ceaea84d552e62.png

How to connect with S7-1200 Firmware V4.0

PLC configuration

  • Double click [device configuration] in Siemens via software
  • Double click [protection] to enter protection configuration screen

12.PLC Protocol_html_9779940d38da8e07.png

  • Check [Permit access with PUT / GET communication from remote partner (PLC, HMI, OPC, ...)]

12.PLC Protocol_html_d2c667b02f9720b1.png

DB settings

  • Right click [DB], select [properties]
  • Uncheck [optimized block access]

Cable Wiring

12.PLC Protocol_html_2297240b57346b2a.png

S7-XXX Ethernet

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

HMI 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 PIStudio

Rack from TIA Portal is equal to HMI No. of PIStudio

S7-XXXCommunication Settings.png

S7-XXXCommunication SettingsPI.png

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

Communication Settings

Enable HMI Ethernet in [Project Settings];

12.PLC Protocol_html_43b671f18153910d.png

Set PLC IP in [Device IP] settings;

12.PLC Protocol_html_f7b3eb9abda33833.png

✎Note:

  • The S7-1200 supports simultaneous connection of three devices, so the driver supports simultaneous access to PLC by three touch screens.
  • HMI 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.

Cable Wiring

12.可编程逻辑控制器Protocol_html_2297240b57346b2a.png

 LOGO Ethernet

Supported Series: Siemens Logo 0BA0, 0BA1 series

HMI 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

HMI Communication Settings

Set PLC IP in [Device IP] settings;

image-20221228143614-7.png

Enable HMI Ethernet in [Project Settings];

image-20221228144229-9.png

TSAP setting

  • Regarding the setting of PLC TSAP, HMI provides system special address for setting, it is recommended to run in HMI script initialization, write PLC TSAP to corresponding system special register.
  • HSW10118/HSW1200 = local TSAP of HMI, this is remote TSAP of PLC.
  • HSW10119/HSW1201 = Remote TSAP of HMI, this is local TSAP of PLC.
  • PI, PI+, i series (1.0 system): use HSW10118, HSW10119.
     ie, ig series: use HSW1200, HSW1201.
     HMI V2.0: use HSW1200, HSW1201.

✎Note:

  • The data of TSAP is hexadecimal format. For example: the remote TSAP configured in the PLC is set to 20.00, then HSW10118/HSW1200 should be set to 0x2000, that is, HSW10118/HSW1200=8192.
  • HSW10119/HSW1201 is set up as shown.
  • image-20221228144800-11.png
  • image-20221228144708-10.png
  • AI word address and Ibit address are read-only and cannot be written on HMI.
  • VW address should be even number address, such as VW0, VW2, VW4..., because in the address rule of Siemens PLC, the value of odd number address is equal to the value of previous even number address. For example VW1 = VW0.
  • VD address should be multiple of 4, because it occupies two VW addresses, such as VD0, VD4, VD8...
  • Written value of RTC cannot exceed 255.

Cable Wiring

12.可编程逻辑控制器Protocol_html_2297240b57346b2a.png

S7-300(With PC Adapter)

HMI Setting:

ParametersRecommendedOptionsNotes
PLC typeSIEMENS S7-300 (with PC Adapter) 
PLC I/FRS232  
Baud rate192009600,19200 
Data bits8  
ParityOdd  
Stop bits1  
PLC sta. no.2 Must be same as the PLC setting.

Device Address

Bit/WordDevice typeFormatRangeMemo
BitIDDDDo0 ~ 40957Input (I)
BitQDDDDo0 ~ 40957Output (O)
BitMDDDDo0 ~ 40957Bit Memory
WordDB1 to DB99DDDDDo0 ~ 655327 
WordIWDDDD0 ~ 4095Input (I)
WordQWDDDD0 ~ 4095Output (O)
WordMWDDDD0 ~ 4095Bit Memory
Double wordMDDDDD0 ~ 4094 
Double wordDBDnFFFFFDDDD0 ~ 655359999Data Register Double Word (must be even)
ByteMBDDDD0 ~ 4095Bit Memory Byte

Cable Wiring

image-20221010102051-1.png