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
- The POU is not empty.
To assign newly created variables
- InProject Organizer, locate the POU, and then double-click the POU.
- Right-click the position to which you want to assign a variable, and then selectNew variable.
- InNew variable, on theGeneralpage, 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.
- (optional) Enter other variable parameters as needed.
- SelectCreate.
Provide Feedback