I have a timer when gets enable I move .acc value of that timer to another tag to store the .acc value but next time when the timer gets enable again, it overwrites the last stored value of .acc into that tag.

but I would like to add the new accumulator value of that timer to existing value of my tag where I am storing .acc value.

Or is there any timer which keeps the value of .acc (Don't set to zero) when become disable and I can reset that .acc value at 7 am which I will use GSV instruction to get that time.

Thank you,

__________________
Junior Control Engineer
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live

It works exactly the same as a TON, except that it doesn't automatically reset when disabled. To reset it, use the RES instruction, with the timer tag name as the parameter.

It sounds like you don't ever want it to "time-out", because if it did it would just "freeze" with the .DN bit set, and will not accumulate any more time. Set the .PRE to 2,147,483,647 (maximum positive value of a DINT), which equates to 2,147,483 seconds, or just under 25 days of accumulated time.

The good thing about using RTO is that it will hold the accumulator value, not just when it is disabled, but also through power-cycles, and mode changes (RUN-PROG-RUN) of the controller, that is why it is called a "Retentive" timer.

It works exactly the same as a TON, except that it doesn't automatically reset when disabled. To reset it, use the RES instruction, with the timer tag name as the parameter.

It sounds like you don't ever want it to "time-out", because if it did it would just "freeze" with the .DN bit set, and will not accumulate any more time. Set the .PRE to 2,147,483,647 (maximum positive value of a DINT), which equates to 2,147,483 seconds, or just under 25 days of accumulated time.

The good thing about using RTO is that it will hold the accumulator value, not just when it is disabled, but also through power-cycles, and mode changes (RUN-PROG-RUN) of the controller, that is why it is called a "Retentive" timer.

Thank you for the explanation! Much appreciated and I finished the logic and its working good so far

Thank you again for the help

__________________
Junior Control Engineer
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live