Communication Driver MPI

Driver for serial communication with Siemens devices using MPI interfaces

MPI - Driver Version 1.30
Doc. Revision G – July 28, 2011

1 Introduction

The MPI driver enables communication between Studio system and some of the Siemens devices using PRODAVE S7 software library, in accordance with the characteristics covered in this document.

This document contains 8 parts, as follows:

[Note] This document presumes that the user has read the chapter Driver Configuration of the Studio's Technical reference manual.

2 General Characteristics

2.1 Device Characteristics

[Tip] Refers to section 2.4 to see the Equipment used in the standard conformance tests for this driver.

2.2 Link Characteristics

2.3 Driver Characteristics

[Tip] Please refer to section 2.4 to see the Operating System used in the conformance tests for this driver.

The driver is composed of the following files:

Supported Registers:

Register TypeLengthWriteReadBitIntegerFloat
M (Flags)2 bytes
T (Timers)2 bytes--
Z (Counters)2 bytes
E (Inputs)1 byte
A (Outputs)1 byte
DB (Data Blocks)2 bytes

[Caution] Bit writing is enabled in the Standard Driver Sheets only when using the Write On Tag Change command. In other words, it's not allowed execute bit writing by the command Write Trigger from the Studio Standard Driver Sheets.

2.4 Information about conformance testing

3 Installation

3.1 Installing the Driver

When you install the Studio v3.0 or higher, the communication drivers are already installed. You need now to select the driver at the applications where it will be used.

The steps to select the driver inside an application are:

  1. Execute the Studio and select the proper application.
  2. Select the menu Insert + Driver...
  3. In the column Available Drivers, select the MPI Driver and push the button Select >> (the driver MPI must appear in the column Selected Drivers).
  4. Press OK.

[Screenshot Description: A dialog box titled "Communication Drivers" is displayed, showing a list of available drivers in the left pane (including MPI) and a section for "Selected drivers". Buttons like "Select >>" and ">> Remove" are visible.]

3.2 Other software requirements

It is necessary to install Prodave S7 software in the PC to enable the communication between the host and the Device. To download the custom program to the device, it is necessary to install one of the Siemens programmer software, for example, Step 7. Please see the Step 7 and Prodave S7 documentation about the procedure to install their software.

It's necessary to install the PRODAVE software from Siemens to execute this driver. The Studio MPI driver uses the PRODAVE libraries to exchange data with the PLCs by MPI protocol.

4 Driver Configuration

After the driver is installed and selected in the Studio (see section 3.1), you should proceed to the driver configuration. The driver configuration is two parts:

4.1 Settings - Communication Parameters

These parameters are valid for all driver worksheets configured in the system. To open the window for configuring the Communication parameters, follow these steps:

  1. In the Workspace of the Studio environment, select the Comm table.
  2. Expand the folder Drivers and select the subfolder MPI.
  3. Right click on the MPI subfolder and select the option Settings.

[Screenshot Description: A "Project" workspace view is shown, with a tree structure including "Drivers" > "MPI". A context menu appears with options like "Insert", "Settings", and "Help".]

When selecting the Settings, there is the following dialog to configure:

[Screenshot Description: A dialog box titled "MPI: Communication Parameters" is displayed with fields for COM, Baud Rate, Data Bits, Stop Bits, Parity, Station, 0-Write Item 1-Write Group, 0-Prodave Full 1-Mini Prodave, and Segment:Slot:Rack. An "Advanced..." button is also present.]

ParameterDefault ValueValid valuesDescription
0-Write Item / 1-Write Item01 or 2Specify write item or write group when write trigger is triggered
Segment:Slot:Rack0:2:0See the Prodave S7 manualParameters used to initialize the MPI board.
0-Prodave Full 1 - Mini Prodave00 or 1Prodave S7 type
MPI Stations0-Specify the stations that will exchange information with the driver's worksheets. You can type a single station(3) or a group(3-7) and both must be between semicolon. Example: 1;3-7;20

[Note] The PRODAVE software MUST be configured with the SAME values defined in the Communication Parameters window of the MPI driver.

4.2 Driver Worksheet

It is possible to configure many driver worksheets, each one will be composed of a Header and Body. To create a new driver worksheet, follow these steps:

  1. In the Workspace of the Studio environment, select the table Comm.
  2. Expand the folder Drivers and select the subfolder MPI.
  3. Right click on the MPI subfolder and select the option Insert.

[Tip] To optimize communication and ensure better performance for the system, it is important to tie the tags in different driver sheets according to the events that must trigger the communication of each group of tags and the periodicity for which each group of tags must be written or read. In addition, it is recommended to configure the addresses of communication in sequential blocks.

When creating a communication table, you have the following window:

[Screenshot Description: A dialog box titled "Mpi001.dry" is shown, with fields for Description, Read Trigger, Read Status, Write Trigger, Write Status, Station, Header, Min, Max. It also contains a table with columns for Tag Name, Address, Div, and Add, with sample data like Value[1], W1.]

All entries at the Driver Worksheet, exception by the Station, Header and Address are standard to all communication drivers. You should refer to Studio Communication Driver documentation about the configuration of the standard fields. This document describes the Station, Header and Address fields, which are specific to each communication driver.

4.3 Station and Header configuration

ParameterDefault ValueValid valuesDescription
Station-1-255PLC's Address.
HeaderDB2See next tableDefines the type of variable to be read or written from or to the device and the reference of the initial address.

The Header field defines the type of variables that will be read or written from or to the device. It complies with the syntax:

Header Address Mapping

Header Address
Byte Address Number
Byte Address NumberSiemens Address
Word Address Number
Byte 0Byte 0W0
Byte 1Byte 1W1
Byte 2Byte 2W2
Byte 3Byte 3W3
Byte 4Byte 4W4
Byte 5Byte 5W5
Byte 6Byte 6W6
Byte 7Byte 7W7
Byte 8Byte 8W8
Byte 9Byte 9W9
Byte 10Byte 10W10
Byte 11Byte 11

Information regarding the parameter “Header”

TypeSample of syntaxValid range of initial AddressComment
FlagsM:1:WVary according to the equipmentLogical Flags.
TimersT:2:WVary according to the equipmentTimer values.
CountersZ:10:WVary according to the equipmentCounter values
InputsE:5:WVary according to the equipmentPhysical input values
OutputsA:8:WVary according to the equipmentPhysical output values
Data BlocksDB2:1:WVary according to the equipmentData block Values, the number after “DB” (2) specify the data block number and the number after colon specify the word offset in the data block

4.4 Address Configuration

The body of the driver worksheet allows you to associate each tag to its respective address in the device. In the column Tag Name, you must type the tag from your application database. This tag will receive or send values from or to an address on the device. The address cells comply with the following syntax:

<Format><AddressOffset>.<Bit> (e.g.: W10.2)

Address on the DeviceSample of Addressing Configuration
Header Field
Address Field
M (Word 5 = Byte 5 / Byte 6)M:0:B
M:5:B
M:1:W
W5
W0
W2
M (Byte 5)M:0:B
M:5:B
M:1:W
B5
B0
B2
M (Byte 6)M:0:B
M:6:B
M:0:W
B6
B0
B3
DB5 (Word 2 = Byte 2 / Byte 3)DB5:0:B
DB5:2:B
DB5:0:W
W2
W0
W1
DB5 (Byte 2)DB5:0:B
DB5:2:B
DB5:0:W
B2
B0
B1
DB5 (Byte 3)DB5:0:B
DB5:3:B
DB5:1:W
B3
B0
B1
DB5 (Word 7 = Byte 7 / Byte 8)DB5:0:B
DB5:7:B
DB5:1:W
W7
W0
W3
DB5 (Byte 7)DB5:0:B
DB5:7:B
DB5:1:W
B7
B0
B3
DB5 (Byte 8)DB5:0:B
DB5:8:B
DB5:0:W
B8
B0
B4

[Caution] It's not allowed to configure in the same worksheet a range of addresses greater than the maximum block size (data buffer length) supported by the protocol: up to 1024 bytes in each Standard Driver Sheet.

4.5 Main Driver Sheet (MDS)

When the driver is inserted in the application, the MAIN DRIVER SHEET is automatically added to the driver folder.

[Screenshot Description: A "Project" workspace view is shown, with a tree structure including "Drivers" > "MPI", and a "MAIN DRIVER SHEET" listed under MPI.]

The MAIN DRIVER SHEET provides a simple way to associate Studio tags to addresses in the PLC. Most of the MAIN DRIVER SHEET entries are standard for any driver. Refer to Studio Technical Reference Manual about the configuration of the standard fields. The fields which require specific syntax for this driver are described below:

Station: PLC's Address (ID number)

I/O Address: Address of each register from the PLC. The syntax used in this field is described below:

Type: Register type (M=Flags, T=Timers, Z=Counters, E=Inputs, A=Outputs, DB=Data Blocks)

TypeGroup: Group number of the register type configured (only for Data-Block types);

Format: Defines the treatment of the value read/written from/to the device. The current support formats are: B=Byte, W=Word, DW=Double Word, F=Float, T=Timer

Address: Address of the register. This number ALWAYS refers to the Byte Address Number;

Bit: bit number (from 0 up to 15) from the word address. It's an optional parameter;

[Screenshot Description: A dialog box titled "MPI - MAIN DRIVER SHEET" is shown, with fields for Description, Read Completed, Read Status, Write Completed, Write Status, Min, Max. It also contains a table with columns for Tag Name, Station, I/O Address, Action, Scan, Div, Add, with sample data like Tag Name 'R_43128', Station '2', I/O Address 'M:W239'.]

5 Execution

When installing the driver, it is automatically selected to execute when you start-up the Runtime Environment. To verify if the driver is correctly enabled to start, use the menu option Project + Status..., and verify the task Driver Runtime.

[Screenshot Description: A dialog box titled "Project Status" is displayed, showing a list of "Execution Tasks" including "Driver Runtime", their current "Status" (e.g., Automatic), and "Startup" type. Buttons like "Start", "Stop", and "Startup..." are visible.]

6 Troubleshooting

After each attempt to communicate using this driver, the tag configured in the field Read Status or Write Status will receive the error code regarding the kind of failure that occurred. The error messages are:

Error CodeDescriptionPossible causesProcedure to solve
-15Timeout waiting start a message.- Disconnected cables
- PLC turned off, or in Stop or error mode
- Wrong Station number
- Wrong RTS/CTS control settings.
- Check the cable wiring
- Check the PLC state. It must be RUN
- Check the station number.
- Check the right configuration. See on the section 2.2 the different RTS/CTS valid configurations.
1Invalid Station- Station is not configured on settingsCheck the settings for the station that is being used
2Invalid Header- An invalid header was set on header field or header part of main driver sheet addressCheck the headers and its syntax to comply with that described previously on this documentation
3Invalid Address- An invalid type for an address was setCheck the valid types and operations
4Invalid Block Size- The block size exceeds 1024 bytesSplit the standard driver sheet that caused the error on more sheets
5Write operation not supported- Attempted to write on inputs, timers or counters headers.
- Attempted to use write trigger to write on Bits
Check headers for invalid write operations
10PRODAVE DLL load error- The PRODAVE DLL was not found on the system or its missing a dependencyCheck if PRODAVE is correctly installed
11PRODAVE DLL functions error- The PRODAVE DLL is not supplying the expected functionsCheck on the settings if the correct library is selected
12Function not supported by PRODAVE Mini- Attempt to read or write any header other than DB using the PRODAVE MiniCheck if PRODAVE is correctly installed
Check the headers
Check if the settings are correct

[Caution] Other error codes can be returned. The meaning of each one can be found in the PRODAVE S7 manual.

[Tip] The communication status can be verified by the output Window of the Studio's environment or by the Output Window. To set a log of events for Field Read Commands, Field Write Commands and Protocol Analyzer click with the right button of the mouse on the output window and chose the option setting to select these log events.

When you are not able to establish the communication with the PLC, first of all establish the communication between the PLC Programming Tool and the PLC. Very frequently the communication is not possible due to a hardware or cable problem, or due an error or lack of configuration at the PLC. Only after the communication between the PLC Programming Software and the PLC is working fine, you can test again the supervisory driver.

7 Application Sample

There is currently no Sample Application for this driver.

8 History of Versions

RevisionVersionByDateDescription of changes
A1.25Lourenco11-Dez-2000Version with the timer type
B1.26Roberto Vigiani Jr.11-Jan-2001Included Byte Offset
C1.27Eric Vigiani30-Sep-2002Included MAIN DRIVER SHEET
D1.28Leandro Coeli05-May-2005Fixed bug reading Timer register
Implemented Double Word
Implemented Unsigned
E1.29Diego Barros16-Jan-2006Fixed Bugs on DB reading
Fixed bugs in write operations of Type F
F1.30André Körbes27-May-2010Fixed bug with Main Driver Sheet and Double Word
Updated documentation and troubleshooting section
G1.30Andre Bastos28-Jul-2011Added support for outputs writing
Documentation review only. No changes in the driver

PDF preview unavailable. Download the PDF instead.

mpi Microsoft Word 2010 Microsoft Word 2010

Related Documents

Preview Siemens S7-1200 Transition Manual: From S7-200 to S7-1200
A comprehensive guide detailing the transition from Siemens S7-200 to the newer S7-1200 automation platform. Covers hardware, software, programming, communication, and HMI aspects.
Preview Siemens S7-200 SMART: Transmit and Receive (Freeport on RS485/RS232)
This document provides a comprehensive guide to using the Transmit (XMT) and Receive (RCV) instructions with the Siemens S7-200 SMART CPU for communication via RS485/RS232 ports in Freeport mode. It covers hardware setup, project integration, and operational details for enabling serial communication.
Preview Siemens SIMATIC S7-200 Programmable Controller System Manual
Comprehensive system manual for the Siemens SIMATIC S7-200 Micro PLC family, covering installation, programming with STEP 7-Micro/WIN, system features, and troubleshooting. Includes detailed instruction sets and configuration guidelines.
Preview SIMATIC S7-200 SMART System Manual
A comprehensive system manual detailing the SIMATIC S7-200 SMART series of micro-programmable logic controllers (Micro PLCs). It covers product overview, installation, programming, communication, and technical specifications for automation applications.
Preview Siemens SIMATIC S7 Profibus DP Installation and Handling Manual
This manual provides installation and handling instructions for the Siemens SIMATIC S7 Profibus DP driver for terminals in the Cimrex series. It covers system connection, driver installation, communication setup, addressing, HMI profiles, efficient communication, and error messages.
Preview Siemens Library of General Functions (LGF) for S7-1200/1500
This document details the Library of General Functions (LGF) for Siemens S7-1200/1500 controllers, covering its various blocks, applications, and usage within the TIA Portal environment. It includes information on hardware and software requirements, memory assignments, and detailed explanations of functions like bit logic, date/timer operations, math operations, and more.
Preview Guide for Migrating SIMATIC S7-300/S7-400 to SIMATIC S7-1500 and TIA Portal
Siemens provides a comprehensive guide for migrating SIMATIC S7-300 and S7-400 automation systems to the advanced SIMATIC S7-1500 controller generation and the TIA Portal software, covering planning, hardware, and software conversion.
Preview Siemens S7-1500/S7-1200: Secure Email Connections with STEP 7
A guide detailing how to configure Siemens SIMATIC S7-1500 and S7-1200 automation systems to send emails securely using the TMAIL_C instruction and STEP 7 software.