Logix5000 FOR instruction execution

JordanCClark

Lifetime Supporting Member
Join Date
Mar 2007
Location
Michigan
Posts
610
HI guys!

Will a FOR instruction execute every scan or does it need to see a transition like a counter?

My gut says the former, but it never hurts to check.

Thanks in advance!
 
Yes the FOR loop executes every scan. As the scan hits the rung where the FOR loop resides, the FOR loop will execute the routine from the initial value to the terminal value. After all loop iterations have completed, the PLC scan will continue to the next rung of logic.

The FOR loop will index itself based on the step size configuration there is no need to trigger the for loop to index.

You could achieve similar function using in-direct addressing with a trigger to a counter to create an index. This method would require a trigger to increase the index, and only a single trigger would be possible per scan. The same operation could occur, just at a much slower rate since it would be a single iteration per PLC scan versus all interactions per scan with the FOR loop.
 

Similar Topics

Maybe this is just not possible, or maybe I am doing something wrong. Background; I have a data array of over 1500 products. For sorting I...
Replies
6
Views
759
Hello All, Looking to get a better understanding behind an issue that I had earlier today with a PIDE Instruction that was not changing it's CV...
Replies
3
Views
1,259
This is not a plea for help, but the opposite. The native FRD (From BCD) instruction in the Logix5000 platform is, IMHO, flawed. It does NOT...
Replies
0
Views
1,304
Hello All! First Post! What is the "Timed Out" Check Box used for on the MSG instruction in Logix5000? This check box is located under the...
Replies
2
Views
1,862
I have a tag called 'MBTCP.DATA.ReadData' INT[600] of which I would like to pull 16 sequential values into an add-on instruction. I will need...
Replies
6
Views
2,520
Back
Top Bottom