This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Sequential Function Chart (SFC) Language• Available as an add-on option for RSLogix 5000 Standard or mini, and included
with RSLogix 5000 Full and Professional• Graphical Free-form drawing / programming environment
– Place steps, transitional, simultaneous and select branches and draw connections to determine execution flow
– Position and Organize blocks based on application to improve readability– Floating or linked text boxes provide application documentation (Stored off-line)
• Embed Structured Text in transitions and actions directly– Improves readability and maintenance– Eliminates extraneous routines– Use ST to call routines in FBD, LD,
SFC or ST when needed
• Off-line editing with on-line monitoring– Display Auto-scroll keeps active step
In the view to simply maintenance– Works with Logix5000 engine to
support upload/download of SFCroutines from processor
• Routine overview button in editor provides “birds-eye-view” of full SFC routine– All SFC elements scaled to fit a reduced size window above editor– Provides indication of viewable area and permits movement– Lets you know your the area of the chart you are viewing and
• Multiple ways to make SFC element connections– Manually wire the elements together (connect the dots)
– Auto-connect by placing a new element adjacent to an existing element
– Select the best method for your style of programming
• Select and Simultaneous branches are determined automatically by the environment based on where the connections are made– Saves you time when developing the chart
– You can add them manuallyif you prefer
• Auto routing of element connections– All wires run vertically and
horizontally with right angles
– visual display of validconnection points
– Sticky wires stay connectedwhen elements are moved
Automatic SFC Tag Management• The software optionally does an automatic name generation for steps,
transitions and actions– User-specified prefix for step, transition, action, and stop names– Option to include SFC routine name in prefix– Automatic numbering of elements– Reduces typing to improve development time
• If you want more control software can “Prompt for Tag Name” when element is added to SFC chart
– Avoids extra step tocreate and name tags
– Provides more effectivedevelopment workflow
• Option to automaticallydelete tag when element isremoved from chart
Step Attributes and Built in Diagnostics• Structured step tag provide specific names for step configuration and properties
– Includes all IEC61131-3 defined attributes and Logix5000 extensions– Directly accessible via an MMI using names stored in the controller
• Built in step diagnostics capabilities eliminates application code commonly added to most SFC programs
– Step execution time alarms - User configurable presets or expressions for step underrun (AlarmLow) and overrun (AlarmHigh)
– Execution count tracks number of times Step is activated - provides immediate feedback on process execution
Datatype SFC_STEPStatus : DINT; Status Field containing X,FS,SA...AlarmHiX : BOOL; Step executing bit (FS + SA + LS)FS : BOOL; First scan bit SA : BOOL; Step Active bit (Not FS or LS)LS : BOOL; Last scan bitDN : BOOL; Step Timer done, T=PREOV : BOOL; Step timer overflow DINT MaximumAlarmEn: BOOL; Enables Hi/Low AlarmingAlarmLow : BOOL; Low Step Time Alarm FaultAlarmHi : BOOL; High Step Time Alarm FaultPRE : DINT; Step timer preset, sets DN when T=PRET : DINT; Length of time step has executedTMax : DINT; Maximum Step Time value detectedCount : DINT; Number of times step activatedLimitLow : DINT; Low Alarm Step TimeLimitHi : DINT; High Alarm Step Time
• This step property allows you to specify the location in the chart you want to being the execution after a restart– Visualized with double border to help locate within chart
– Operates based on restart configuration
– One initial step per chart or routine
– Can be anywhere in the chart
– Same configuration as a normal step
• Provides flexibility when setting achart so that you can organize theroutine around the application– Does not force the execution
Action Attributes and Built in Diagnostics• Structured Action tag provide specific names for action configuration and properties
– Includes IEC61131-3 defined attributes and Logix5000 extensions
– Directly accessible via an MMI using names stored in the controller
• Built in Action execution count tracks number of times action is activated - provides immediate feedback on process execution
– eliminates application code commonly added to most SFC programs
• Provides option to include an indicator tag displayed on the action– Select any tag available in the local program or controller scope areas
– Provide run-time data-value updates to assist in debug an maintenance
• Configurable Execution Order– Permits easy access to Action execution order
– Simplifies addition of new actions or reworkingscan after development is completed
Datatype SFC_ACTIONStatus : DINT; Status field containing A and QA : BOOL; Action is executingQ : BOOL; Active except for last scan, P0 or P1T : DINT; Time accumulated based on action qualifierPRE : DINT; Time qualifier presetCount : DINT; Number of times action activated
• Action qualifiers determine how an action should execute– Following IEC 1131-3 definitions
– None (no qualifier defaults to Non-Stored)
– N - Non-Stored (action is active when step is active)
– S - Stored (Starts running when step active, continues running even after step goes inactive)
– R - Overriding Reset (stops a stored action)
– L - Time Limited (starts running when step active, stops when step goes inactive or time expires)
– D - Time Delayed (waits a period of time after step active and executes if step is still active)
– P1- Rising Edge Pulse (runs once on step activation)
– P0 - Falling Edge Pulse (runs once on step deactivation)
– P - Pulse (runs once on step activation and again on deactivation P1+P0)
– SL - Stored and Time limited (starts running when step active, stops when time expires)
– SD - Stored and Time Delayed (waits a period of time after step active runs regardless of step state and continues running even after step goes inactive)
– DS - Delayed and Stored (waits a period of time after step active, if step is still active, it runs continuously even after step goes inactive)
• Time based action qualifiers– Qualifier preset can be a fixed value
– An expression evaluated at run time• Tag or complex calculation
Step / Action Preset Expression Builder• Built in expression editor simplifies creation of embedded structured text
expressions for step timer preset value– Quick access to create tags, browser tags, function and operator selection lists
• Permits step timer preset to be determined during step operation• Provides more control over step execution with minimal effort• Reduces need for external code to calculate and set the timer preset value
Transition Forcing & Step Through Provide Chart Debug Capabilities
• Transition Forcing permits each transition to be forced true / false– True – Chart executes the step prior to the transition once then moves to next step– False – Chart scan holds on step prior to transition– Enabled either with I/O or independently to provide more control over force
operations
• Transition “Step Through” option is a one shot true force of a transition– Moves chart to next step one time
• Provides ability to manually override SFC execution– Monitor and debug directly from the interface– Simplifies equipment startup process
• Subroutine Input / Return element provides a means of passing parameters in/out of a SFC based subroutine
– SBR – Specifies tag(s) to store input parameters for use in the routine– RET – Specifies tag(s) you want to return as output parameters– Unlimited number of parameters– Both atomic and compound data types supported– Passed by value
• Permits SFC Routines to be called from other routines within a program– Call from LD, FBD, STX and even another SFC– Provides program development flexibility and supports modular programming
• Directed link permits you to shift the chart execution forward or backward to another step
• Optional link visualization setting– Wired to the destination step (default)– Hidden wire with source / destination references to reduce wire / chart
congestion– Gives you control over how the link is displayed in the chart
• Three new Ladder Diagram (LD) and Structured Text (STX) instructions added to Logix5000 to control SFC Operations– SFR- Sequential Function Chart Reset
• Resets a specific SFC chart to a specified step• Active steps are post scanned by processor
to reset outputs
– SFP – Sequential Function Chart Pause• Suspends the operation of the specified
chart as long is rung is true
– EOT – End of Transitional• Used within a subroutine called by a transitional
to indicate that a step’s operation is complete
• Execute these in a separate LD/ST subroutine called by an Action of a step
• Provides programmatic control over SFC execution– Develop code to determine machine state and automatically adjust to the
appropriate SFC step to facilitate machine startup and recovery– Provides consistency for applications developed in PLC-5
• Logix provides multiple options to configure a controller to selectively reset operations when an SFC step completes– Supports retentive and non-retentive operations– Provides for automatic and controlled shutdown
• Gives you full control of step post-scan operations so that your program operates using the most optimal method
Automatic Reset Programmatic Reset No Reset
Step
Post Scan
Method
•Automatically resets when SFC Step’s transition evaluates to true•CPU Resets outputs, timers and various instructions•ST bit or numeric assignments using [:=] are reset to 0
•Performs an additional scan of SFC Actions with “LS” bit set to true•Utilize “Step.LS” bit to programmatically clear values•Or utilize a falling edge “P0” Action to perform programmatic reset
•No more scans performed•utilize a falling edge “P0” Action to perform programmatic reset
Benefits •No additional programming required to clear outputs•Works similar to PLC’s SFC Language
•You have control over the reset operation via the Step.LS bit•Permits reset of values other than zero•Allows you to leave outputs energized across multiple steps
•Operates like programmatic but avoids overhead of “Last Scan”•Permits reset of values other than zero•Allows you to leave outputs energized across multiple steps
• Initially developed as an off-line development tool with on-line support monitoring and debug support– Develop programs off-line
– Download/upload programs to/from controller
– Monitor programs on-line• Active step/branch animation• Auto-scroll to keep active step on display
– Debug chart execution• Tag data and SFC element property changes• Transition Forcing and Step Through Control• Simultaneous Branch Forcing• Select Branch execution order
– Future on-line programming support
• Initially available for hardware based Logix5000 controllers– ControlLogix5500, FlexLogix5400, CompactLogix5300, and
DriveLogix5700
– SoftLogix5800 support planned for future releases
• Available as an add-on option for RSLogix 5000 Standard or mini, and included with RSLogix 5000 Professional
• Fully functional editor – Red “Wavy Underlines” annotate undefined tags or programming errors– Syntactic coloring monitoring for commands, tags and comments to improves readability– Instruction format tool-tips simplify code development– Cut/Copy/Paste from other text editor tools
• High level programming language similar to Basic, Fortran, Pascal or “C”– If/Then, Case, Do/While, Do/Until,
and For/Next constructs– Most LD and FBD Instructions
supported, Including Motion andProcess
– Call routines in FBD, LD, SFC or STwhen needed
• Off-Line development with on-linemonitoring
– Works with Logix5000 engine to support upload/download of STroutines from processor
– Watch-Pane auto tag list, displaysoperating tag values
– On-Line edit planned (V13)• IEC1131-3 Compliant language
• IF and CASE operations determine execution– Build decisions to meet application’s specific needs– Combined with symbolic tags to provide self documented code
• FOR, WHILE and REPEAT process repetitive operations– Build custom looping algorithms– Easy way to process tables of information’– Performs operation of Ladder file instructions like FAL…
IF <Boolean expression> THEN <statements…>
ELSIF <Boolean expression> THEN <statements…>
ELSE<statements…>
END_IF;
CASE <any integer or real expression> OF< selector value 1> : <statements…>< selector value 2> : <statements…>…
ELSE< statements…>
END_CASE;
FOR <initialize iteration variable>TO <final value expression>[BY <increment expression>] DO<statements…> EXIT
• Automatic numeric datatype conversion reduces development time by eliminating need for temporary tags and conversion functions
• Supports calls to Logix5000’s advanced built instruction set– Over 125+ instructions are at your disposal– Advanced Motion Instructions– FBD Process and Drive control blocks– JSR / SBR / RET functions for routine encapsulation
• The Most Comprehensive built in Instruction set in the industry– Minimizes development and reduces program debug effort
• Language statements, tag names, and comments displayed in different colors– Makes code easier to read and understand– Simplifies code development– Determine quickly if
code will be executedor is commented out
• Red “wavy underlines”denote invalid tags– Locate misspelled or
• Both in-line and multi-line comments supported– In-line comments provide a description for a single line of code
• Beginning with “//” and terminate with a “CRLF”• Can also be used to block a single line of code from execution• Rockwell Automation extension to IEC61131-3
– Multi-line comments provide more descriptive information for how the code performs its function
• Two formats available (* comment…*) or /* comment… */• Can also be used to block a group of code lines from executing
• Green context coloring makes comments standout from code• All Structured Text comments are loaded into the controller during
application download– Available on upload even if you
don’t have the original source– Maintains program white-space,
tabs, and line-feeds topreserver presentation
– Compressed from 70 to 80 %to minimize memory needs
• Each time a Structured Text routine is called (either as a subroutine or as the main routine in a program) it begins executing from the beginning of the routine (Similar to Ladder Diagram)
– Code within the ST routine is executed based on the constructs used
– Using IF and CASE you can selectively choose the code you want to execute• Focuses the execution on specific areas of the code
• Helps reduces routine scan time to optimize CPU performance
– Using FOR, DO UNTIL, and DO WHILE you can perform repetitive loops• Useful for processing arrays or tables
• The CPU watchdog timer continues while ST executes, so infinite loops will be trapped
• Structured Text Transitional Instructions– In Ladder Diagram a rung state change is used to trigger various operations within
• On power-up the controller performs a pre-scan of each task to initialize instructions (outputs, non-retentive timers…)– Select instructions also perform various operations during pre-scan– Example: ONSR one-shot instruction turns off storage bit...
• In ST you can use the bracketed assignment operator “[:=]” to force the value to be reset during pre-scan– Resets Bit tags and forces numeric tags to zero– If you want tag left in last state, use the non-bracketed assignment
operator “:=“– Extension over IEC61131 standard
• Minimizes the amount of code you need to write to initialize your application– Provides more control over what you want retained or reset– Reduces development time
• SFC provides an automatic reset operation– Performs a post-scan of the actions associated with a Step once the
transition indicates the step is completed• Perform a controlled shutdown of the code• In ladder diagram routines, output coil (OTE) instructions are turned off
and non-retentive timers are reset...• The SFC Automatic reset is optional and can be overridden by changing a
controller property
– ST code embedded in an SFC Step’s action directly or ST code called via a JSR are also post scanned
• Depending on the application you can control what occurs during post-scan
• Using the bracketed assignment operator “[:=]“ tags are reset to zero (both Boolean and numeric tags)
• Using non-bracketed assignment operator “:=“ tags are left in their last state
• The Automatic reset combined with the two ST assignment operators simplify program initialization
• The SFC and ST Languages are available in two forms– Add on option for RSLogix 5000 Mini Edition (9324-
RLD200ENE) and Standard Edition (9324-RLD300ENE)
• 9324-RLDSFCE Sequential Function Chart Language Option• 9324-RLDSTXE Structured Text Language Option• 9324-RLDMLPE Multi-Language Pack Option (Includes FBD,
SFC, and STX)• Permits you to purchase just the language(s) you need
– Included with RSLogix 5000 Full Edition (9324-RLD600ENE) and Professional Edition 9324-RLD700NXENE
• All languages are included (LD, FBD, SFC, and ST)• Purchase all languages from a single catalog number
• Complete version of RSLogix 5000– Will Support all Logix5000 Controllers– Provides all of the capabilities of the Standard Edition and
includes support for all optional programming languages• Function Block Diagram (FBD)
• Sequential Function Chart (SFC)
• Structured Text (STX)
– RSNetWorx and RSLogix Emulate5000 are available separately
• Targeted SI’s and Large End Users needed multiple languages and already own RSNetWorx– Existing users of Mini and Standard can get the same capabilities
as the Full Edition by purchasing the separate language options
Ladder Diagram Included Included Included Included Included
Function Block Diagram1, 2
9324-RLDFBDENE
Separate Option Separate Option Separate Option Included Included
Sequential Function Chart1, 2
9324-RLDSFCESeparate Option Separate Option Separate Option Included Included
Structured Text1, 2
9324-RLDSTXE
Separate Option Separate Option Separate Option Included Included
PIDE Autoune9323-ATUNEENE
Separate Option Separate Option Separate Option Separate Option Separate Option
RSLinx Lite Included Lite Included Lite Included Lite Included Pro Included
RSNetWorx CNet & Dnet
9357-ANETL3
Separate Option Separate Option Included Separate Option Included
Drive Executive Lite 9303-4DTE01ENE
Separate Option Included Included Included Included
1756-MVI SW Dev Toolkit Separate Option Separate Option Separate Option Included Included
Functionality / Value Limited Maximum
1. Able to upload and download without option. Must purchase option to view, edit and print routines in this language2. 9324-RLDMLPE Multi-Language pack includes FBD, SFC, and STX