Is it possible to use a loop inside a case.
Example: If I start the forloop in case 0, then in case 10 I add +1 to the forloop..?
I cant make the following work.
case steps of
0:
FOR Index := 1 TO 9 DO
IF LoadConveyerReady THEN
PickNPlaceArr[Index] := TRUE;
steps := 10;
10:
IF Packageplaced THEN
index := index +1
steps := 0;
END_IF
END_FOR
Hi, you can't use one FOR Loop and one IF in different CASE's. In your code, the "10" is inside FOR loop and IF statment, it is not part of CASE. You must put END_IF to end IF and END_FOR to end FOR loop, and after that "10" will be part of CASE. But you must do this before "10".