Describe each action in pseudocode – Rockwell Automation Logix5000 Controllers Sequential Function Charts Programming Manual User Manual
Page 28
![background image](/manuals/579930/28/background.png)
Chapter 1
Design a sequential function chart
If you want to
Then select or set this
member
Data type
Details
Determine how many times an action has
become active
Count
DINT
This is not a count of scans of the action.
• The count increments each time the action becomes active.
• It increments again only after the action goes inactive and then active again.
• The count resets only if you configure the SFC to restart at the initial step. With that
configuration, it resets when the controller changes from program mode to run
mode.
Use one tag for the various status bits of
this action
Status
DINT
For this member
Use this bit
Q
30
A
31
To organize the logic for an action, first you describe the action in pseudocode.
• Use a series of short statements that describe what should happen.
• Use terms or symbols, such as: if, then, otherwise, until, and, or, =, >, <.
• Sequence the statements in the order that they should execute.
• If necessary, name the conditions to check first (the "when to act" first) and
then the action to take second (the "what to do" second).
Enter the pseudocode into the body of the action.
• Refine the pseudocode so it executes as structured text.
• Use the pseudocode to design your logic and leave the pseudocode as
comments. Since all structured text comments download to the controller,
your pseudocode is always available as documentation for the action.
To convert the pseudocode to structured text comments, add these comment
symbols.
For a comment
Use one of these formats
On a single line
//comment
That spans more than one line
(
*start of comment . . . end of
comment*
)
/*start of comment . . . end of
comment*/
Describe each action in
pseudocode
28
Rockwell Automation Publication 1756-PM006F-EN-P - October 2014