Hello, I trying to determine if the use of a For/Next Loop is appropriate for my application.
1.) The code in question will check the value of C517.
2.) If this value is 1 the code will check the value of controls C4 - C43.
3.) If the value is found to be 1, the PLC will set C(i) + 1 and C(i) - 1 equal to 1 as well. (i.e. If C5 = 1, set C4 and C6 =1).
Due to the nature of this, I will be using two for/next loops; one for both directions.
From an efficiency stand point, would this be better than having a rung for each command (78 total)..
Thanks for the help!
1.) The code in question will check the value of C517.
2.) If this value is 1 the code will check the value of controls C4 - C43.
3.) If the value is found to be 1, the PLC will set C(i) + 1 and C(i) - 1 equal to 1 as well. (i.e. If C5 = 1, set C4 and C6 =1).
Due to the nature of this, I will be using two for/next loops; one for both directions.
From an efficiency stand point, would this be better than having a rung for each command (78 total)..
Thanks for the help!