EasyManuals Logo
Home>Allen-Bradley>Controller>LOGIX 5000

Allen-Bradley LOGIX 5000 User Manual

Allen-Bradley LOGIX 5000
561 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #510 background imageLoading...
Page #510 background image
Chapter 10
Structured Text Programming
510 Rockwell Automation Publication 1756-RM006K-EN-P - November 2018
For example:
Format Example
//comment
At the beginning of a line
//Check conveyor belt direction
IF conveyor_direction THEN...
At the end of a line
ELSE //If conveyor isn’t moving, set alarm light
light := 1;
END_IF;
(*comment*) Sugar.Inlet[:=]1;(*open the inlet*)
IF Sugar.Low (*low level LS*)& Sugar.High (*high level LS*)THEN...
(*Controls the speed of the recirculation pump. The speed depends on the temperature in the tank.*)
IF tank.temp > 200 THEN...
/*comment*/ Sugar.Inlet:=0;/*close the inlet*/
IF bar_code=65 /*A*/ THEN...
/*Gets the number of elements in the Inventory array and stores the value in the Inventory_Items tag*/
SIZE(Inventory,0,Inventory_Items);
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
Structured Text
Components:
Assignments

Table of Contents

Other manuals for Allen-Bradley LOGIX 5000

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Allen-Bradley LOGIX 5000 and is the answer not in the manual?

Allen-Bradley LOGIX 5000 Specifications

General IconGeneral
BrandAllen-Bradley
ModelLOGIX 5000
CategoryController
LanguageEnglish

Related product manuals