Run hour meter

EMSSTC

Member
Join Date
Dec 2012
Location
Tyler
Posts
34
Hello all,

I have been tasked with moving a mechanical run hour meter of a pump motor to a panelview. I have a slc 5/04 and an allen bradley PV 600 keypad. I was thinking of using S4 to count and send the results to a floating decimal or integer file. I'm sure this has been done in the past, and there is probably a better way than what I am thinking. Any suggestions?

I was also thinking of somehow taking a snapshot of the time it starts and the time it stops. But I don't know what to do if it runs over an hour (ie 2:55 to 3:10)

Any help would be appreiciated.
EMSSTC
 
Last edited:
I would use a "RTO" ( retentive timer on) to count up.

Some industries will not allow a hour meter that can be reset.
 
Thanks Mickey,

That sounds like a very easy fix. I knew there had to be an easier way than what I was thinking of.

EMSSTC
 
here's a hint

when the machine is running, start a 1 second timer that resets itself.
the timer drives a 60 count counter that drives a 60 minute counter that drives a 24 count hour clock that drives a day clock.

when the counters get done they increment the next counter and reset themselves.

the display would be a number with all these values combined.

just a quick answer before i had to go to the line

regards,
james
 
How accurate do you want to be?

If you use a resetting timer and you reset every minute and you have a 10mSec scan time then at the end of the day you'll loose up to 43 seconds a day. If you use a float to accumulate hours then you'll loose precision with every single addition unless you select the accumulation interval carefully. If you used a one second timer you could find that your time totalizer is off by a half hour or more every day. That's a problem.

The solution is to use a timer that is never reset and use hour fractions that are 1/2n, eg, 1/2, 1/4, 1/8, etc.

When a timer sets its DN bit it is always late. The timer period invariably expries sometime during the scan, but the timer is a computer instruction that updates only when it is executed. When you use a resetting timer and the time period expires the timer is reset on the subsequent scan. Then on the third scan it is restarted. If you have a 10 millisecond scan you will loose whatever fraction of the scan time elapsed since the time period expired and when the timer instruction was next executed, plus the next two scans. This could be up to 30mSec. Over the course of a day all these skipped time interval add up to something significant. By never resetting the timer and subtracting an interval from the timers ACC we never disturb the time reference stored in the LSB of timer word 0, and since we never stop and restart it, we don't loose the extra scan time.

Because IEEE floating point numbers (like what your PLC uses) use binary to encode the fractional part of the number decimal fractions such as 1/10, 1/100, etc cannot be exactly represented. This leads to a significant loss of resolution and accuracy after a long string successive additions like you will have in an hour totalizer, unless you use fractions that are 1 over a power of 2.

This method will be as accurate as your PLCs time base is accurate and only integrates lost scan time into the total when the the motor is started/stopped.

TC04171301.jpg
 

Similar Topics

i need to display machine run time, i was looking for some canned logic for a run hour meter. rslogic 500 to pv 550.
Replies
10
Views
10,346
Hello..I am new to Plc.I have Mitsubishi Melsec Fx3Ga-40MR PLC controlling a machine for packing powder.Currently the Plc has issue which power...
Replies
3
Views
143
I'm looking to get some spare keys for this PLC. Does anyone know a source or have a part number? My searches are turning up nothing at the moment.
Replies
1
Views
76
I have a few questions about Studio5000. 1. Why is my RA folder so big? its well over 100 GB. 2. How do you delete versions or extra files...
Replies
3
Views
278
Hello The plant is running and there is no shutdown nowadays therefore I can add 1734- AENTR and its card while PLC is in Run? I do not wanna...
Replies
8
Views
349
Back
Top Bottom