DpConnect

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
6 posts • Page 1 of 1
cofelyhoogland
Posts:13
Joined: Mon May 21, 2012 9:39 am

DpConnect

Post by cofelyhoogland »

By using the DpConnect function (dpConnect("CallBack", DPe) ;we get the next Error in the log:

SEVERE, 114, Values were discarded, CCTV.ctl function has 200 pending runs --> DISCARDING !

What does this mean?

RudiKreiner
Posts:198
Joined: Mon May 16, 2011 2:10 pm

Re: DpConnect

Post by RudiKreiner »

"200 pending runs" means that that the DPe is changing very often and the work function cannot keep up with the changes. The callback function for an event does not get started till the one for the previous event has completed. It could also be that your callback function is hanging somewhere which blocks this up too, of course.

fmulder
Posts:330
Joined: Wed Feb 03, 2010 9:46 am

Re: DpConnect

Post by fmulder »

In general it means that the value that you are connected to, changes more than 200 times/second.

It could be :
  • Your callback does a dpSet() to the value that you are connected to
  • Your driver is very fast and you forgot old/new comparison
  • You're using a dpQueryConnectSingle() and forgot the buffer time.
The example below is a classic

Good luck

share the fun
Frenk Mulder

Code: Select all

dpConnect( "Callback, "myValue" );

void Callback( string strDP, int iValue )
{
  dpSet( "myValue", iValue + 1 );
}

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: DpConnect

Post by leoknipp »

Hello,

the number of value changes / second is not an indicator for the number of pending runs.
The number of pending runs increases when the execution time for the work function is longer than the update rate of values changes (starting the work function).

Please check how long it takes to execute the work function and how often it is called.
Also the functionality of the work function needs to be checked. Maybe functions are used which can take a lot of time for the execution, e.g. dpGet(), dpGetPeriod((), dpQuery() ....
You also have to look if data is requested twice, e.g doing a dpGet() on a dp element which is also at the dpConnect() function.



Best Regards
Leopold Knipp
Senior Support Specialist

cofelyhoogland
Posts:13
Joined: Mon May 21, 2012 9:39 am

Re: DpConnect

Post by cofelyhoogland »

Gentlemen,

Thanks for the support. The problem is solved.

In the working function was a function delay() active.

The delay-timer was to large Because the driver is very fast there were to many pending runs..

Best regards

HM Hoogland

fmulder
Posts:330
Joined: Wed Feb 03, 2010 9:46 am

Re: DpConnect

Post by fmulder »

"The delay-timer was to large"

I can not imagine why your callback would contain a delay !? :angry:

Your callback should always be as short as possible. When you have more 'work' to do then:

1) place a request in a queue (exampple: add a value to a dyn-string)
2) Use another thread to do the actual work

A callback should surely never contain a delay !!!!!!

Share the fun
Frenk

6 posts • Page 1 of 1