CODESYS Development System
Variables The scope of a variable defines how and where you can use a variable. You define the scope in the variable declaration. :
CODESYS Development System
Variable: VAR_INPUT Input variables are used at the inputs of function blocks. You declare VAR_INPUT variables between the VAR_INPUT and END_VAR keywords in the declaration part of POUs. When called,
CODESYS Development System
Variable: VAR_OUTPUT Output variables are used at the outputs of function blocks. You declare VAR_OUTPUT variables between the VAR_OUTPUT and END_VAR keywords in the declaration part of POUs. The valu
CODESYS Development System
Variable: VAR_IN_OUT A VAR_IN_OUT variable is an input/output variable, which is part of a POU interface and serves as a formal pass-by-reference parameter. Syntax <keyword> <POU name> VAR_IN_OUT <var
CODESYS Development System
Variable: VAR_GLOBAL Important If a local variable that is declared in a block has the same name as a global variable, then it has precedence within the block. Important For compiler version 3.2.0.0 a
CODESYS Development System
Variable: VAR_TEMP This functionality is an extension of the IEC 61131-3 standard. You declare temporary variables locally between the keywords VAR_TEMP and END_VAR . VAR_TEMP declarations are possibl
CODESYS Development System
Variable: VAR_STAT This functionality is an extension of the IEC 61131-3 standard. You declare static variables locally between the keywords VAR_STAT and END_VAR . Static variables are initialized on
CODESYS Development System
Variable: VAR_EXTERNAL External variables are global variables that are "imported" into a POU. You declare these variables between the keywords VAR_EXTERNAL and END_VAR . If the global variable does n
CODESYS Development System
Operator: MAX The IEC operator is used for the maximum function. It yields the greatest value of all inputs. OUT := MAX(IN0,IN1,IN2,...) Permitted data types: all Example 110 . Examples Result: 90 ST
CODESYS Development System
Operator: MIN The IEC operator is used for the minimum function. It yields the least value of all inputs. OUT := MIN(IN0,IN1,IN2,...) Permitted data types: all Example 111 . Examples Result: 30 ST Var