Overview of Structured Text Programming
636 Rockwell Automation Publication MOTION-RM002H-EN-P-February 2018
Comment Text that explains or clarifies what a section of structured text does.
Use comments to make it easier to interpret the structured text.
Comments do not affect the execution of the structured text.
Comments can appear anywhere in structured text.
//comment
(*start of comment . . . end of
comment*)
/*start of comment . . . end of
comment*/
See also
Structured Text Components: Assignments on page 636
Structured Text Components: Expressions on page 638
Structured Text Components: Instructions on page 644
Structured Text Components: Constructs on page 645
Structured Text Components: Comments on page 660
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; the tag must be a BOOL, SINT, INT, DINT,
STRING, or REAL.
Tip: The STRING tag is applicable to CompactLogix 5380, CompactLogix 5480, ControlLogix 5580,
Compact GuardLogix 5380, and GuardLogix 5580 controllers only.
:= Is the assignment symbol
Expression Represents the new value to assign to the tag
If tag is this data type Use this type of expression
BOOL BOOL
SINT
INT
DINT
REAL
Numeric
STRING
(CompactLogix 5380, CompactLogix
5480, ControlLogix 5580, Compact
GuardLogix 5380, and GuardLogix 5580
controllers only).
String type, including string tag and string literal
(CompactLogix 5380, CompactLogix 5480,
ControlLogix 5580, Compact GuardLogix 5380, and
GuardLogix 5580 controllers only).
; Ends the assignment
The tag retains the assigned value until another assignment changes the value.
Components: Assignments