Siemens s7 Mpi Manual
Siemens s7 Mpi Manual
Siemens s7 Mpi Manual
Help
2012 Kepware Technologies
Table of Contents
Table of Contents
Overview
Device Setup
4
5
Modem Setup
Error Descriptions
9
9
Address Validation
Missing address
10
10
10
10
10
Serial Communications
COMn does not exist
10
11
11
11
11
11
12
12
12
12
13
Index
13
14
www. kepware.com
3
Siemens S7 MPI Driver Help
Help version 1.015
CONTENTS
Overview
What is the Siemens S7 MPI Driver?
Device Setup
How do I configure a device for use with this driver?
Data Types Description
What data types does this driver support?
Address Descriptions
How do I address a data location on a Siemens S7 300/400 device?
Error Descriptions
What error messages does the Siemens S7 MPI driver produce?
Overview
The Siemens S7 MPI Driver provides an easy and reliable way to connect Siemens S7 MPI devices to OPC Client
applications, including HMI, SCADA, Historian, MES, ERP and countless custom applications. It is intended for
use with Siemens S7 300 and 400 PLCs communicating via the MPI interface.
The Siemens S7 MPI serial port adapter handles MPI connectivity on the PC. This adapter may be obtained from
Siemens using the following part numbers:
Siemens Part: 6ES7-972-OCA23-OXAO Version 5.1
Siemens Part: 6ES7-972-OCA22-OXAO Version 5.0
This is just a partial list of the part numbers for more recent versions of this adapter. This driver has been developed to work with versions of the adapter that predate version 5.0 or 5.1.
The Siemens S7 MPI PC Adapter and the S7 MPI driver have been designed to allow more than one master device
to exist on the network. This allows a programming package to operate while this driver is running or while additional PCs are accessing the network.
www. kepware.com
Device Setup
Supported Devices
Siemens S7-300 Devices
Siemens S7-400 Devices
Communication Protocol
Multi Point Interface (MPI) S7-300/400 Communications Protocol
Ethernet Encapsulation
This driver supports Ethernet Encapsulation, which allows the driver to communicate with serial devices
attached to an Ethernet network using a terminal server (such as the NetSLX). It may be invoked through the
Communications dialog in Channel Properties. For more information, refer to the OPC server's help documentation.
www. kepware.com
Modem Setup
This driver supports modem functionality. For more information, please refer to the topic "Modem Support" in the
OPC Server Help documentation.
www. kepware.com
Description
Boolean
BOOL
Byte
Byte
Char
Char
Word
Word
Short
INT
BCD
Word
Value range is 0-9999. Behavior is undefined for values beyond this range.
DWord
DWORD
Long
DINT
LBCD
DWORD
REAL
www. kepware.com
STRING
7
S7-300 & S7-400 Address Descriptions
The default data types for dynamically defined tags are shown in bold.
Address Type
Range
Data Type
Access
Discrete Inputs
I00000.b-I65535.b
.b is Bit Number 0-7
Boolean
Read/Write
Discrete Inputs
IB00000-IB65535
Read/Write
Discrete Inputs
IW00000-IW65535
Read/Write
Discrete Inputs
ID00000-ID65535
Read/Write
Discrete Inputs
E00000.b-E65535.b
.b is Bit Number 0-7
Boolean
Read/Write
Discrete Inputs
EB00000-EB65535
Read/Write
Discrete Inputs
EW00000-EW65535
Read/Write
Discrete Inputs
ED00000-ED65535
Read/Write
Q00000.b-Q65535.b
.b is Bit Number 0-7
Boolean
Read/Write
Discrete Outputs
QB00000-QB65535
Read/Write
Discrete Outputs
QW00000-QW65535
Read/Write
Discrete Outputs
QD00000-QD65535
Read/Write
Discrete Outputs
A00000.b-A65535.b
.b is Bit Number 0-7
Boolean
Read/Write
Discrete Outputs
AB00000-AB65535
Read/Write
Discrete Outputs
AW00000-AW65535
Read/Write
Discrete Outputs
AD00000-AD65535
Read/Write
F00000.b-F65535.b
.b is Bit Number 0-7
Boolean
Read/Write
Flag Memory
FB00000-FB65535
Read/Write
Flag Memory
FW00000-FW65535
Read/Write
Flag Memory
FD00000-FD65535
Read/Write
Flag Memory
M00000.b-M65535.b
.b is Bit Number 0-7
Boolean
Read/Write
Flag Memory
MB00000-MB65535
Read/Write
Flag Memory
MW00000-MW65535
Read/Write
Flag Memory
MD00000-MD65535
Read/Write
DB1-N.DBX00000.b-DBX65535.b
1-N is DB Block Number
.b is Bit Number 0-7
Boolean
Read/Write
Data Block
DB1-N.DBB00000-DBB65535
1-N is DB Block Number
Read/Write
Data Block
DB1-N.DBW00000-DBW65535
1-N is DB Block Number
Read/Write
Data Block
DB1-N.DBD00000-DBD65535
1-N is DB Block Number
Read/Write
T00000-T65535
DWord
Read Only
C00000-C65535
Read Only
Z00000-Z65535
BCD,Word, Short
Read Only
*Byte memory types (i.e. MB) support Strings. The syntax for strings is <address>.<length> where 0 < length
<= 212.
Note: The actual number of addresses of each type depends on the Siemens S7-300 or S7-400 device in use.
Each type does not necessarily support an address of 0 to 65535. For a list of all address ranges, refer to the
device's documentation. All offsets represent a byte starting location within the specified memory type.
Arrays
www. kepware.com
All memory types and subtypes support arrays, except for Boolean data types, timers and counters. The valid syntax for declaring an array is as shown below. If no rows are specified, a row count of 1 is assumed.
<address>[rows][cols]
For Word, Short, BCD and "UBCD" arrays, the base address + (rows * cols * 2) cannot exceed 65536. Keep in
mind that the elements of the array are words, located on a word boundary. For example, AW0[4] would return
AW0, AW2, AW4 and AW6.
For Float, DWord, Long, Long BCD, "KF" and "KG" arrays, the base address + (rows * cols * 4) cannot exceed
65536. Keep in mind that the elements of the array are DWords, located on a DWord boundary. For example,
AD0[4] will return AD0, AD4, AD8 and AD12.
For all arrays, the total number of bytes being requested cannot exceed the internal block size of 218 bytes.
Examples
1. To access bit 3 of Flag Memory F20, declare an address as follows:
F20.3
2. To access Data Block 5 as word memory at byte offset 30, declare an address as follows:
DB5.DBW30
3. To access Data Block 2 as Boolean at byte offset 20 and bit 7, declare an address as follows:
DB2.DBX20.7
4. To access Data Block 1 as byte memory at byte offset 10, declare an address as follows:
DB1.DBB10
5. To access Flag Memory F20 as a DWORD, declare an address as follows:
FD20
6. To access Input Memory I10 as a Word, declare an address as follows:
IW10
STRING Subtype
The STRING subtype follows the STEP 7 STRING data type definition. The syntax for the STRING subtype is
DBx.STRINGy.n where x is the Data Block, y is the Byte offset, and n is the maximum String length. If n is not
specified, the maximum String length will be 210 characters. String values read and written are stored at Byte offset y+2 in Data Block x. The first two bytes contain the "maximum string length (n)" and the "actual string
length". The "actual string length" gets updated with every write based on the string length of the string being
written.
y
y+1
y+2
y+3
y+4
...
y+2+n-1
''
''
''
...
''
Note: STRING Strings are NULL padded. If the maximum string length is 10 and 3 characters are written, characters 4-10 are set to NULL.
Caution: When modifying Word, Short, DWord, Long and Float types, remember that each address starts at a
byte offset within the device. Therefore, Words MW0 and MW1 overlap at byte 1. Writing to MW0 will also modify
the value held in MW1. Similarly, DWord, Long and Float types can also overlap. It is recommended that these
memory types be used so that overlapping does not occur. For example, when using DWords, use MD0, MD4,
MD8 and so on in order to prevent overlapping bytes.
www. kepware.com
9
Error Descriptions
The following error/warning messages may be generated. Click on the link for a description of the message.
Address Validation
Missing address
Device address '<address>' contains a syntax error
Address '<address>' is out of range for the specified device or register
Device address '<address>' is not supported by model '<model name>'
Data Type '<type>' is not valid for device address '<address>'
Device address '<address>' is Read Only
Serial Communications
COMn does not exist
Error opening COMn
COMn is in use by another application
Unable to set comm parameters on COMn
Communications error on '<channel name>' [<error mask>]
Address Validation
The following error/warning messages may be generated. Click on the link for a description of the message.
Address Validation
Missing address
Device address '<address>' contains a syntax error
Address '<address>' is out of range for the specified device or register
Device address '<address>' is not supported by model '<model name>'
Data Type '<type>' is not valid for device address '<address>'
Device address '<address>' is Read Only
Missing address
Error Type:
Warning
Possible Cause:
A tag address that has been specified statically has no length.
Solution:
Re-enter the address in the client application.
Possible Cause:
A tag address that has been specified statically via DDE contains one or more invalid characters.
Solution:
Re-enter the address in the client application.
www. kepware.com
10
Possible Cause:
A tag address that has been specified statically references a location that is beyond the range of supported locations for the device.
Solution:
Verify that the address is correct; if it is not, re-enter it in the client application.
Possible Cause:
A tag address that has been specified statically references a location that is valid for the communications protocol
but not supported by the target device.
Solution:
Verify that the address is correct; if it is not, re-enter it in the client application. Also verify that the selected
model name for the device is correct.
Possible Cause:
A tag address that has been specified statically has been assigned an invalid data type.
Solution:
Modify the requested data type in the client application.
Possible Cause:
A tag address that has been specified statically has a requested access mode that is not compatible with what the
device supports for that address.
Solution:
Change the access mode in the client application.
Serial Communications
The following error/warning messages may be generated. Click on the link for a description of the message.
Serial Communications
COMn does not exist
Error opening COMn
COMn is in use by another application
Unable to set comm parameters on COMn
Communications error on '<channel name>' [<error mask>]
Possible Cause:
www. kepware.com
11
The specified COM port is not present on the target computer.
Solution:
Verify that the proper COM port has been selected.
Possible Cause:
The specified COM port could not be opened due an internal hardware or software problem on the target computer.
Solution:
Verify that the COM port is functional and may be accessed by other Windows applications.
Possible Cause:
The serial port assigned to a device is being used by another application.
Solution:
Verify that the correct port has been assigned to the channel.
Possible Cause:
The serial parameters for the specified COM port are not valid.
Solution:
Verify the serial parameters and make any necessary changes.
Possible Cause:
1. The serial connection between the device and the Host PC is bad.
2. The communications parameters for the serial connection are incorrect.
Solution:
1. Verify the cabling between the PC and the device.
2. Verify that the specified communications parameters match those of the device.
www. kepware.com
12
Possible Cause:
1. The serial connection between the device and MPI adapter (or the MPI adapter and the Host PC) is broken.
2. The communications parameters for the serial connection are incorrect.
3. The named device may have been assigned an incorrect Network ID.
4. The response from the device took longer to receive than the amount of time specified in the "Request Timeout"
device setting.
Solution:
1. Verify the cabling between the device and MPI adapter (or the MPI adapter and PC).
2. Verify that the specified communications parameters match those of the device.
3. Verify that the Network ID given to the named device matches that of the actual device.
4. Increase the Request Timeout setting so that the entire response can be handled.
Possible Cause:
1. The serial connection between the device and the Host PC is broken.
2. The communications parameters for the serial connection are incorrect.
3. The named device may have been assigned an incorrect Network ID.
Solution:
1. Verify the cabling between the PC and the device.
2. Verify that the specified communications parameters match those of the device.
3. Verify that the Network ID given to the named device matches that of the actual device.
Possible Cause:
1. The serial connection between the device and MPI adapter (or the MPI adapter and the Host PC) is broken.
2. The communications parameters for the serial connection are incorrect.
3. The named device may have been assigned an incorrect Network ID.
Solution:
1. Verify the cabling between the device and MPI adapter (or the MPI adapter and PC).
2. Verify that the specified communications parameters match those of the device.
3. Verify that the Network ID given to the named device matches that of the actual device.
Possible Cause:
1. The serial connection between the device and MPI adapter (or the MPI adapter and the Host PC) is broken.
2. The communications parameters for the serial connection are incorrect.
3. The named device may have been assigned an incorrect Network ID.
Solution:
1. Verify the cabling between the device and MPI adapter (or the MPI adapter and PC).
2. Verify that the specified communications parameters match those of the device.
www. kepware.com
13
3. Verify that the Network ID given to the named device matches that of the actual device.
Possible Cause:
An attempt has been made to reference a block of memory that contains at least one nonexistent location in the
specified device.
Solution:
Verify that the tags assigned to addresses are within the specified range on the device and eliminate ones that reference invalid locations.
www. kepware.com
14
Index
A
Address '<address>' is out of range for the specified device or register
10
Address Descriptions
Address Descriptions:Arrays
Address Validation
B
Bad address in block '<start address>' to '<end address>' on device '<device name>.', the
block has been deactivated
13
Boolean
Byte
C
Cable Connections
11
10
11
12
D
Data Type '<type>' is not valid for device address '<address>'
Data Types Description
10
6
12
9
10
10
Device ID
Device Setup
13
11
www. kepware.com
15
DWord
E
Error Descriptions
11
F
Float
L
Long
M
Master ID
Missing address
Modem Setup
N
Network
O
Overview
R
Request timeout on MPI node <device id>
www. kepware.com
12
16
S
Serial Communications
10
Short
String
U
Unable to set comm parameters on COMn
11
12
W
Word
www. kepware.com