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:
- The Settings or Communication parameters, it is only one configuration to the whole driver;
- The communication tables or Driver Worksheets, where the communication tags are defined. There are two types of communication tables: Standard Tables and MAIN DRIVER SHEET.
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:
- In the Workspace of the Studio environment, select the Comm table.
- Expand the folder Drivers and select the subfolder MPI.
- 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.]
Parameter | Default Value | Valid values | Description |
---|
0-Write Item / 1-Write Item | 0 | 1 or 2 | Specify write item or write group when write trigger is triggered |
Segment:Slot:Rack | 0:2:0 | See the Prodave S7 manual | Parameters used to initialize the MPI board. |
0-Prodave Full 1 - Mini Prodave | 0 | 0 or 1 | Prodave S7 type |
MPI Stations | 0 | - | 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:
- In the Workspace of the Studio environment, select the table Comm.
- Expand the folder Drivers and select the subfolder MPI.
- 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
Parameter | Default Value | Valid values | Description |
---|
Station | - | 1-255 | PLC's Address. |
Header | DB2 | See next table | Defines 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:
- To Flags, Timers, Counters, Inputs and Outputs:
<Type>:<AddressReference>:<AddressNumberType>
(e.g.: M:1:W) - To Data-Blocks:
<Type><TypeGroup>:<AddressReference>:<AddressNumberType>
(e.g.: DB2:1:W)
- 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);
- AddressReference: Initial Address (reference) of the group configured. This number ALWAYS refers to the Byte Address Number. See next table;
- AddressNumberType: W means that the AddressOffset typed in the Address column is the amount of Words (offset) which will be added to the AddressReference. B means that the AddressOffset typed in the Address column is the amount of Bytes (offset) which will be added to the AddressReference to compose the PLC address.
Header Address Mapping
Header Address Byte Address Number | Byte Address Number | Siemens Address Word Address Number |
---|
Byte 0 | Byte 0 | W0 |
Byte 1 | Byte 1 | W1 |
Byte 2 | Byte 2 | W2 |
Byte 3 | Byte 3 | W3 |
Byte 4 | Byte 4 | W4 |
Byte 5 | Byte 5 | W5 |
Byte 6 | Byte 6 | W6 |
Byte 7 | Byte 7 | W7 |
Byte 8 | Byte 8 | W8 |
Byte 9 | Byte 9 | W9 |
Byte 10 | Byte 10 | W10 |
Byte 11 | Byte 11 | |
Information regarding the parameter “Header”
Type | Sample of syntax | Valid range of initial Address | Comment |
---|
Flags | M:1:W | Vary according to the equipment | Logical Flags. |
Timers | T:2:W | Vary according to the equipment | Timer values. |
Counters | Z:10:W | Vary according to the equipment | Counter values |
Inputs | E:5:W | Vary according to the equipment | Physical input values |
Outputs | A:8:W | Vary according to the equipment | Physical output values |
Data Blocks | DB2:1:W | Vary according to the equipment | Data 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)
- Format: Defines the treatment of the value read/written from/to the device. The current supported formats are: B=Byte, W=Word, DW=Double Word, F=Float, T=Timer
- AddressOffset: This parameter is added to the AddressReference (configured in the Header field) to compose the address of the group configure in the Header field. The AddressNumberType configured in the Header will define if the AddressOffset is a Byte offset or a Word offset;
- Bit: bit number (from 0 up to 15) from the word address. It's an optional parameter;
Address on the Device | Sample 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:
- To Flags, Timers, Counters, Inputs and Outputs:
<Type>:<Format><Address>.<Bit>
(e.g.: M:W3) - To Data-Blocks:
<Type><TypeGroup>:<Format><Address>.<Bit>
(e.g.: DB5:W10)
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'.]