Do you have a question about the Allen-Bradley Logix5000 Allen-Bradley ControlLogix 1756 Allen-Bradley CompactLogix 1769 Allen-Bradley SoftLogix 1789 Allen-Bradl and is the answer not in the manual?
Questions and answers
Related Manuals for Rockwell Automation Allen-Bradley Logix5000 Allen-Bradley ControlLogix 1756 Allen-Bradley CompactLogix 1769 Allen-Bradley SoftLogix 1789 Allen-Bradl
Page 2
If this equipment is used in a manner not specified by the manufacturer, the protection provided by the equipment may be impaired. In no event will Rockwell Automation, Inc. be responsible or liable for indirect or consequential damages resulting from the use or application of this equipment.
Page 3
Summary of changes This manual contains new and updated information. The following table contains the changes made to this revision. Change Topic Updated graphics and text for version 24 and Windows 7. Throughout the manual. Rock well Automation Publication 1756-PM006F-E N-P - Oct ober 2014...
Page 5
Table of contents Studio 5000 environment...................9 Preface Additional resources....................10 Chapter 1 Introduction........................ 11 Design a sequential function What is a sequential function chart?..............12 chart Define the tasks ......................14 Choose how to execute the SFC ................15 Define the steps of the process................16 Step guidelines.....................
Page 6
Mark an action as a BOOLean action............67 Program an action ...................... 67 Enter structured text ..................67 Call a subroutine in an action ................. 68 Assign the execution order of actions ..............69 Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 7
Table of contents Document an SFC ..................... 70 Language switching.................... 70 Add structured text comments ............... 71 Add a tag description..................72 Add a text box ..................... 72 Show or hide text boxes or tag descriptions ..........73 Hide an individual tag description ..............73 Configure the execution of the SFC ..............
Page 9
Logix5000™ controllers for discrete, process, batch, motion, safety, and drive-based solutions. The Studio 5000® environment is the foundation for the future of Rockwell Automation® engineering design tools and capabilities. The Studio 5000 environment is the one place for design engineers to develop all elements of their control system.
Page 10
Provides declarations of conformity, certificates, and other http://ab.rockwellautomation.com certification details. You can view or download publications at http://www.rockwellautomation.com/literature. To order paper copies of technical documentation, contact your local Rockwell Automation distributor or sales representative. Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 11
Chapter 1 Design a sequential function chart Introduction A sequential function chart (SFC) is similar to a flowchart of your process. It defines the steps or states through which your system progresses. It helps you do the following: • Organize the functional specification for your system. •...
Page 12
A transition is the TRUE or FALSE condition that tells the SFC when to go to the next step. A qualifier determines when an action starts and stops. A simultaneous branch executes more than 1 step at the same time. JSR instruction calls a subroutine. Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 13
Chapter 1 Design a sequential function chart A selection branch chooses between different execution paths. A text box lets you add descriptive text or notes to your SFC. Rock well Automation Publication 1756-PM006F-E N-P - Oct ober 2014...
Page 14
The first step in the development of an SFC is to separate the configuration and regulation of devices from the commands to those devices. Logix5000 controllers let you divide your project into one continuous task and multiple periodic tasks and event tasks. Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 15
Chapter 1 Design a sequential function chart 1. Organize your project. These functions Go into this type of task • Configure and regulate devices Periodic task • Command a device to a specific state SFC in the continuous task • Sequence the execution of your process 2.
Page 16
A transition ends a step. The transition defines the physical conditions that must occur or change in order to go to the next step. Step guidelines Follow these guidelines. • Start with large steps and refine the steps in several passes. Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 17
Chapter 1 Design a sequential function chart • When you first open an SFC routine, it contains an initial step and transition. Use this step to initialize your process. The controller executes the initial step in these situations. • After a project download when the controller goes into Run mode. •...
Page 18
The X bit is on the entire time the step is active (executing). (including first and last scan) Typically, we recommend that you use an action with a N Non-Stored qualifier to accomplish this. Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 19
Chapter 1 Design a sequential function chart If you want to Data type Details Then select or set this member Do something one time when the step BOOL The FS bit is on during the first scan of the step. becomes active Typically, we recommend that you use an action with a P1 Pulse (Rising Edge) qualifier to accomplish this.
Page 20
SFC • The SFC checks the ending transition after the last step in each path has executed at least once. If the transition is FALSE, the SFC repeats the previous step. Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 21
Chapter 1 Design a sequential function chart Use this structure With these considerations • Connect the wire to the step or simultaneous branch to Wire to a previous step page 24 Loop back to a previous step which you want to go. •...
Page 22
A selection branch represents a choice between one path (step or group of steps) or another path (an OR structure). • Only one path executes. • By default the SFC checks the transitions from left to right. Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 23
Chapter 1 Design a sequential function chart • The SFC takes the first TRUE path. • The Logix Designer application lets you change the order in which the SFC checks the transitions (see chapter 2, Program a Sequential Function Chart page 55).
Page 24
Wire to a previous step You can also connect a step to a previous point in your SFC. • Loop back and repeat steps • Return to the beginning of the SFC and start over Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 25
Chapter 1 Design a sequential function chart Add actions for each step Use actions to divide a step into the different functions that the step performs, such as commanding a motor, setting the state of a valve, or placing a group of devices in a specific mode.
Page 26
With Boolean actions, you have to manually reset the assignments and instructions that are associated with the action. Since there is no link between the action and the logic that performs the action, the automatic reset option does not affect Boolean actions. Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 27
Chapter 1 Design a sequential function chart Example When the S_Complete_the_Batch step is active, the S_Open_Outlet action executes. When the action is active, its Q bit turns on. A ladder Logic routine monitors the Q bit (S_Open_Outlet.Q ). When the Q bit is on, the JSR instruction executes and opens the outlet valve. You can reuse a Boolean action multiple times within the same SFC.
Page 28
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*/ Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 29
Chapter 1 Design a sequential function chart Each action (non-Boolean and Boolean) uses a qualifier to determine when it Choose a qualifier for an starts and stops. action The default qualifier is N Non-Stored. The action starts when the step is activated and stops when the step is deactivated.
Page 30
Transitions occur in these structures. For this structure Make sure that Sequence A transition is between each step. Selection branch Transitions are inside the horizontal lines. Simultaneous branch Transitions are outside the horizontal lines. Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 31
Chapter 1 Design a sequential function chart Example You want to complete these steps. 1. Turn on 2 compressors. When a compressor is on, the Device1State bit is on. 2. When both compressors are on, go to the next step. Example You want to complete these steps.
Page 32
To use a subroutine to control a transition, include an End Of Transition (EOT) instruction in the subroutine. The EOT instruction returns the state of the conditions to the transition, as shown below. - or - Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 33
Design a sequential function chart Chapter 1 Call a subroutine. Check for the required conditions. When those conditions are TRUE, turn on a BOOL tag. Use an EOT instruction to set the state of the transition equal to the value of the BOOL tag. When the BOOL tag is on (TRUE), the transition is TRUE.
Page 34
Timer clears and then begins to increment. AlarmLow stays on. (You have to manually turn it off.) Timer reaches the LimitHigh value of the step. AlarmHigh bit turns on. Timer continues to increment. Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 35
Chapter 1 Design a sequential function chart Description Step becomes inactive. X bit turns off. Timer retains its value. AlarmHigh stays on. (You have to manually turn it off.) Example Here is an example of the use of the Preset time of a step. The functional specification has these requirements. 1.
Page 36
38 required data. • Status bits of the step or action to condition logic • P and P0 actions Let the controller clear data ---------------------------------------------> Use the automatic reset option page 40 Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 37
Chapter 1 Design a sequential function chart The following table compares the different options for handling the last scan of a step. Characteristic During the last scan of a step, this option does Don’t scan Programmatic reset Automatic reset • P and P0 actions execute according to Execution actions Only P and P0 actions execute.
Page 38
This lets you execute your normal logic as well as turn off (clear) devices at the end of a step. 1. In the Last Scan of Active Steps property, select the Programmatic reset option. Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 39
Chapter 1 Design a sequential function chart 2. Clear the required data using any of these methods. • To your normal logic, add logic that clears the required data. Use the LS bit of the step or the Q bit of the action to condition the execution of the logic.
Page 40
An Add-On Instruction executes its logic routine in postscan mode and then executes its postscan logic in normal mode (if a postscan routine is configured). • Any nested SFC (SFC that an action calls as a subroutine) is reset. Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 41
Chapter 1 Design a sequential function chart Important: The postscan of an action actually occurs when the action goes from active to inactive. Depending on the qualifier of the action, the postscan could occur before or after the last scan of the step. As a general rule, the postscan executes instructions as if all conditions are FALSE.
Page 42
A simple way to control a device or devices during one or more steps is to create a separate step for the devices. Then use a simultaneous branch to execute the step during the rest of the process. Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 43
Chapter 1 Design a sequential function chart Example A paint operation completes these actions. 1. Transfers the product into the paint shop. 2. Paints the product using 3 separate paint guns. 3. Cleans the guns. 4. Transfers the product to the paint ovens. During the entire process, the system must control the shop fans.
Page 44
To turn the fan back on, the SFC has to jump back to step_1. Use one large step If you use one large step for multiple functions, then use additional logic to sequence the functions. One option is to nest an SFC within the large step. Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 45
Chapter 1 Design a sequential function chart In this example, a step turns on a fan and then calls another SFC. The nested SFC sequences the remaining functions of the step. The fan stays on throughout the steps of the nested SFC. Example Use a Large Step This action turns on a fan.
Page 46
Not nested (i.e., no SFC calls this SFC as a -------------------------------> 1. Use an SFC Reset (SFR) instruction to restart the SFC at the required step. subroutine) 2. Use logic to clear the X bit of the stop element. Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 47
Chapter 1 Design a sequential function chart Example This example shows the use of the SFC Reset (SFR) instruction to restart the SFC and clear the X bit of the stop element (see Restart (reset) the SFC page 46). If SFC_a_stop.X = on (SFC_a is at the stop) and SFC_a_reset = on (time to reset the SFC) then for one scan (ons[ 0 ] = on): Reset SFC_a to SFC_a_Step_1 SFC_a_stop.X = 0 SFC_STOP structure...
Page 48
Stop SFC_b. This sets the X bit of the stop element. Use the X bit of the stop element to signal that SFC_b is done and it is time to go to the next step. Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 49
Chapter 1 Design a sequential function chart Pass parameters To pass parameters to or from an SFC, place a Subroutine/Return element in the SFC. By default, an SFC executes a step or group of simultaneous steps and then returns Configure when to return to to the operating system (OS) or the calling routine (JSR).
Page 50
• Execution of a sequence • Execution of a simultaneous branch • Execution of a selection branch • When parameters enter and exit an SFC • Options for execution control Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 51
Chapter 1 Design a sequential function chart The following diagram shows the execution of a sequence. This… …executes like this Rock well Automation Publication 1756-PM006F-E N-P - Oct ober 2014...
Page 52
Chapter 1 Design a sequential function chart The following diagram shows the execution of a simultaneous branch. This… …executes like this Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 53
Chapter 1 Design a sequential function chart The following diagram shows the execution of a selection branch. This… …executes like this The following diagram shows when parameters enter and exit an SFC Rock well Automation Publication 1756-PM006F-E N-P - Oct ober 2014...
Page 54
Chapter 1 Design a sequential function chart The following diagram shows options for execution control. This SFC… …executes like this Execute current active steps only Execute until FALSE transition Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 55
Chapter 2 Program a sequential function chart Introduction To add SFC elements, use the SFC toolbar. Add and manually connect elements 1. On the SFC toolbar, click the button for the item that you want to add. 2. Drag the element to the required location on the SFC. 3.
Page 56
SFC. A green dot shows a valid connection point. Create a simultaneous Start a simultaneous branch branch 1. On the SFC toolbar, click the button. Drag the new branch to the correct location. Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 57
Chapter 2 Program a sequential function chart 2. To add a path to the branch, click the first step of the path that is to the left of where you want to add the new path. Click 3. To wire the simultaneous branch to the preceding transition, click the bottom pin of the transition and then click the horizontal line of the branch...
Page 58
3. To wire the selection branch to the preceding step, click the bottom pin of the step and then click the horizontal line of the branch . A green dot shows a valid connection point. Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 59
Chapter 2 Program a sequential function chart End a selection branch 1. Select the last transition of each path in the branch. To select the transitions, do either of these actions. • Drag the pointer around the transitions that you want to select. •...
Page 60
Connect a wire to the step You may have to reposition a wire after you connect it to a step. This example shows how to go to Step_001 from Tran_003. Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 61
Chapter 2 Program a sequential function chart Click the lower pin of the transition that signals the jump. Then click the top pin of the step to which you want to go. A green dot shows a valid connection point. Typically, the resulting connection orients itself along the center of the flowchart and is hard to see.
Page 62
2. In the Step Properties dialog box, on the General tab, select the Alarm Enable check box. 3. Enter the time for the high alarm (Limit High) and low alarm (Limit Low), in milliseconds. 4. Click OK. Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 63
Chapter 2 Program a sequential function chart Use an expression to calculate a time To calculate a time based on tags in your project, enter the time as a numeric expression. You can use an expression to calculate these values. •...
Page 64
This example shows three transitions that use a BOOL expression (see Enter a BOOL expression page 64). Example Tag name of the transition. BOOL expression that controls when the transition is TRUE or FALSE Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 65
Chapter 2 Program a sequential function chart Call a subroutine when programming a transition 1. In the SFC, right-click the transition and then click Set JSR. 2. In the Routine box, click the down arrow and then click the routine that you want to call.
Page 66
To calculate a preset value based on tags in your project, enter the value as a numeric expression. 1. Click the button of the action. 2. Check the Use Expression check box. 3. Click Define and enter an expression. Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 67
Chapter 2 Program a sequential function chart Browse for a tag Choose a function Choose an operator Create a tag 4. Enter a numeric expression that defines the preset time. Use the buttons on the right side of the dialog box to help you complete the expression. 5.
Page 68
Click the down arrow and then click the tag that contains the parameter. 4. To receive a parameter from the routine, click an empty Return Parameters box. Click the down arrow and then click the tag in which to store the parameter from the routine. Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 69
Chapter 2 Program a sequential function chart 5. Click OK. Actions execute in the order in which they appear. Assign the execution order of actions When Step_003 is active, its actions execute in this order. 1. Action_000 2. Action_001 3. Action_002 To change the order in which an action executes, drag the action to the correct location in the sequence.
Page 70
Project documentation that supports multiple translations within a project includes these logic elements. • Component descriptions in tags, routines, programs, user-defined data types, and Add-On Instructions • Equipment phases • Trends • Controllers Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 71
Chapter 2 Program a sequential function chart • Alarm Messages (in ALARM_ANALOG and ALARM_DIGITAL configuration) • Tasks • Property descriptions for modules in the Controller Organizer • Rung comments, SFC text boxes, and FBD text boxes For more information on enabling a project to support multiple translations of project documentation, see the online help.
Page 72
2. Drag the text box to a location near the element to which it applies. 3. Double-click the text box and type the note. Then press Ctrl+Enter. 4. As you move the element on the SFC, what do you want the text box to do? Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 73
Chapter 2 Program a sequential function chart If you the text box to Then Stay in the same spot Stop. You are done. Move with the element to which it applies Go to step 5. 5. Click the pin symbol in the text box and then click the SFC element to which you want to attach the text box.
Page 74
The restart position does not apply for major faults. After you clear a major fault, the SFC always restarts at the initial step. • What to do on the last scan of a step (Last Scan of Active Steps). 4. Click OK. Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 75
Chapter 2 Program a sequential function chart Verify the routine As you program your routine, periodically verify your work. 1. In the top-most toolbar of the application window, click 2. Follow these steps if any errors are listed in the Output window. a.
Page 76
Chapter 2 Program a sequential function chart • Modify indicator tags • Add, delete or modify an SBR/RET • Add, delete or modify any step or action expression Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 77
Chapter 3 Force steps Introduction Use a force to override data that your logic either uses or produces. • Test and debug your logic. • Temporarily keep your process functioning when an input device has failed. Use forces only as a temporary measure. They are not intended to be a permanent part of your application.
Page 78
• Online toolbar I/O forces • FORCE LED • GSV instruction SFC forces Online Toolbar The Online toolbar shows the status of forces. It shows the status of I/O forces and SFC forces separately. Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 79
Chapter 3 Force steps Forces tab ----------> Forces tab status Means • If the project contains any forces of this type, they are overriding your logic. Enabled • If you add a force of this type, the new force immediately takes effect Disabled Forces of this type are inactive.
Page 80
1. Open the SFC routine. 2. Right-click the transition or the path that is forced and then click Step Through. Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 81
Chapter 3 Force steps When to use an SFC force To override the logic of an SFC, you have these options. If you want to Then Override the conditions of a transition each time the SFC Force a transition. reaches the transition Prevent the execution of one or more paths of a Force a simultaneous path.
Page 82
• Determine that Tran_012 is TRUE Force a simultaneous path To prevent the execution of a path of a simultaneous branch, force the path FALSE. When the SFC reaches the branch, it executes only the un-forced paths. Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 83
Chapter 3 Force steps This path executes. This path does not execute. If you force a path of a simultaneous branch to be FALSE, the SFC stays in the simultaneous branch as long as the force is active (installed and enabled). •...
Page 84
From the Logic menu, click SFC Forcing and then click Disable All SFC Forces. Then click Yes to confirm. Remove all SFC forces From the Logic menu, click SFC Forcing and then click Remove All SFC Forces. Then click Yes to confirm. Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 85
Index action 71 enable assign qualifier 69 force 81 boolean 28 EOT instruction 72 call a subroutine 72 expression choose between boolean and non-boolean 27 BOOL expression 34, 68 data type 29 numeric expression 67, 70 non-boolean 27 program 27 reset 46 store 46 force...
Page 86
16 comments 75 don't scan option 40 force a value 81 force element 81 in action 71 last scan 37 subroutine nest 51 call a subroutine 34, 69, 72 numeric expression 67, 70 Rockwell Automation Publication 1756-PM006F-EN-P - October 2014...
Page 87
Index task define 16 text box sequential function chart 76 show or hide in sequential function chart 77 transition BOOL expression 34 call a subroutine 34, 69 choose program method 33 EOT instruction 72 use of a subroutine 72 verify routine 79 wire sequential function chart 26...
Page 88
Automation representative. New product satisfaction return Rockwell Automation tests all of its products to ensure that they are fully operational when shipped from the manufacturing facility. However, if your product is not functioning and needs to be returned, follow these procedures.
Need help?
Do you have a question about the Allen-Bradley Logix5000 Allen-Bradley ControlLogix 1756 Allen-Bradley CompactLogix 1769 Allen-Bradley SoftLogix 1789 Allen-Bradl and is the answer not in the manual?
Questions and answers