You are on page 1of 6

SIEMENS S7 Ethenet

1. Overview

This driver provides the software interface and communication protocol between XPanel and
Siemens Simatic S7 PLCs. It supports the following families of Siemens Simatic S7 system.
z S7-300 CPU via the communication card CP343-1 IT
z S7-400 CPU via the communication card CP443-1 IT

2. Communication Setup : XPanel


(1) Create a new device.

For creating a new device activate the menu ‘Tools’->’I/O Devices’ or icon in tool-

bar. Following picture shows the first step of creating a new device.

z I/O Device Name


Give a device name. This name will be used in the TAG configuration window of
database accompanied by the ‘Station Name’.
(2) Select a network type : ‘SIEMENS S7 Ethernet’
After selecting the ‘OK’ button of previous step, ‘Ethernet Communication

SIEMENS S7 Ethernet - 1
Configuration’ dialog box will be popped up as shown in following picture.

In this window, select the ‘Device Type’ as ‘SIEMENS S7 Ethernet’ and ‘TCP’ protocol.
This driver supports only TCP/IP protocol stack.

(3) Create a station


Move to the ‘Station’ tab of ‘Ethernet Communication Configuration’ dialog box.

In this dialog box, all the connected PLC stations can be configured and registered to the

SIEMENS S7 Ethernet - 2
XPanel. Each field can be configured with following rules.
z Station Name
Give a name to the PLC. This name will be used in the database window
accompanied with the ‘Device Name’.
z Station Type
Choose the ‘S7’. (No other type can be selected.)
z Network ID
This network ID is a combination of CPU’s rack and slot number. This ID must be
given by decimal number with following format. (000..714)

z IP Address
Give the IP address of PLC with dotted decimal format.
z Socket Port Number
Don’t change the default number (102). This number is a TCP/IP port which is
opened by PLC for communication service.
z 16Bit Data Swap
This option swaps bytes of all word or double word sized data. Following diagram
shows an example of byte swapping.

Almost all of the data type will be influenced by this option except INT8 / UINT8 /
BCD8 / UBCD8.
z 32Bit Data Swap
This option swaps words of all double word sized data. Following diagram shows
an example of word swapping.

Double Word Data 1234ABCDh ABCD1234h

INT32 / UINT32 / BCD32 / UBCD32 / FLOAT type of TAG values will be influenced
by this option.
z Fixed XPANEL Socket Port / XPANEL Socket Port No.
If this option was checked, XPanel will use only one port defined in ‘XPANEL
Socket Port No.” field for connection with PLC. Otherwise, XPanel will change the
port at every TCP connection or communication error.

SIEMENS S7 Ethernet - 3
This option is provided for XPanel to deal with various TCP port management
ways of PLC. Some PLC has a limit on the number of TCP services. In that case,
this option can be a help.
The actual effect of this option on PLC cannot be described here. Because, there
are too many kinds of PLC and the response in PLC is entirely dependant on the
specification of PLC and engineer’s experience.
The default setting of this option is unchecked state.
z Comm. Error Message Pop Up
If this item is checked, XPanel displays a communication error notification
message at every Rx and Tx error.
Otherwise(unchecked), XPanel does not display the message at data receive error.
Only when there is data transmit (writing a TAG value to the station) error, the
notification message is popped up. This message box will be closed automatically
about 5 seconds after.

SIEMENS S7 Ethernet - 4
3. Address Notation
The address of TAG in XPanel has the following format.

TAG Type Format Example

Analog [Symbol][DB Number,][Address] DB1,1


Digital [Symbol][DB Number,][Address].[Bit Number] DB1,2.7

z DB Number, : decimal number (0..65535) followed by comma (,). It is used in data


block (DB) addressing only. For other types of memory, this field must be omitted.
z Address : decimal number (0..65535)
z Bit Number : decimal number (0..7)

Following table shows the list of devices which can be referenced in XPanel database.

Symbol Description Word Notation Bit Notation Type Access

PI Peripheral Input PI001 PI001.7 Analog/Digital R/W


I Input I002 I002.7 Analog/Digital R/W
Q Output Q003 Q003.7 Analog/Digital R/W
M Memory M004 M004.7 Analog/Digital R/W
DB Data Block DB01,01 DB01,01.7 Analog/Digital R/W
T Timer T005 - Analog R
C Counter C006 - Analog R

The device T and C (timer and counter) must be defined as UBCD16 typed TAG for normal
data manipulation. Following picture shows the data type configuration window of XPanel
database.

SIEMENS S7 Ethernet - 5
4. Communication Cable Wiring
(1) Connect through the Ethernet HUB

(2) Direct connection

SIEMENS S7 Ethernet - 6

You might also like