In order to communicate with an S7 PLC using
MPI either a Siemens MPI Adapter V5.1 or a Deltalogic MPI Adapter
(ACCON-MPI-Adapter) is required. This Adapter must be connected
to a serial interface of the PC running the S7 driver.
Dev
Specifies the number of the device for ACCON-AGLink.
The value can be between 1 and 128. For a new connection the next
valid value (the first entry in the data point _S7_Config
where the IP address is not set) is calculated automatically and
inserted into the field. This value can be changed manually.
Connection type
PG/OP/TSPP or other connection.
COMPort
Com port (COM1 ... COMx).
MPI
MPI address (range 0-31).
The MPI address and
the PLC address must not equal! Set the MPI address of the adapter.
For example, if the MPI address
of the PLC is "5" then it is not allowed to set the
address of the adapter also to "5".
Timeout
Timeout for the connection.
Note that you set the timeout high enough so that it is sufficient
when bigger blocks are queried from the PLC.
CAUTION
If the connection is broken because of a timeout
error in case of bigger queries, increase the timeout e.g. to
30 seconds and set the config entry checkPollReqPending = 1. Other
queries are of course blocked during this time. Thus, set the
useConnections = 3 or if enough connections are not available,
the bigger block can be divided into several poll groups with
the same interval.
NOTE
For the use of MPI the config entry mpiDevice has to be specified
in the config file. The entry defines the parameter for one serial
interface/adapter.
The configuration data
of S7 MPI is shown below. The address of the data in the PLC is
independent from whether the PLC is accessed via TCPIP or MPI.
The relevant configuration
information is shown in the following table:
Parameter |
Change Mode |
Range |
DPE (_S7_Config) |
Serial
Interface Index |
Selectable
in panel |
COM1…COMx |
IPAddress |
PLC MPI
address |
Selectable
in panel |
0-31 |
Slot |
Serial
baud rate |
Config
file |
38400 for
Siemens Adapter
115200 for Deltalogic Adapter |
|
Connection
type |
Selectable
in panel |
PG/OP/Other
512/513/514
(Bit 9 is used to determine if
it is a S7 MPI connection) |
ConnectionType |
Timeout |
Selectable
in panel |
Like S7
TCPIP |
Timeout |
PC address |
Config
file |
0-31 |
|
Single
master flag |
Hard coded |
1 |
|
Bus rate |
Hard coded |
187500 |
|
Highest
station address |
Hard coded |
31 |
|
Profile |
Hard coded |
MPI |
|
|
NOTE
Currently only one PLC per MPI Adapter is supported.
If more PLCs must be accessed, one adapter and one serial interface
are required per PLC.
NOTE
Redundant connection or redundant PLC modes
are not supported for a MPI device. Redundant WinCC OA
is only supported if the PLCs have more than 1 independent MPI
interfaces.
One access to the PLC
lasts approximately 50ms for the Deltalogic and 100ms for the
Siemens Adapter. Therefore, in the first case 20 and in the latter
10 requests per second are possible.
MPI Configuration
Example
To communicate with
a PLC, enter the following configuration configuration:
In
the config file, define an MPI device by adding:
[s7]
mpiDevice = "COM1" 15 38400
In this case a Siemens
Adapter will be connected to COM1 and 15 should be used as an
MPI address for the adapter. The
panel settings for the PLC are shown in the figure below. The
entry of the COM port must match the device defined in the config
file. The field MPI means the MPI address of the PLC.
Figure: S7 MPI Configuration
|