FOR Instruuction Confusion

Wes Gifford

Member
Join Date
Aug 2011
Location
Kansas City, Missouri
Posts
16
When enabling a FOR instruction does the index set to the initial value before the first execution of the Called Routine? e.g. Initial Value = 6, Terminal Value = 1, Step = -1. What will be the index value for the first and last execution of the Called Routine?
 
Interesting one that, on mitsubishi in ladder or FBD the for next loop number is fixed i.e. 10 for example it actually incremnts from 0-9 in this way there is no way of using the value as a pointer so you have to init a pointer variable before entering the loop (assume 0) for indirect addressing and increment it in the for next loop.
However, in ST, the for next (well it's not next it's end for) the for starts with what ever you say for example for x.... then as x is a local tag then this can be used as a pointer.
 
It will be 6 executions total.
During first execution Index=6, during last = 1, after last execution Index will be 0.
 

Similar Topics

Hello, all, I am new here and pretty new to PLC'S. Closest thing I have to PLC experience is with avionics. At my new job I am a welding engineer...
Replies
4
Views
737
I am working on some documentation in preparation for updating firmware around our plant. On one particular PLC, the point IO has two different...
Replies
5
Views
619
Hello, My apologies in advance if this is a stupid question. I have done a fair amount of work in Factorytalk View machine edition, and I am...
Replies
2
Views
1,209
I'm looking to purchase either GX works2 or works3 for a Q series rack I purchased off of ebay. Now the confusion comes from either purchasing...
Replies
2
Views
1,311
I have a possible project fixing a customer's old machine that is using a ControlLogix 5550... but I need to have v10 installed. Up to this point...
Replies
13
Views
3,880
Back
Top Bottom