Machine Towerlight (Green,Red,Yellow) light ON State Time Duration Measurement

Hi Everyone,

Need your guide and suggestion.

Actually, I want to record the ON state duration of our packing machines towerlight status (Green, Red, Yellow). Like when the batch started (success count > 200), how much time (in minutes) the machine has spent on the Green Light (running state), on the Red Light (fault state) and on the Yellow light (standby/stopped by the operator state).

As, this duration will help me in the OEE calculation.

Previously, I tried the tag event script (on value change) where a while loop runs and increment a 'Running_Duration' tag for every minutes passed. This works well when I applied this for Green light boolean state, but when I do this for other two lights. The script keeps running and not stopping. After studying from the forum found that loops are not a good idea to run in the tag event script.

So kindly guide me to accomplish this task :slight_smile:

You have this question open in multiple topics, and with answers. It is against this forum's rules to do that. At least, not without linking to the other topics.

This question is different from my previous post.

Here I am asking for people's suggestions and there experience if they have gone through same scenarios or done something like this.

It seems like it would be simpler to put a timer in the PLC program, and then track the timer's accumulated value in ignition with an OPC tag.

1 Like