Using the ‘Auto Declare’ Dialog

Requirement: A programming object (POU or GVL) of a project is open.

  1. Click Edit ‣ Auto Declare .

    ⇒ The Auto Declare dialog opens.

  2. Select the desired scope for the variable from the selection list Scope.

  3. Enter a variable name in the input field Name.

  4. Select the desired data type from the selection list Type.

  5. If the initialization value deviates from the standard initialization value, enter an initialization value for the variable.

  6. Complete your entries with a click on OK.

    ⇒ CODESYS lists the newly declared variable in the declaration part of your programming object.

Note

With the help of pragmas in the declaration part you can affect the processing of the declaration by the compiler.

See also