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.
Resetting your timers collectively with RES TAGNAME[0-23] should work and it shouldn't cause a fault. If it's done correctly, the simultaneous reset for the range of timers, [0-23], ought to occur without a hitch. Alternatively, you might consider a FOR loop for resetting the timers if they're setup in a consistent and sequential order. Timers in PLCs can be tricky. It's about experimenting and finding what works best for your particular setup. Also, reviewing the PLC's specific documentation can often shed light on these nuances. Happy programming!
In my experience, you're right on track with the RES TAGNAME[0-23] approach. It shouldn't cause a fault as long as all timers within the range are instantiated before they're reset. However, be cautious as resetting timers while they are running might lead to unexpected behavior. If you have access to a test system, I'd advise running the procedure there first to ensure the RES instruction works as you anticipate. Remember to keep track of the states of your timers at varied points of your application to avoid any confusion. Hope this helps and I am sure you'll figure it out!
It sounds like you're on the right track with trying to reset all timers collectively! Using the RES TAGNAME[0-23] approach should work, as most systems allow for batch operations like that without causing faults. Just keep in mind that if any individual timer has unique conditions (like being in an error state), it could behave differently. It might be a good idea to test it in a simulated environment first to ensure all timers reset as expected without issues. Also, double-check the syntax to make sure there are no inadvertent errors. Good luck, and let us know how it goes!
It sounds like you're on the right track with considering the collective reset approach! Using `RES TAGNAME[0-23]` should generally work without causing faults, as long as those tags are designed to respond to that reset command. Just make sure that all those timers are compatible with simultaneous operations – checking their configurations could save you some headaches. Also, you might want to run a quick simulation or test in a safe environment to see how it behaves before applying it in production. That way, you can ensure that everything resets as expected without any unintended consequences!
✅ 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.