Structured Text Components: Assignments

Use an assignment to change the value stored within a tag. An assignment has this syntax:
tag := expression;
where:
Component
Description
Tag
Represents the tag that is getting the new value.
:=
Is the assignment symbol
Expression
Represents the new value to assign to the tag
;
Ends the assignment
The tag retains the assigned value until another assignment changes the value.
The expression can be simple, such as an immediate value or another tag name, or the expression can be complex and include several operators and functions, or both. Refer to Expressions for more information.
TIP: I/O module data updates asynchronously to the execution of logic. If you reference an input multiple times in your logic, the input could change state between separate references. If you need the input to have the same state for each reference, buffer the input value and reference that buffer tag.
You can also use Input and Output program parameters which automatically buffer the data during the Logix Designer application execution.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal