Assign newly created variables

Use
New variable
to create a variable, and then assign it to a Program Organization Unit (POU) element of a ladder diagram (LD), function block diagram (FBD), or structured text (ST) program.
Prerequisites
To assign newly created variables
  1. In
    Project Organizer
    , locate the POU, and then double-click the POU.
  2. Right-click the position to which you want to assign a variable, and then select
    New variable
    .
  3. In
    New variable
    , on the
    General
    page, enter the name and select the data type for the variable.
    TIP: In an FBD program, if the input reference, output reference, or variable is not connected with the instruction with a line, the data type of the variable defaults to BOOL. If the input reference, output reference, or variable is connected with the instruction with a line, the data type of the variable defaults to the expected data type.
  4. (optional) Enter other variable parameters as needed.
  5. Select
    Create
    .
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal