I am using directsoft5 software. Trying to make an hour meter,at first I tought about using a .1 timer setting it to close everyminute triggering a counter then the minute counter triggering an hour counter. I soon realized that the timing/counting limits would not allow me to have a continous counter/hour meter. Obviously by now you can tell i am just learning. Any suggestion , help?
Thanks
sas11

If its for something like accumulating motor hours then 2777 hours is about three months - might not long enough for an application where a motor runs for years. If milldrones suggestion isn't long enough, then try using a 360 second retentive timer, and count tenths of an hour - you can count them with a float by adding .1 to the float evertime the timer reaches 360 seconds. The retentive timer retains its value in between "tenths" so that you don't loose the time in the overall accumulation. If your processor doesn't have floating point numbers then you can use a DINT or a double BCD, just remember to insert a decimal.

__________________True craftsmanship is only one more power tool away.

That's the beauty of processors, they don't have emotions they just run code - The PLC Kid.

Thanks! got it going. On a similar problem what if i just need to count dump cycles, but I need to go up to 22,000 counts. I do not know if it makes a difference but i will be looking at the counts on an operator screen

1. It performs a one-shot of the input line
2. Based on the one shot it increments an accumulator location
3. It compares the accumulated value to a 'preset' to set a 'done' (or in AD case a contact with the same name as the counter).

But the standard AD counters only count to 9999. What are your options?

1. Use an UDC - it has three inputs, the Count Up, the Count down and the reset. Set the Count Up to your 'dump cycle' bit. Set the Count Down to an always off (SP1 NC), use the reset line to clear it when needed. Remember that the Preset, accumulator and counter assignment take up the next location also. But it can count up to 99999999

2. Just one-shot (PD) your 'dump cycle' signal. Use this one-shot to increment (INCB) a location. This may be a lot easier but you have to remember that the accumulated location is in binary not BCD.

__________________
Controlling outputs is the PLC's way of getting its inputs to change.

Bernie thanks for the help. I have got the counter working? Counting up ok i do not want it to ever reset so i just put an open contact on the reset?. But on my Cmore I have set it up to display my counts. I am watching the counter in the program and it is counting fine, but as it counts my display sometimes skips for example my counter reads 30 my display reads 48. while typing this i cyled watching the display went from 51 to 64?? Any ideas?

There is one problem I have with PLC generated hour meters on machines. That is if you are constantly going in and changing the program there is a very good chance that you can/will over write the valve when you do a download to the controller.

I think the only exception to this is some of the European controllers that have RETAIN PERSISTANT memory that is retained even over a program download.

Sometimes the KISS principle is best and throwing a non resettable hardware hour meter on the machine is the way to go.

__________________
nOrM
======================
nOrM=Norman Dziedzic Jr.
"I decry the current tendency to seek patents on algorithms. There are better ways to earn a living than to prevent other people from making use of one's contributions to computer science." Donald Knuth