Tips & Troubleshooting

Connection to S7-300 cannot be established

If the S7 driver cannot establish a connection to the PLC, but the PLC is in the network and can be reached via a PING command, perform the following steps (appears often in a redundant WinCC OA system):

  1. Check the maximum number of allowed connections in the STEP7 environment (check also the number of reserved connections from the maximum number).

  2. The S7 driver in WinCC OA does not use the connections for the "S7 basis communication". For example:

    A S7-314 has 12 connections as a maximum. Reserved are: 1 connection for PG communication, 1 connection for OP communication and 8 connections for "S7 basis communication". I.e. only 2 for "Other connection" remain.

  3. If you need more connections for "Other connection", you have to reduce the 8 connections for basis communication. As a result the driver has more connection possibilities without fallback to PG or OP communication.

Note: In case of high data volume (a number of telegrams that could not be sent) and in case of a Simatic PLC, it is recommended to increase the value of the parameter "% of process used for communication" (defines how much of the CPU time is used for the communication) in the hardware configuration of Simatic CPU.

Slow communication to S7 300 PLCs

A bad data throughput can be the causal by using the PLC of the type S7 315-2 PN/DP, if in the PLC program not enough big FCs are passed by OB1. Thus the PLC has not much time to handle the communication. A PLC of the same type and similar loop time where are running a lot small FCs is communicating faster by the factor of 5-10.

The adapting of the PLC program with the few FCs in this order that the FCs are triggered by call up alarms (OB35) and not by OB1 may decrease the factor of the polling rate by 10.

This behavior has been to date observed only with CPUs with an onboard PN interface. That means that it is not sure that this problem is not the same using separate TCP/IP CPs.

It should be considered that there are differences in the communication handling in S7-300 and S7-400:

  • S7-300: All communication is handled at the end of OB1. Due to that there should be as few as possible FCs in OB1.

  • S7-400: each millisecond there is time reserved to do the communication

Configuration of a redundant S7400H device

Configuration of the automatic switch-over between device 1 and device 2 based on the PLC Tag, when the active PLC is changed to STOP state and thus the TCP connection to WinCC OA persists.

  1. The PLC Tag, which indicates whether device 1 ("0") or device 2 ("1) is active, must be available. Additionally, the option "Automatic-H" has to be selected. This settings have to be set during the configuration of the redundant devices (see Device Configuration).

  2. Set the config entry [s7] ReadOpState to 5 seconds or lower.

  3. Set the config entry [s7] AliveInterval to >= as the max. needed polling time of a block and >= 5 seconds.

Communication with ET200 S

To enable the communication between the S7 driver and a ET200 S a Interfacemodul IM151-8 PN/DP CPU is necessary. With this, the ET200 S can be configured as a S7 300.

Step7 Project Path

If the path to the Step7 project, which is used for S7 Alarming inside a WinCC OA project, changes, the link inside the WinCC OA project must be updated. To update the path, the value of the element ProjectName of the internal data point S7_Conn must be deleted manually. Afterwards the Step7 project must be imported again (see alarm configuration) to continue using the S7 Alarming.

Configuration settings in case of performance issues

Following steps may help to prevent or patch performance issues, especially for S7-300 PLCs.

Config entries

[s7]
maxAGLinkQueueSize = 8
maxReadRequestSize = 1
maxGap = xxx #only if data within a data block is wide apart

When using "poll on use" the config entry [s7] refreshPollBlocksOnUse = "Y" can also be set.

Data

Data which shall be read shall not be scattered within the PLC. If possible use communication data blocks for a optimized reading of data.

CP module

If possible the local CP module shall be used instead of an extra CP module, otherwise the communication is limited by the backplane bus.

Prioritized OCM communication

If available, enable the "Prioritized OCM communication" option of the PLC to separate the communication to HMI/SCADA from the cyclic program processing in the PLC.