PaulB
Guest
P
There is a question to all audience. There is Allen Bradley SLC 05/5
I need to store time how long event, let say some fault, last. It would never last more then 8 hours = 8*60*60=28800 sec (if it more it will reset at end of the shift and start over). I can make timer TON with base time 1sec. to start timing when event starts, and use value in the ACC register. I need convert this value to Hours, minutes and seconds and store them in the words N7:0, N7:1, N7:2. Is anybody knows how to do this? There are probably some COMPUTE instructions involved.
Other idea is to use register S:4 – free running clock. Let say use S:4/2 (every 40ms) and start counter CTU and count 25 pulses of S:4/2. It will be equal to one sec. Then build cascade counters logic to count minutes and hours and move values of the ACC registers to the N7:0, N7:1, and N7:2.
I am wondering what would be fewer load on PLC. Right now I have average scan time 20ms and max scan time 30ms.
Thank you.
I need to store time how long event, let say some fault, last. It would never last more then 8 hours = 8*60*60=28800 sec (if it more it will reset at end of the shift and start over). I can make timer TON with base time 1sec. to start timing when event starts, and use value in the ACC register. I need convert this value to Hours, minutes and seconds and store them in the words N7:0, N7:1, N7:2. Is anybody knows how to do this? There are probably some COMPUTE instructions involved.
Other idea is to use register S:4 – free running clock. Let say use S:4/2 (every 40ms) and start counter CTU and count 25 pulses of S:4/2. It will be equal to one sec. Then build cascade counters logic to count minutes and hours and move values of the ACC registers to the N7:0, N7:1, and N7:2.
I am wondering what would be fewer load on PLC. Right now I have average scan time 20ms and max scan time 30ms.
Thank you.