Author Topic: displaying running hours  (Read 9824 times)

Smurf

  • Guest
displaying running hours
« on: June 07, 2005, 01:18:52 PM »
Output 1 controls a pump.
What's the easiest way to count the total running hours of the pump and store the values after a power shut down?

Thanks.
« Last Edit: June 07, 2005, 06:51:20 PM by support »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:displaying running hours
« Reply #1 on: June 07, 2005, 06:49:52 PM »
You can mark the start time using the real time clock TIME[1], TIME[2] and TIME[3].  Then at the end of the run use the stop time to minus the start time. Of course if the process runs for more than 24 hours then you will need the date as well.

Another way is to use a timer with  SV = 600, and at the end of the time out, trigger a custom function and increment a variable by 1.  This keep track of the time the pump runs (in minutes)  and to get the hour, just divide the variable by 60.  
« Last Edit: June 07, 2005, 06:50:58 PM by support »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS