Skip to main content

Support with the Auto Declare command

Requirement: A POU or GVL of a project is open.

  1. Click the EditAuto Declare command.

    The dialog opens.

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

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

  4. Select the desired data type from the Data type list box.

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

  6. Click OK to confirm your input.

    The newly declared variable is listed in the declaration part of your POU.

Tip

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

For more information, see: Attribute pragmas, Command Auto Declare