I have CTs on well pumps that run for 3-4 minutes only a few times per day. I have the current showing on the graphics as well as an on/off output I programmed like 10 IF IN1 > 1 THEN START OUT1 ELSE STOP OUT1 (If current more than 1 amp, it shows the pump is on)
How do I accumulate pump run time and display this on a graphic? and how would it reset? (never, only when the T3000 loses power?
Add a variable to act as a flag, if the current is over the threshold then the pump is on. Otherwise its off.
10 IF IN1 > 1 THEN START P1FLAG
20 IF IN1 < .5 THEN STOP P1FLAG
30 IF INTERVAL( 0:0:01 ) AND P1FLAG THEN P1RUNT = P1RUNT + 0:0:01
P1RUNT is the runtime acccumulator for the pump. Make sure its in the units of TIME (not seconds, minutes, hours, days).
Power Cycle:
After checking with the crew I see that we dont have a solution for you to store the variables during a power cycle, they will start again where they were after the last program load or save operation. If it was a pulse counter these do get saved every 5 minutes. A work around would be to wire an input to an output and toggle that in your program every hour or so of run time, then the input set to pulse counting would store it through a power cycle. Not a very elegant solution I admit.
There is a manual write to flash button in T3000 somewhere, if you were to hit that every now & then it will save the vars at that time.
We could introduce a new basic command to store to flash or you could work up a battery backup but this is getting complex now isnt it.