Example 10 - Operating hours counter, signal timeout
Example 10a - Operating hours counter
Task
The operating time of the associated unit is to be determined from a digital control signal COMPRESSOR and displayed in hours.
Solution
CompressorOnTime_h = integrate(bool(COMPRESSOR), {storage: 'tot_compressor'}) / 3600; // output in hours
Functions used
Explanation
The integral over a constant in the period from 0 to the time t results in , the time over which the integration takes place: