Posted 24 February (edited) I'm writing a Function Block in Structured text language. I'm only testing, so the function doesn't do what it has to do. However, my first step is make a for loop inside a while loop, this is for increment the value of a index register while a condition is true. My code so far: WHILE X100 DO; FOR ID_INDEX := 0 TO 99 BY 1 ID_INDEX; ID_INDEX := ID_INDEX + 1; END_FOR; END_WHILE; X100 is my boolean for general start. ID_INDEX is the index for a array that I want to manipulate. The errors that GXWORKS2 tells me are the following: - Cannot find 'END_WHILE' in a statement. Please check the error display statement or the preceding one. C8006 - Parser error. C1200 This is the first time that I write code on Mitsubishi structured text, so I based on the examples that I saw on the structured text manual. Edited 24 February by arcotangente Share this post Link to post Share on other sites
Posted 24 February WHILE X100 DO FOR Index := 0 TO 99 BY 1 DO Array1[Index] :=0; END_FOR; END_WHILE; Share this post Link to post Share on other sites
Posted 25 February WHILE DO does not get a semicolon... Share this post Link to post Share on other sites