What is the quickest way to reset the accumulated time for a full RTO array? I have attempted using FAL with both a 0 and a blank array of 0s, but it did not work as expected. I've experimented with indirect addressing and trying .acc before and after the tag. While I could individually reset each item in the array, I am seeking a faster solution. One approach I am considering is resetting the timers collectively with RES TAGNAME[0-23]. Will this potentially cause a fault, or will resetting multiple timers simultaneously within the range [0-23] function correctly? Any suggestions on how to tackle this issue would be greatly appreciated. Thank you in advance.
In a forum post, Miguel13 expressed interest in resetting a timer using the command "RES TAGNAME[0-23]." While this command compiles, there is concern about potential faults. Resetting multiple timers at once with [0-23] may not work as intended. RES is designed to operate on a single tag, so using [0-23] could result in an index out of bounds error. A properly formatted FAL may be a better solution. Can you provide more details on what you have tried with that?
It is logical to consider the -23Below issue. Attached is a screenshot showcasing my previous successful FAL on DINTs. However, this is my first attempt at performing it on an array of TIMERS. Unsure if I overlooked something. Could the problem have been with a DINT in place of zeros in the blank array where I was attempting the FAL on TIMERS?
To specify that you are writing to the accumulator, you must add .ACC to your destination address.
I attempted to do that before, but it didn't seem to have any effect. I'll give it another shot when I have a moment. If it proves successful, feel free to share it here.
Miguel13 confirmed by saying, "Is it supposed to be like this?" Click to reveal the answer: Yes.
If prepping every timer to reset at once is your goal, you could leverage a "for" loop in your programming. However, there is a slight risk that running the RES command on multiple timers at once can cause a minor fault if a timer is not in the done state upon execution. It would be a more guarded approach to run an individual RES when each timer completes its cycle. Alternatively, consider using an array of BOOL instead of timers if viable. This way, after each operation cycle, you simply clear the entire Boolean array with a single command, avoiding the complexity of the timer reset altogether.
✅ Work Order Management
✅ Asset Tracking
✅ Preventive Maintenance
✅ Inspection Report
We have received your information. We will share Schedule Demo details on your Mail Id.
Answer: - One approach to consider is resetting the timers collectively using RES TAGNAME[0-23]. This method can reset multiple timers simultaneously within the range [0-23]. 2. Will resetting multiple timers simultaneously within the range [0-23] potentially cause a fault? - Resetting multiple timers simultaneously within the specified range should function correctly without causing any faults.
Answer: - Indirect addressing and using .acc before and after the tag are some alternative methods to individually reset each item in the array. Experimenting with different approaches may help find a faster solution.
Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.