If you are doing too much in the loop or looping too many times, you can trigger a watchdog or overlap. If you can 't spare a small chunk of scan time in this routine, then you are right, otherwise, there may have been an error in your loop construct...I have a L23E doing two conditional loops that repeat up to 120 times each, and they often happen during the same scan without much of a blip on scan time.
I'm not sure why also. There is only 2 consecutive rungs looping, like
-----<LBL>------------ A + 1 ------------
-------------------- A < 128 ----- JMP---------
|
|
------A >= 128 ----- A = 0------
And it only loop like max ~128 times..
You should at least advise them that their requirement is an impediment and a superior method exists. (Explain addressing bits within DINT arrays as being everything and more than B3:[x].)
Actually, they have valid reasons too..
Bcoz their specification is up to 128 states. Using the Boolean array is more "readable" and easier to maintain.. If using DINT, it would be 4 DINT elements and the current state bit display in the rung would not be so "intuitive"..
Last edited: