New2PLCs
Guest
N
In a processor like the MicroLogix 1500 which does not have a built-in FOR..NEXT loop instruction (I've seen some web sites that indicate that some processors do have this instruction), how does one simulate this functionality? NOTE: I want to loop within a scan.
In the AB ML 1500 manual, I noticed in the section on shift registers it said something about using JMP, LBL and CTU to loop if you wanted to shift more than once per scan. But I couldn't figure out how to get those to work as a loop. I bet there's a way to get RSLogix to output the rungs of what I tried in ASCII so that I could post it, but explaining it might be easier. I just had a LBL on a line with a CTU and later, after the logic I wanted to loop, a JMP going back to the original label. To exit the loop, I examine the CTU done bit and jump to a label on the line after the other JMP instruction. Thanks,
-Don
In the AB ML 1500 manual, I noticed in the section on shift registers it said something about using JMP, LBL and CTU to loop if you wanted to shift more than once per scan. But I couldn't figure out how to get those to work as a loop. I bet there's a way to get RSLogix to output the rungs of what I tried in ASCII so that I could post it, but explaining it might be easier. I just had a LBL on a line with a CTU and later, after the logic I wanted to loop, a JMP going back to the original label. To exit the loop, I examine the CTU done bit and jump to a label on the line after the other JMP instruction. Thanks,
-Don