How do I capture elapsed run time?
How do I capture elapsed run time?
(OP)
Hi all,
I am using RSlogix 500 programming software. I am using the Micrologix 1200 controller with a micro 300 panelview. Is there an easy way to program this so I can view elapsed run time of multiple motors and write this back to be displayed on the panelview. The controller I am using has a RTC onboard. I have no problem triggering events with the real time clock I just want to be able to use the above devices and not have to simply add an hour meter to my project. Can this be done. Thanks for your help
I am using RSlogix 500 programming software. I am using the Micrologix 1200 controller with a micro 300 panelview. Is there an easy way to program this so I can view elapsed run time of multiple motors and write this back to be displayed on the panelview. The controller I am using has a RTC onboard. I have no problem triggering events with the real time clock I just want to be able to use the above devices and not have to simply add an hour meter to my project. Can this be done. Thanks for your help





RE: How do I capture elapsed run time?
RE: How do I capture elapsed run time?
RE: How do I capture elapsed run time?
a possible solution would be to use a retentive timer with a preset of one hour, then have the done bit index a counter and reset the timer, the counter value would represent hours of run time for your motors. If you require greater resolution than whole hours, you would have to set up a minute timer, that indexed a minute counter, which would then index an hour counter.
Ken
RE: How do I capture elapsed run time?
I still have a bit of a problem. How do I get the Hours to read as an Integer so i can view them on the panel view display.
RE: How do I capture elapsed run time?
The simple way, is use the RTC:0.sec/0 which is the LSB for seconds. Each time it changes produce a pulse. This is a reliable 1 second pulse. You could also use S:4 if you don't have an RTC. If S:4 > 10000, Set pulse bit, then S:4 = S:4-10000.
These methods produce a reliable 1 second pulse, which will not be effected by scan times.
When the motor is running, increment an integer. If it is greater than 3600, reset to 0 and increment the hours integer. Or just use a Long integer with accumulated seconds. Scale in the panelview. The panelview will scale integer to floating point.
Hope this helps.