Usage of blocking time parameter

Find and share HowTos to various installations / configurations!
Search

Post Reply
3 posts • Page 1 of 1
denisisakovic
Posts: 23
Joined: Fri May 08, 2020 10:32 am

Usage of blocking time parameter

Post by denisisakovic »

Hello dear community,
I need your help in understanding the right usage of the parameter "blockingTime" while using the function dpConnectQuerySingle(). Recently I made a CTRL script that monitors several thousand DPE's and is triggered to do some kind of logging if there is a change in one DPE (or more). So in some cases I get the system log message "200 pending runs -> DISCARDING", which is probably caused by instantaneous change of more than 200 elements. I increased the ctrlMaxPendings parameter to 1000, and still got the error message.
Then I used the parameter blockingTime, set it to 350[ms] and that solved the problem.
So my question is, does the query waits with the blocking time and collects the data in that time period, and then when the callback function is executed, the collected data is put inside the dyn_dyn_anytype result, so that the callback function is executed only once and not several times?

User avatar
adaneau
Posts: 310
Joined: Tue Feb 21, 2012 9:49 am

Re: Usage of blocking time parameter

Post by adaneau »

Hey,

You are fully correct about blocking time. Idea is that the queryconnect will wait for the defined blocking time without triggering callback. At the end of the blocking time, every event which happened will be send in the same matrix of results. This will indeed reduce the amount of callbacks, but definitely increase the processing time as your for loop will be bigger.

User avatar
leoknipp
Posts: 2926
Joined: Tue Aug 24, 2010 7:28 pm

Re: Usage of blocking time parameter

Post by leoknipp »

If you get the log message that more than 1000 pendings runs are existing without using the blocking time you should check the work function of the query or the query statement.
A pending run occurs if executing the work function takes longer than the interval of triggering the work functions.

Please take into account that connecting to a lot of DP elements may cause performance issues in the Event Manager who needs to provide data for the query connect.
You have to check the CPU consumption of the WinCC OA processes to ensure that the system is running in a stable condition.

Best Regards
Leopold Knipp
Senior Support Specialist

Post Reply
3 posts • Page 1 of 1