OSCAT Forum

oscat.lib => oscat.lib fuer TwinCAT/CoDeSys => Thema gestartet von: klavi in 02. Juli 2013, 19:47:53

Titel: Timer
Beitrag von: klavi in 02. Juli 2013, 19:47:53
Hi,

The problem I try to solve is, I have a machine with different pumps in, I need to register how many hours each pump has been running to keep track of service.

I tried the using Wago's Blink (from util.lib) to generate pulses of 1 sec (500 ms low 500 ms high) and then CTU's for counting sec, min and hours.

Of cause I can just make two counters one counting up to 3600 sec and then hours.

But is there a nicer way to do this, and at the same time make the counted time "RETAIN and PERSISTANT"?

By use of the date and time function in the OSCAT lib?
Titel: Re: Timer
Beitrag von: rrbd in 11. Juli 2013, 20:12:07
Hi, "ACTUATOR_PUMP" does not solve your problem? It has an output for "operating hours". Also "BURNER" has such a counter. Or "F_LAMP"? To be honest, I did not test those functions until now, but they should do the job.

To get the counter results surviving a RESET can be a difficult job.

Best regards

Rainer
Titel: Re: Timer : ONTIME
Beitrag von: rrbd in 20. Juli 2013, 11:10:17
And, of course more elegant for an application where you only want to have a runtime counter: The function ONTIME in OSCAT 333

Rainer