Allen-Bradley Logix5000 Reference Manual page 686

1756 controllogix, 1768 compactlogix, 1769 compactlogix, 1789 softlogix, 1794 flexlogix, powerflex 700s with drivelogix
Hide thumbs Also See for Logix5000:
Table of Contents

Advertisement

Appendix C
Structured Text Programming
If you want this
If recipe number = 1 then
Ingredient A outlet 1 = open (1)
Ingredient B outlet 4 = open (1)
If recipe number = 2 or 3 then
Ingredient A outlet 4 = open (1)
Ingredient B outlet 2 = open (1)
If recipe number = 4, 5, 6, or 7 then
Ingredient A outlet 4 = open (1)
Ingredient B outlet 2 = open (1)
If recipe number = 8, 11, 12, or 13 then
Ingredient A outlet 1 = open (1)
Ingredient B outlet 4 = open (1)
Otherwise all outlets = closed (0)
686
Example
The [:=] tells the controller to also clear the outlet tags whenever the controller
does the following:
• Enters the RUN mode.
• Leaves the step of an SFC if you configure the SFC for Automatic reset. (This
applies only if you embed the assignment in the action of the step or use the
action to call a structured text routine via a JSR instruction.)
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Enter this structured text
CASE recipe_number OF
1:
Ingredient_A.Outlet_1 :=1;
Ingredient_B.Outlet_4 :=1;
2,3:
Ingredient_A.Outlet_4 :=1;
Ingredient_B.Outlet_2 :=1;
4...7:
Ingredient_A.Outlet_4 :=1;
Ingredient_B.Outlet_2 :=1;
8,11...13
Ingredient_A.Outlet_1 :=1;
Ingredient_B.Outlet_4 :=1;
ELSE
Ingredient_A.Outlet_1 [:=]0;
Ingredient_A.Outlet_4 [:=]0;
Ingredient_B.Outlet_2 [:=]0;
Ingredient_B.Outlet_4 [:=]0;
END_CASE;

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents