Support Forums
Polling Driver

Mel, below is a response from one of our developers, I hope this helps:

Assumed situation: An alarm tag tied to a driver tag. When the driver encounters an error, its Value becomes non-zero and the alarm activates immediately. Meanwhile, the driver tries again and succeeds and clears the alarm. The alarm activation is thus considered a nuisance.

The only solution I can think of is to configure the alarm with an On Delay of some number of seconds.

Mel, below is a response from one of our developers, I hope this helps: _Assumed situation: An alarm tag tied to a driver tag. When the driver encounters an error, its Value becomes non-zero and the alarm activates immediately. Meanwhile, the driver tries again and succeeds and clears the alarm. The alarm activation is thus considered a nuisance._ _The only solution I can think of is to configure the alarm with an On Delay of some number of seconds._

Trihedral Engineering Ltd.

What I do is set my alarm tag to look at the last polled time of the device and alarm if it exceeds 5 or more real poll cycles. Set an alarm tags to be the child of the poll driver. Make the alarm trigger on an expression -

(Today()*86400) + Now(60) - [*Driver]\LastTime

I'll leave you to see if you can figure how it works, knowing that [*Driver\LastTime returns the time stamp of the last succesful poll in seconds.

So, if it takes two minutes to poll the cycle (from site 1 back to site 1), then make your alarm setpoint 600 seconds and the function to be greater than that.

So, if as soon as more than 10 minutes go by without a good poll, you will get an alarm. For me, that works better than watching retries or error codes.

What I do is set my alarm tag to look at the last polled time of the device and alarm if it exceeds 5 or more real poll cycles. Set an alarm tags to be the child of the poll driver. Make the alarm trigger on an expression - ```` (Today()*86400) + Now(60) - [*Driver]\LastTime ```` I'll leave you to see if you can figure how it works, knowing that [*Driver\LastTime returns the time stamp of the last succesful poll in seconds. So, if it takes two minutes to poll the cycle (from site 1 back to site 1), then make your alarm setpoint 600 seconds and the function to be greater than that. So, if as soon as more than 10 minutes go by without a good poll, you will get an alarm. For me, that works better than watching retries or error codes.

Doug Spurrell

edited Mar 23 '17 at 3:31 pm

Correcting a typo in Doug's expression. The first part should be:
today()*86400
That returns the number of seconds from Jan 1 1970 until midnight last night.
The Now(60) part is good. That gives you the number of seconds from midnight into today, updating once each minute on the minute. Added together, you have a time stamp for the most recent minute mark. Subtracting the time stamp of the last successful poll gives you the time since that poll.

Correcting a typo in Doug's expression. The first part should be: today()*86400 That returns the number of seconds from Jan 1 1970 until midnight last night. The Now(60) part is good. That gives you the number of seconds from midnight into today, updating once each minute on the minute. Added together, you have a time stamp for the most recent minute mark. Subtracting the time stamp of the last successful poll gives you the time since that poll.

Sorry, no. It's very dynamic. The Polled Station drawing method shows the current one in the group, no matter which poll driver you draw it for. But even that can change.

Basically, it starts out doing them in the order of the site in the group. However, let's say it is polling Site 1 and you have three retries with 60 seconds between tries. In that 60 seconds, it could quite possibly poll Sites 2 and 3 before going back to Site 1. So the polled station could actually show 3 but at the time be doing a re-try on site 1.

If you draw the site icons in order, it's one of the reasons why the black circles can seem to skip around. With ethernet, it gets worse because it can actually try several sites at once if there are re-tries since the TCP traffic doesn't need to be serialized.

Sorry, no. It's very dynamic. The Polled Station drawing method shows the current one in the group, no matter which poll driver you draw it for. But even that can change. Basically, it starts out doing them in the order of the site in the group. However, let's say it is polling Site 1 and you have three retries with 60 seconds between tries. In that 60 seconds, it could quite possibly poll Sites 2 and 3 before going back to Site 1. So the polled station could actually show 3 but at the time be doing a re-try on site 1. If you draw the site icons in order, it's one of the reasons why the black circles can seem to skip around. With ethernet, it gets worse because it can actually try several sites at once if there are re-tries since the TCP traffic doesn't need to be serialized.

Doug Spurrell

It seemed best to create a root folder calculation tag called TimeNowSecs with the expression " Today() 3600 24 + Now(1) "

And then a Calculation tag under each Polling Driver with the expression

" ( [TimeNowSecs] - ..\LastTime ) / 60 "

It seemed best to create a root folder calculation tag called TimeNowSecs with the expression " Today() * 3600 * 24 + Now(1) " And then a Calculation tag under each Polling Driver with the expression " ( [TimeNowSecs] - ..\LastTime ) / 60 "

Century Control Systems, Inc. www.centurycontrolsystems-inc.com

edited Oct 27 '17 at 5:14 pm
352
6
4
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft