TimD
Lifetime Supporting Member
Hello, I have a flowmeter, it pulses once per gallon.
I have my discrete input pulsing away along with the flowmeter.
I can count the tenths portion fine, but I wanted to extend my counter 'resolution' by separating pulses 0-99 by a separate counter for hundreds, thereby giving me 32767 gallons until overflow occurs.
I have two lines of code, one, a CTU counter counting up. I want to reset the counter after 100 pulses and increment my second CTU by one. I used the preset field, but this does not help. It seems simple, anyone out there have a similar way to do this that works?
Also, should I be using retentitive counters? Thanks!
Tim
I have my discrete input pulsing away along with the flowmeter.
I can count the tenths portion fine, but I wanted to extend my counter 'resolution' by separating pulses 0-99 by a separate counter for hundreds, thereby giving me 32767 gallons until overflow occurs.
I have two lines of code, one, a CTU counter counting up. I want to reset the counter after 100 pulses and increment my second CTU by one. I used the preset field, but this does not help. It seems simple, anyone out there have a similar way to do this that works?
Also, should I be using retentitive counters? Thanks!
Tim