TConnolly
Lifetime Supporting Member
and then used a counter to calculate the running hours...
If you are wanting to totalize running hours then take consider using the TOT instruction.
To configure TOT to totalize hours, fix the TOT 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 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.