One way would be to record the time when the input comes on, then record the
time again when the input goes off and subtract start time from end time, store
the difference and display it on the HMI.
Another way would be to start a timer running when the input comes on, then
pull the time out of it when the input goes off and stop and reset the timer.
Thanks for your suggestion.
BTW,
I have to monitor an Oven door condition. How long it stays Open and Close condition.
In this scenario, I cant get the data when the operator open and close the door. So, without knowing that data, I couldn't set the PRESET Value if I'm using Timer.
When the door closes, move the values of the Real Time Clock to a set of tags. When the door opens move them again to a different set of tags. subtract the door closed from the door open tags (there will be a set of tags for hours, minutes and seconds) and move that value to a tag that is monitored. When the door closes again move the RTC values to the door closed tags and do the math again. Each time the door opens or closes just move the RTC values to the "open" tags or "closed" tags and do the math.
Karthiknd7 I have to monitor an Oven door condition. How long it stays Open and Close condition.
In this scenario, I cant get the data when the operator open and close the door.
Poet : Do I understand this correctly?
You have to monitor an oven door condition . . but you do not know when the door is
opened or closed?
If that is correct, then the first thing you need is a switch (or a proximity detector) on
the door so you know when it is closed. (And if it is not closed then you know it is open.)
Initialize and display the real time clock on the HMI. When the door goes from closed to
not closed (open) record the clock. When it closes again record the clock in another spot.
The difference is how long the door was open. Next time it opens record the time again
and the difference between the last time recorded and this one is how long the door
was closed.
Poet.