S7 PLC Overload (!?)

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
2 posts • Page 1 of 1
a.decelis
Posts:30
Joined: Thu Jun 25, 2015 6:42 pm

S7 PLC Overload (!?)

Post by a.decelis »

Hi,

working with this redundant project under WinCC OA 3.14 Patch 2, Windows64.
Only ONE S7 manager configured, managing 4 S7 PLCs (2xS7_1500 + 2xS7_300). Getting log errors with one of them (an S7 1500).

I get a log SEVERE error, "56/s7, Discarding NUM write requests du e to overload of device YYY plc 1".

This happens after dpSetting 220 local dpes all at once (within a single dpSet).
Each DPE has a different output address to this S7 1500 PLC.
Half of the dpes have int16 datacomponent addresses assigned, whilst the other half, are bool Datacomponent.

These writes are being done periodically, -currently, each minute-, with different values each time.

The amount 'NUM' of discarded writes grew over time, and kep gotting much higher than the amount of single-time written dpes. For example, after several write-cycles, the value reached 1201.


To overcome the situation, I have added this three settings to the s7 section of the config:

Code: Select all

[s7]
MaxWriteBlockLen = 230  # group writes
MaxRequestQueueSize = 300 # default value is 200
maxOutputQueueSize = 4000 # default value, 2739, seems to be too small after changing the two previous parameters
The error repeated again, with a lower number of "discards" (from 100 discards to 1).
After incrementing MaxRequestQueueSize to 400, the error appears no more.

I would like to know why this happened and why did it stop happening.

As the documentation reads, the maximum value for MaxRequestQueueSize would be 1000. In the future, I may need to synchronously write more than 220 addresses, and I am afraid the one thousand limit could become insufficient.

Could it help to add another S7 manager and migrate those addresses (distrib) to that second driver?

Side note: I have looked atthe _S7_Conn-type plc-DP LastError-value (with PARA, and for every configuration I have tried). Everytime I saw 0, despite the error logs.
If an error is being reflected here, the value is getting overwritten too fast to be seen.

mkerk
Posts:75
Joined: Wed Oct 20, 2010 12:25 pm

Re: S7 PLC Overload (!?)

Post by mkerk »

Hello,

First of all I want to clarify some config-entries :

MaxWriteBlockLen: (default is 0 ) defines the maximum number of tags in a write-request block. Every write request (dpSet) is immediately entered in the write queue. If the value of this entry is greater than zero, the driver attempts to combine all write requests up to the maximum length into one block. However, this only works if the addresses are all in the same datablock (or merker) AND/OR there are NO gaps between these addresses. Only when such a block is full, it is entered in the write queue.
that means If you make a dpSet with 220 DPE´s and the value of MaxWriteBlockLen is 230, than it doesn´t mean that only one Block is send to the PLC!! This depends on how these DPE´s are grouped. In worst case 220 Write-requests will be send to the PLC. (check example in the WinCC OA documentation).

MaxWriteGroupSize (default 16): Maximum size of single write request, that can be grouped together in one multiple write request, when processing request from the write request queue.
the driver checks constantly (driver cycle) whether there are Write requests. As soon as there are any, maximum " MaxWriteGroupSize " ( default 16) writerequests will be sent to the PLC at once. If there are more in the queue, the rest will be processed at the next driver cycle, which should be done within max. 100 ms.
If you make this entry bigger, the queue should be processed faster.

MaxRequestQueueSize: defines the maximum number of internal write blocks and read blocks in the write / read queue (each queue can have this size). In Write direction This is the maximum number of a write-request block( according to MaxWriteBlockLen).

MaxAGLinkQueueSize: Here, the pending requests to the PLC are evaluated and must not be more than this queue size (ie Read + Write). Default value is 1. You can definitely set it to a higher value (e.g. 8)

maxOutputQueueSize : should not have any influence on the write-requests.

StatCheckInterval: the size of Read-, Write- and AGLink queue size are directly written on the internal DPE´s .State.ReadQueue and .State.AGLinkQueue. these DPE´s are updated in an interval defined by the entry "StatCheckInterval" (default 20 sec)


I would recommend to do the following:
1- Check in your application how many dpSet´s on DPE´s with output-addresses are really executed. Maybe there are other scripts/panels running and these are also making dpSet´s fast/periodically!!
2- Check how the DPE´s (addresses on the PLC) in the write-request are grouped (see above for config entry MaxWriteBlockLen).
3- increase values for MaxWriteGroupSize and MaxAGLinkQueueSize
4- Maybe activate the DebugFlag –dbg 26 (Debug outputs of read/write data traffic at "single query" and "write"requests.) on the S7-driver and check the logouputs.
5- You can also monitor the size of Read-, Write- and AGLink queue size directly on the internal DPE´s .State.ReadQueue and .State.AGLinkQueue. Maybe adapt the value of the config-entry StatCheckInterval
6- Check the CPU/RAM load on the WinCC OA server (where the driver is running)
7- Have you maybe changed the value of the config-entry UseConnections to 1 Or UseOneConnection to “Y”?

BR,
Mousser.

2 posts • Page 1 of 1