EICS
Member
in the past i have only been doing small mods to existing cicode and coping sections to reuse and modify to suit.
Now i have been tasked to write a lot of cicode, as an electrician this does not come easily to me, i'm up to 1600 lines so far in about 30 separate functions and calls and progressing well.
i have a general question as follows, i want to re-run a section depending on an outcome.
FUNCTION
TEST()
code in line 1;
code in line 2; ! this section is re-run depending on outcome
code in line 3;
code in line 4;
IF code in line 5 = x THEN
code in line 6;
ELSE
Tag A = 1;
return back to Line 2; ! i need to jump back to line 2 here somehow
END
END
END
so what statement ( or label etc) do i use to do this?
Now i have been tasked to write a lot of cicode, as an electrician this does not come easily to me, i'm up to 1600 lines so far in about 30 separate functions and calls and progressing well.
i have a general question as follows, i want to re-run a section depending on an outcome.
FUNCTION
TEST()
code in line 1;
code in line 2; ! this section is re-run depending on outcome
code in line 3;
code in line 4;
IF code in line 5 = x THEN
code in line 6;
ELSE
Tag A = 1;
return back to Line 2; ! i need to jump back to line 2 here somehow
END
END
END
so what statement ( or label etc) do i use to do this?