The details vary with PLC platform, but basically you use the NO run input from the pump to run a one minute timer, assuming that is the resolution you want. The done bit of the timer trips a counter and resets the timer. A NC contact on the run input will reset both the timer and the counter.
The details vary with PLC platform, but basically you use the NO run input from the pump to run a one minute timer, assuming that is the resolution you want. The done bit of the timer trips a counter and resets the timer. A NC contact on the run input will reset both the timer and the counter.
Forget the timer and counter. Use a one second pulse with a
one-shot on it to generate a one-second one-shot. For each motor or whatever you want to time use a NO contact like Tom said in series with the one-second one-shot to trigger an ADD instruction. Use a DINT variable for one of the operands, 1 for the other operand, and the same DINT variable for the destination (ie. MyDINT = MyDINT + 1). This method is really simple (1 rung per whatever) and accurate. This "timer" will count for 68 years. Call me then if you've got a problem.
If you are using a ControlLogix processor then use the TOT instruction and configure it to totalize time.
Fix the tagname.In value at 1.0. Fix the gain at 1.0 and set tagname.timebase to 2. This configures the TOT to totalize time in units of hours. Use the tagname.EN bit to start/stop time totalizing.
Now you have a motor run hour meter.
The TOT tag contains some other useful elements named .Target and .TargetDev1 and .TargetDev2. Set Target to the time where you want to signal needed maintenance on the motor. .TargetDev1 and TargetDev2 can be set to give you advance warning that the maintenace time is approaching. .TargetFlag, .TargetDev1Flag, and .TargetDev2Flag are booleans that turn on when the TOT reaches the specified value. Once maintenance has been performed add the required time interval until the next maintenance is required to the .Target.