Siemens

Last modified by Jett on 2024/04/29 17: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 registerFormatRangeNote
BitII ddddd.o0.0~99999.7 
QQ ddddd.o0.0~99999.7 
VVWbit ddddd.o0.0~99999.7HMI register:VWbit
VV ddddd.o0.0~99999.7HMI register:V
MM ddddd.o0.0~99999.7 
SMddddd.o0.0~99999.7 
Sddddd.o0.0~99999.7Read only
Tddddd0~99999Timer state, read only
Cddddd0~99999Counter state, read only
WordIIW ddddd0~99999HMI register:IW
IB ddddd0~99999HMI register:IB
QQW ddddd0~99999HMI register:QW
QB ddddd0~99999HMI register:QB
AIAIW ddddd0~99999HMI register:AIW
AIB ddddd0~99999HMI register:AIB
AQAQW ddddd0~99999HMI register:AQW
AQB ddddd0~99999HMI register:AQB
VVW ddddd0~99998

HMI register:VW

VW0=VB (0~1)

VW2=VB (2~3)

Address value is a multiple of 2

VD ddddd0~99996

HMI register:VD

VD0=VB (0~3)

VD2=VB (4~7)

Address value is a multiple of 4

VB ddddd0~99998HMI register:VB
MMW ddddd0~30

HMI register:MW

MW0=MB(0~1)

MW2=MB(2~3)

Address value is a multiple of 2

MD ddddd0~99999

HMI register:MD

MD0=MB(0~3)

MD4=MB(4~7)

Address value is a multiple of 4

 

MD dd0~31HMI register:MB
TTW ddddd0~99999

HMI register:MW

Value of timer

CCW ddddd0~99999

HMI register:CW

Value of counter

SSW ddddd0~99999HMI register:SW
SB ddddd0~99999HMI register:SB

Communication Settings

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)

PLC Setting:

①Open STEP 7-MicroWIN SMART, create a new PLC project or open the project that has been created.
Create new project:Double click[CPU SR20]→[System Block]→[Module] CPU SR20(AC/DC/Relay)→[OK].

1.2.png

②PLC Default Parameters: Double click[CPU SR20]→[System Block]→[Ethernet Port]→[IP Address]192.168.39.21[Subnet Mask]255.255.255.0[Default Gateway]192.168.39.1→[OK]

1.3.png

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

S7-200 Smart Serial 

Supported Series: Siemens S7-200 SMART Series.

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

HMI Setting

ParametersRecommendedNotes
PLC typeSIEMENS S7-200 CPU22x/Smart PPI new 
PLC I/FRS485 
Baud rate9600 
Data bits8 
ParityEVEN 
Stop bits1 
PLC sta. no.2Must be same as the PLC setting.

Address List

TypeDevice registersHMI registersFormatRangeNote
BitIII d0~99999 
QQQ d0~99999 
VWBitVWBitVWBit d0~99999 
VVV d0~99999 
MMM d0~99999 
SMSMSM d0~99999 
SSS d0~99999 
TTT d0~99999 
CCC d0~99999 
WordIWIWIW d0~99998 
QWQWQW d0~99998 
AIWAIWAIW d0~99998 
AQWAQWAQW d0~99998 
VWVWVW d0~99998 
MWMWMW d0~30 
SWSWSW d0~99998 
SMWSMWSMW d0~99998 
TWTWTW d0~99999 
CWCWCW d0~99999 

Configure the communication protocol

2.3.png

2.3.2.png

PLC Settings(STEP 7-MicroWIN SMART)

Open STEP 7-MicroWIN SMART, create a new PLC project or open the project that has been created.
Create new project:Double click[CPU SR20]→[System Block]→[Module] CPU SR20(AC/DC/Relay)→[OK].

1.2.png

PLC Default Parameters: Double click[CPU SR20]→[System Block]→[RS485 Port]→[Address]2,[Baud Rate]9.6Kbps→[OK]

1.3.png

Cable Wiring

Cable Wiring.png

Pin Definition Diagram

Pin Definition Diagram.png

S7-200(Ethernet with 243)

Supported Series: Siemens S7-200(Ethernet with 243)

HMI Setting

ItemsSettingsNote
ProtocolSiemens S7-200(Ethernet with 243)

 

ConnectionEthernet 
Port No.102 
PLC station No.2 

Note: IF the [SIEMENS S7-200(Ethernet With 243)] can not link.Please choose [SIEMENS S7-200 Smart (Ethernet)] to test again.

Address List

Bit/WordDevice typeAddress NO.RangeNote
Bit
 
IDDDD.oD:0~99999   o:0~7 
QDDDD.oD:0~99999   o:0~7 
MDDDD.oD:0~99999   o:0~7 
VDDDD.oD:0~99999   o:0~7 
VWBitDDDD.oD:0~99999   o:0~7 
SMDDDD.oD:0~65535   o:0~7 
SDDDD.oD:0~99999   o:0~7 
TDDDD0~99999  
CDDDD0~99999  
Lamp00 
Word
 
IWDDDD0~99999 
QWDDDD0~99999 
AIWDDDD0~99999 
AQWDDDD0~99999 
VWDDDD0~99998 
MWDDDD0 ~ 30 
TWDDDD0~99999 
CWDDDD0~99999 
SWDDDD0~99999 
Double word
 
MDDDDD0-28 
VDDDDD0 ~ 99998 

Viewing/Configuring Ethernet Parameters

  1.[Tools]--[Ethernet Wizard]

图片1.png

  2.Choose the position of module 243 --[Next]

Note: Module position refers to the position of module 243 on the plc, please adjust according to the actual situation

图片2.png

  3.Choose the module type,Next 

图片3.png

  4.Set IP address as 192.168.1.218 ,and Subnet mask as 255.255.255.0,Next

图片4.png

  5.[QB]1--[Number of connections to configure for this module]3--[Next]

图片5.png

  6.Click [This is a Server Connection] and Click [Accept all connection requests],[OK]

图片6.png

  7.Click [Yes,generate CRC protection for  this configuration in the data book],set the Keep Alive Interval as 30 sec,[Next]

图片7.png

  8.Choose the Suggest Address,Next

图片8.png

  9.[ETH Configuration for 0]--[Finish]

图片9.png

Test CP 243-1

  1.[Communications]→[PC/PPI cable]→[TCPIP.1]→[OK]

图片10.png

  2.[Remote]192.168.1.218 then [Double-Click to Refresh]and choose[CPU 226 CN REL 02.01 192.168.1.218],click[OK]

图片11.png

Cable Wiring

12.PLC Protocol_html_2297240b57346b2a.png