CODESYS Development System
ST Statement: IF The IF statement is used for checking a condition and, depending on this condition, for executing the subsequent statements. A condition is coded as an expression that returns a Boole
CODESYS Development System
ST Statement: FOR The FOR loop is used to execute statements with a certain number of repetitions. Syntax: FOR <counter> := <start value> TO <end value> {BY <increment> } DO <instructions> END_FOR; Th
CODESYS Development System
ST Statement: CASE The CASE statement is a conditional control structure which causes a statement or a section of a statement to be executed only under a specific condition. The section which is execu
CODESYS Development System
ST Statement: RETURN Use the RETURN statement in order to exit from a function block. You can make this dependent on a condition , for example. Example 64 . Example IF xIsDone THEN RETURN; END_IF; iCo
CODESYS Development System
Keywords In all editors, you must capitalize keywords that for example denote scopes, data types, or operators. Keywords cannot be used as variable names. Example 282 . Example VAR END_VAR BOOL_TO_INT
CODESYS Development System
Error Messages and Warnings :
CODESYS Development System
Compiler Error C0001 Message : Constant '<constant value>‘ too large for type '<data type>‘ Possible error cause : A typed constant is too large for the given data type or a constant is too large for
CODESYS Development System
Compiler Error C0002 Message : '<operator 1>' or '<operator 2>' expected instead of '<tag>' Possible error cause : Syntax error Error correction : Use the correct syntax. Example 287 . Example of the
CODESYS Development System
Compiler Error C0003 Message : '<value>' is not a valid bit number for '<variable>' Possible error cause : Attempted access to a bit that is outside of the range for a data type. Error correction : Us
CODESYS Development System
Compiler Error C0004 Message : '<variable>' is not a component of '<structure>' Possible error cause : Component access with "." to a variable that is not a structured value or does not exist as a com