SIEMENS S7 MPI 1. Overview This driver provides the software interface and communication protocol between XPanel and Siemens Simatic S7 PLCs via MPI protocol. It supports the following families of Siemens Simatic S7 system. z
S7-200/300/400
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 MPI’ After selecting the ‘OK’ button of previous step, ‘Serial Communication Configuration’ dialog box will be popped up as shown in following picture.
SIEMENS S7 MPI - 1
In this window, select the ‘Device Type’ as ‘SIEMENS S7 MPI’ and appropriate communication parameters. Those parameters must be matched with the PLC. z
Local ID Give a station (node) number of XPanel. This number does not duplicated with the one of PLC. The node number can be the integer value between 0 and 126.
z
Network Opt. Designate the maximum station (node) number of connected network. This can be one of following numbers. If the XPanel is the unique master in network, the integer value of (1,000+maximum station number) should be designated.
15, 31, 63, 126 (when the XPanel is not the unique master in network) or 1015, 1031, 1063, 1126 (when the Xpanel is the unique master in network)
(3) Create a station Move to the ‘Station’ tab of ‘Serial Communication Configuration’ dialog box. In this dialog box, all the connected PLC stations can be configured and registered to the XPanel. Each field can be configured with following rules. SIEMENS S7 MPI - 2
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 MPI’. (No other type can be selected.)
z
Network ID This field has no meaning in this driver. (ignored in runtime)
z
Station No. Specify a decimal number between 0 and 126.
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. SIEMENS S7 MPI - 3
Double Word Data
1234ABCDh
ABCD1234h
INT32 / UINT32 / BCD32 / UBCD32 / FLOAT type of TAG values will be influenced by this option. z
Using Checksum This field has no effect.
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 MPI - 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 MPI - 5
4. Communication Cable Wiring [SSW7 Adapter] The cable supplied with the adapter can be directly connected to the XPanel without any change. If there is some need to make the cable by yourself, refer to the following picture.
SIEMENS S7 MPI - 6