@Daba or Mickey this is a question related to what we have discussed thus far, so i have a CTU thats counting up number of seconds when it reaches sixty it reset and starts counting again, also i'am using the .DN bit of the one sec CTU to another CTU counter thats going to serve as my one min CTU. So every time the .DN bit of the one sec CTU goes true the one min CTU increments by one and that also resets at 60 which is really 60 mins = 1hr. Then i have another CTU counter for my number of hours so each time the .DN bit of the one min counter goes true the hour CTU increments by one. The hour CTU is not reset when a preset is reached but rather when a Normally open push button is set.
Now the question,
i am using this to display time remaining on the agitators run time before they can service the agitator. The Preset time the customer requested is 30 hrs.
the remaining time has to be displayed on the HMI for hours and minutes COUNTING DOWN! notice how so far my counters are up counters.
So logic wise to display the remaining time i subtracted 60 from the one minutes CTU.ACC to display RUNTIME MiNUTES . For the Hour CTU i used the preset of 30 subtracted by the .ACC of the Hour CTU to display REMAINING HOURS. Lastly i also used a rung such that when the RUNTIMES MINUTES tag = 60, I moved a 0 into RUNTIME MINUTES because when you are counting down say you are at 30:01 you would expect the next number to be 30:00, but the number jumped to 29:60 make sense.
Now finally the problem i'am having looks like this. Say you reset the counter and start counting down this is what my count down looks like
1. 30.00
2. shoulf display 29.59, but diplays 29:00, then after a minute elapses displays 29:59 then it counts down normally, thats basically where i am stuck on i even tried it on different intervals say at 13:00 next number is 12:00 instead if 12:95 then after a minute elapses displays 12:95, ive tried different thing but so far they lead to nowhere help would be nice. Sorry for the long post just wanted everything out their