EasyManua.ls Logo

Allen-Bradley Logix5000

Allen-Bradley Logix5000
708 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
Loading...
696 Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Appendix C Structured Text Programming
Comments
To make your structured text easier to interpret, add comments to it.
Comments let you use plain language to describe how your structured text
works.
Comments do not affect the execution of the structured text.
The table describes how to add comments to your structured text.
The table shows some examples.
To add a comment Use one of these formats
On a single line //comment
(*comment*)
/*comment*/
At the end of a line of structured text
Within a line of structured text (*comment*)
/*comment*/
That spans more than one line (*start of comment . . . end of
comment*)
/*start of comment . . . end of
comment*/
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);

Table of Contents

Other manuals for Allen-Bradley Logix5000

Related product manuals