How to calculate time period in Wonderware Intouch

Bilbo1161

Member
Join Date
Sep 2015
Location
UK
Posts
51
Hi
Can someone please help.
I know this could be done easier in the PLC, but we don't have access to the code, so want to be able to do this within WW.
I want to know how long a tag has been in a true state over a 24 hr period. This tag will go in and out of a true state numerous times throughout that period.
We dont run with an historian server or it could be done in a sql query, so I an trying to work with what I have.
Any help would be appreciated.
 
I would strongly advise it is best done in the PLC

If not you could create an event on tag change from 0 to 1 or 0 to 1 and write the timestamp to a file or similar. Even run a script to add 10 every 10 seconds if high but all of these solutions are poor
 
Make a tag to store elapsed time.
In a Condition script using "While True" add 1 to the tag every second (1000 mSec) that the tag you want to time = 1.
You can convert to minutes or hours with another tag in the same script.
At a certain hour of the day you can reset to = 0 using "TimeString".
 

Similar Topics

Hi everyone, This is my first time posting, so please forgive any omissions or mistakes. I am attempting to control the velocity of a stepper...
Replies
18
Views
1,004
Good morning, I have a question. I don't know much about ST yet I would like to calculate the average number of products per hour. how do I do...
Replies
22
Views
2,963
Can someone help me with this? I'm no good at SCL - virtually everything I've done so far has been ladder logic. The return value from the...
Replies
13
Views
1,107
I want to calculate the energy consumed from instantaneous power. Can this be done using the TOT block with timebase set to Hour?
Replies
2
Views
691
Hi everyone, I have to calculate the length in millimeters of a glass that enters a transport (I don't know the speed yet) through a barrier...
Replies
15
Views
3,464
Back
Top Bottom