Omron WS02-CXPC1-V8 - V8.1 REV 02-2009 Operation Manual

Sfc programming
Table of Contents

Advertisement

Quick Links

Cat. No. W469-E1-04
SYSMAC
CX-Programmer Ver. 8.1
WS02-CXPC1-V8
Operation Manual
SFC Programming

Advertisement

Table of Contents
loading

Summary of Contents for Omron WS02-CXPC1-V8 - V8.1 REV 02-2009

  • Page 1 Cat. No. W469-E1-04 SYSMAC CX-Programmer Ver. 8.1 WS02-CXPC1-V8 Operation Manual SFC Programming...
  • Page 2 CX-Programmer Ver. 8.1 WS02-CXPC1-V8 Operation Manual SFC Programming Revised February 2009...
  • Page 3: Table Of Contents

    SECTION 3 Offline Operations ............63 3-1 Creating an SFC Program..........................64 3-2 Editing the SFC Chart ............................ 67 3-3 Searching and Replacing within an SFC Chart ....................88 3-4 Offline Program Check........................... 90 3-5 Miscellaneous ..............................91 SECTION 4 Online Operations............93 4-1 Connecting the PLC ............................
  • Page 4 Appendix A ..................117 Specifications for Step Control Instructions......................117 Appendix B ..................123 SFC Task Control Instruction Specifications ....................... 123 Appendix C ..................128 SFC Program Size and Execution Time ....................... 128 Index....................131 Revision History .................135...
  • Page 5: About This Manual

    CX-Programmer, the CJ2 Units with unit version 1.0 or later, or the CS1-H, CJ1-H, or CJ1M CPU Units with unit version 4.0 or later. Be sure to read the precautions provided in the following...
  • Page 6: Read And Understand This Manual

    Warranty and Limitations of Liability WARRANTY (1) The warranty period for the Software is one year from either the date of purchase or the date on which the Software is delivered to the specified location. (2) If the User discovers a defect in the Software (i.e., substantial non-conformity with the manual), and returns it to OMRON within the above warranty period, OMRON will replace the Software without charge by offering media or downloading services from the Internet.
  • Page 7: Application Considerations

    Application Considerations SUITABILITY FOR USE THE USER SHALL NOT USE THE SOFTWARE FOR A PURPOSE THAT IS NOT DESCRIBED IN THE ATTACHED USER MANUAL.
  • Page 8: Disclaimers

    The software specifications and accessories may be changed at any time based on improvements or for other reasons. EXTENT OF SERVICE The license fee of the Software does not include service costs, such as dispatching technical staff. ERRORS AND OMISSIONS The information in this manual has been carefully checked and is believed to be accurate;...
  • Page 9 Manual (W446). Describes the function block functions and structured SYSMAC WS02-CXPC1-V8 W447 text programming functions that can be used with the CX-Programmer Ver. 8.1 Operation CX-Programmer version 8.1. For details on other Manual CX-Programmer functions, refer to the Function Blocks/Structured Texts CX-Programmer Ver.
  • Page 10 Manuals Related to the CJ2, CS1-H, CJ1-H, CJ1M PLCs Name Cat. No. Contents SYSMAC CJ Series W472 Provides an outline of and describes the design, installation, maintenance, and other basic operations for CJ2H-CPU6@-EIP, CJ2H-CPU6@ the CJ-series CJ2 CPU Units. Programmable Controllers The following information is included: Hardware User’s Manual...
  • Page 11 CS1W-SCB21-V1/41-V1, CS1W-SCU21/41, C-series (Host Link) commands CJ2H-CPU6@-EIP, CJ2H-CPU6@, FINS commands CJ1G-CPU@@, CJ1G/H-CPU@@H, Note: This manual describes commands that can be sent CJ1G-CPU@@P, CJ1M-CPU@@, to the CPU Unit without regard for the CJ1W-SCU21-V1/41-V1 communications path, which can be through a Communications Commands...
  • Page 12 The following conventions are used to indicate and classify precautions in this manual. Always heed the information provided with them. Failure to heed precautions can result in injury to people or damage to property.
  • Page 13 Confirm safety thoroughly in advance when using the CX-Programmer to transfer any WARNING I/O memory data to the actual PLC. Changes to the PLC’s I/O memory may result in unexpected operation of devices connected to Output Units, regardless of the PLC’s operating mode.
  • Page 14 Observe the following precautions when using the CX-Programmer’s SFC functions. • As a rule, the outputs of actions are reset when a step is changed from active status to inactive status. When changing an output’s hold/reset setting, change the initial setting or add reset processing as necessary.
  • Page 15 Instructions for Use Do not turn OFF the power supply to the computer while installing or uninstalling the CX-Programmer. The data in a computer may be corrupted. Description of Programmable Controllers The abbreviation “PLC” means Programmable Controller. “PC” is used, however, in...
  • Page 17: Section 1 Overview

    Holding or Resetting an Action’s Outputs ..............33 1-5-2 Action Program Precautions ................... 34 1-5-3 Precautions for Transition Programs................36 1-5-4 Ladder Language Instructions That Cannot Be Used in Action Programs and Transition Programs ......................... 37 1-5-5 Task Allocation ....................... 37 1-5-6 Memory Allocation ......................38 1-5-7 Subchart Online Editing Function Restrictions...............
  • Page 18: Sfc Overview

    SFC, with its graphical representation of step flow and with description of the conditions for step progression and the actions in each step, allows users to program the control of sequential processes. Process Flow...
  • Page 19: Cx-Programmer Features

    Programs are independently completed for each step, and are therefore simple to reuse. Processing is performed on a per step basis, giving process time, only to active steps, and not to inactive steps, allowing the CPU unit cycle time to be shortened.
  • Page 20 Transition Program (ST) Simultaneous Display/Editing of SFC Charts and Action/Transition Programs The SFC chart editor can display the SFC view and program view in a horizontally or vertically split window, allowing an SFC chart and action block (or transition program) to be viewed and edited at the same time.
  • Page 21 Array Variables Array variables can be used in ST and SFC, in addition to being able to use them in conventional ladder programs, executed for tasks in CX-Programmer. Ladder...
  • Page 22: Cx-Programmer Specifications

    Note 1: A ladder or ST program can be used for a transition program. Note 2: Function blocks can be used for transition programs. Transition program transition A transition condition is met when the Boolean variable with the same name as the conditions transition program is switched to “ON”.
  • Page 23 2: Function blocks can be used for action programs. Output reset When a step has become inactive, the action block’s outputs can be reset by any one of the following methods. Select the output reset in the action’s properties (unless the action is Boolean or an ST program).
  • Page 24: Window Components

    Window Components Section 1-3 Window Components This section describes the CX-Programmer’s SFC chart editing functions and functions related to the SFC editor. For details on other functions, refer to the CX-Programmer Operation Manual (Cat. No. W446). 1-3-1 SFC Editor SFC elements can be inserted and connected in the CX-Programmer’s SFC editor to create sequential step programs.
  • Page 25 Variables are automatically registered in the symbol table, corresponding to the SFC elements created in the SFC chart. The variables registered here are used as local variables in the SFC chart. Also, the user can register the variables that are required while writing the SFC program.
  • Page 26 SFC subchart is a partial SFC chart of the SFC program. SFC Editor Displays an SFC chart or subchart. By providing a split SFC view and program view display, the SFC chart can be viewed simultaneously with the associated action program or transition program.
  • Page 27: Menus

    SFC View Program View SFC Editor Display Customization Select Tools - Options from the menu, and then the Appearance or SFC tab to customize the SFC editor display. For details on customizing the SFC editor display, refer to 1-3-6 Environmental Settings Unique to the SFC Programming Functions.
  • Page 28 Tidy Descendant Element Positions Arranges the SFC chart elements positioned after the selected SFC element. View Menu This menu is enabled only when the display magnifier for the SFC editor has been changed. Menu Function Zoom Reset Resets the scaling ratio of the SFC editor to 100%.
  • Page 29 Inserts a transition on the topside of a convergence. Connector Draws a connection from an SFC element that does not have a connection in the SFC chart. Program Menu This menu is enabled only when the SFC editor is displayed. Menu Function Online Edit Transfer SFC/ST Source to...
  • Page 30: Sfc Editor Pop-Up Menu

    The menu displayed depends on which SFC element is selected. Furthermore, menu items are enabled and disabled depending on the connected state of SFC elements. Right-Clicking a Step The step elements menu for working online differs from that for working offline.
  • Page 31 Shows hidden action blocks. Tidy Descendant SFC Elements Arranges elements of the SFC chart positioned after the selected step. Right-Clicking a Transition The transition elements menu for working online differs from that for working offline. Offline Pop-Up Menu Menu Sub-Menu Function...
  • Page 32 Window Components Section 1-3 Insert Step Above Adds a step to the topside of the selected transition Add Convergence Adds a convergence and a step, and connects them to the selected transition. Add Simultaneous Sequence Divergence Adds a simultaneous sequence divergence and 2 steps, and connects them to the selected transition.
  • Page 33 Right-Clicking a Divergence Menu Sub-Menu Function Add Divergent Transition Branch Adds a transition to the right side of the selected divergence. Insert Step Above Adds a step and connects it to the topside of the selected divergence. Insert Transition and Step Above...
  • Page 34 Add Connection From Draws out a connection from the Convergence downside of the selected convergence, and connects it to the topside of a step. Delete Connection To Deletes all connections on the topside Convergence of the selected convergence. Delete Connection From...
  • Page 35 Right-Clicking a Simultaneous Sequence Convergence Menu Sub-Menu Function Add Simultaneous Sequence Convergent Step Branch Adds a step and connects it to the topside of the selected simultaneous sequence convergence. Add Transition Adds a transition and connects it to the selected simultaneous sequence convergence.
  • Page 36 Display Indicator Variable on Chart Indicator valuables may be shown/hidden. Edit Action Indicator Variable Enables editing of the selected action block’s indicator variable. Cuts the selected action block to the clipboard. Copy Copies the selected action block to the clipboard. Paste Pastes the contents of the clipboard.
  • Page 37: Toolbar Icons

    Window Components Section 1-3 1-3-4 Toolbar Icons This section lists toolbar items were not supported in CX-Programmer version 7.2, but were added for SFC Programming Functions. Ladder Diagram Toolbar Icon Pop-up Menu Function Zoom Reset Resets the scaling ratio of the SFC editor to 100%.
  • Page 38: Keyboard Shortcuts

    When an action block is selected, this shortcut displays the action Action Qualifier (AQ) qualifier selection combo box. SFC Editing: When a step is selected, this shortcut adds an action block to the step. Actions SFC Editing: When a step is selected, this shortcut changes the step to an initial Initial Step step.
  • Page 39: Environmental Settings Unique To The Sfc Programming Functions

    Diagrams Tab Page Editor View to Show When Split: ST (Default: Structured Text) Sets the content to be displayed when the ST program edit window is in a split window. Select from Structured Text and Symbols. The setting is enabled when the project is saved and reopened.
  • Page 40 Sets the default program type for new projects. Select from Ladder, ST, and SFC. Appearance Tab Page Sets the background color for the SFC editor, the display color for the SFC elements, and the font settings for text. Setting the Display Color Using the Item combo box, select the item to be set.
  • Page 41 The following display settings are available for the SFC editor. Show Grid (Default: Not Checked) Check the checkbox to display the grid; remove the check to hide the grid. Show Transition Names (Default: Checked) Check the checkbox to display the transition names; remove the check to hide the transition names.
  • Page 42 • Subchart Prefix (Display name) • Element Width (Display width) Note: This option setting is effective only on elements that are newly added to the SFC chart. The setting has no effect on elements that were already added.inserted into the SFC Editor only.
  • Page 43: Sfc Programming Example

    Gate Close Limit Sensor Action Flow Scenario for an Unattended Paid Parking Lot A scenario is created by breaking down the action flow, as well as the statuses of the external device. Waiting for an incoming car. -> Step 1: Initial step When a car enters, the vehicle sensor is turned ON, and the active status is transferred to the next step.
  • Page 44 -> Step 4: CloseGate -> Action: Activate reverse rotation of gate motor 10 When the gate is fully closed, the gate close limit sensor is turned ON, and the active status is transferred to the next step. At this point, the reverse rotation of the gate motor is turned OFF.
  • Page 45 Action Program (A_gateOpen): Starting/Stopping the Normal Rotation of the Gate Motor P_On gateOpen Action Program (A_gateClose): Starting/Stopping the Reverse Rotation of the Gate Motor carIn gateClose Note: Leave each action program’s Reset Output at Final Scan setting at its default setting of ON (reset).
  • Page 46: Procedures For Using Cx-Programmer

    Procedures for Using CX-Programmer This section describes the programming flow and SFC chart editing procedure using, as an example, the SFC program for the unattended paid parking lot ticketing system. SFC Programming Flow Select and right-click a Programs item in the project workspace, and select Insert Program - SFC from the pop-up menu.
  • Page 47 In the project workspace, select the Symbols item for the SFC program item. Right-click the symbol table, and select Insert Symbol. Enter the variable name in the Name field of the New Symbol dialog, and click OK. Create ladder action programs (A_ticketOut, A_gateOpen, A_gateClose) as Actions folder in the project workspace.
  • Page 48 SFC Programming Example Section 1-4 the combo box. Double-click the left-hand side of the action block, and select D from the combo box. Double-click the timer value and input 3. 10 Input the transition condition for Step 3. Right-click the transition after Step 3, and select Edit Transition Condition.
  • Page 49: Precautions When Creating Sfc Programs

    (see note) in a statement such as an IF statement. Note: The action flag is ON when the step is active, and OFF when the step is inactive. The flag is written as Action_Name.Q. For details on action flags, refer to the explanation of Flags...
  • Page 50: Action Program Precautions

    Note: If more than one bit or Boolean variable is registered in an action, they are executed in the order that they are registered in the action block.
  • Page 51 The final scan function executes the action program just one more time after the previously executed step becomes inactive, when programming switches to the next step. This final scan function can be used to reset the outputs of the actions that were executed.
  • Page 52: Precautions For Transition Programs

    With processing such as the increment processing shown above, add the action flag by ANDing the flag as a NO execution condition. Even if the final scan is executed, the value of D0 will not be incremented in the final scan.
  • Page 53: Ladder Language Instructions That Cannot Be Used In Action Programs And Transition Programs

    The CS/CJ-series PLCs provide 32 cyclic tasks (128 cyclic tasks only for CJ2-series PLCs). In addition to this, up to 256 extra tasks can be used. (Extra tasks are interrupt tasks that are executed each cycle as cyclic tasks.) (See note 1.) The CX-Programmer can be used to create SFC programs, ladder diagrams, or ST programs in either cyclic tasks or extra tasks.
  • Page 54: Memory Allocation

    1024 SFC Bit SFC Word Note: DM or EM can be used for the "FB Non Retain" memory area. Uncheck the Share SFC with FB Memory checkbox, since neither DM nor EM can be used as memory areas for SFC.
  • Page 55: Subchart Online Editing Function Restrictions

    Precautions When Creating SFC Programs Section 1-5 1-5-7 Subchart Online Editing Function Restrictions Subcharts cannot be edited during online editing.
  • Page 56 Precautions When Creating SFC Programs Section 1-5...
  • Page 57: Section 2 Sfc Fundamentals

    Steps..........................44 2-3-2 Transitions........................50 2-3-3 Action Blocks........................52 2-3-4 Divergences........................59 2-3-5 Convergences ........................59 2-3-6 Simultaneous Sequence Divergences................60 2-3-7 Simultaneous Sequence Convergences ................60 2-3-8 Connections........................61 2-3-9 Automatic Registration of SFC Elements as Local Variables......... 62...
  • Page 58: Sfc Basic Operation

    A step is either active or inactive. An active step executes the actions defined in that step. If the condition for the step to transfer to the next step is met, then the immediately preceding step becomes inactive and the immediately succeeding step becomes active.
  • Page 59: Basic Sfc Execution Cycle

    Note 1: The status is switched even if the next step is active (see note 2). If you do not want the status to switch, add a transition condition that checks whether or not the next step is active.
  • Page 60: Elements Of Sfc

    Can be multiple (Number unlimited). Jump: Jumps to the destination step 2-3-1 Steps A step is an element of an SFC program and represents a single process within an entire process. Operation of Steps A step is either active or inactive.
  • Page 61 Step 1 • Only one initial step can be created within an SFC chart. • The initial step does not necessarily need to be positioned at the head of the program. • An initial step can hold one or many action blocks.
  • Page 62 • When the return step becomes active, it will remain active until the active status is transferred for the parent subchart. • Each subchart requires one entry step and one or more return steps. There is no limit on the number of return steps within a subchart.
  • Page 63 • For a subchart step within another task [program name].[subchart name].[step name].T For details on step flags, refer to the following description under Flags Used to Monitor a Step’s Active Status. Step activation/deactivation instructions can be used for the following purposes.
  • Page 64 If the SA step control instruction is used to activate a step in a different SFC program from an action ladder program in the SFC program, the activated step’s action will be executed in the current or in the next cycle, depending on the order of the SFC program execution task numbers.
  • Page 65 Using the SA and SE Step Control Instructions in a Subchart Step The SA and SE Step Control Instructions cannot be used for a step in the same subchart. Note: SFC operation is different in the CV-series PLCs. In the CV-series PLCs, subchart steps can be used in instruction operands.
  • Page 66: Transitions

    OFF when the corresponding step is inactive. Step Timers These timers indicate how long each step has been active. The timers are expressed as StepName.T, and the timer’s units can be set to 100 ms or 1 s units for each step. Procedures: Adding a Step Right-click a transition, and select Add Step.
  • Page 67 Boolean Variable A transition condition can be defined using a Boolean variable name. Example: In the case of “bFlag”, the condition is met when “bFlag” is ON. Actual Address (Bit) A transition’s condition can be defined using an actual address (bit).
  • Page 68: Action Blocks

    For details, refer to 1-5-4 Ladder Language Instructions That Can Not Be Used in Action Programs and Transition Programs. Do not use timer instructions in a transition program. A timer that has timed out cannot be reset in a transition program.
  • Page 69 When a step becomes active, all actions in its action block are executed according to the conditions set by the action qualifier. While a step is in the active status, each action in its action block is executed once each cycle. During a cycle, action blocks are executed in sequence, from top to bottom, when Boolean bits are specified.
  • Page 70 D, DS, L, SD, SL D, DS, and L control the timing of action execution, using the step timer. The time unit on the timer is the same as that on the step timer for the step to which the action block is allocated.
  • Page 71 • Bit (Boolean variable or actual address) • Action program name When an action is defined as a Boolean variable (bit), the bit is turned ON when the action is executed, and turned OFF when the action is stopped. When an action is defined as an action program name, the action program is executed when the action is executed, and stopped when the action is stopped.
  • Page 72 Note: If the action qualifier is set to “N”, the ladder program may not be able to correctly detect the step “rising” to the active status. For this reason, if a process is to be executed only once, upon the activation of the step, the “P1”...
  • Page 73 Elements of SFC Section 2-3 • If an action is used in more than one step, it will be displayed in parentheses from the second occurrence on to indicate that it is used more than once. Flags Indicating the Execution Status of Actions There are two kinds of flags that indicate an action’s execution status.
  • Page 74 Directly input the name of a Boolean variable as the action name. Or, double-click the right-hand side of an action block, click the [ ] on the right, and select a registered variable name. Clicking [ ] will display all local variables registered in the variables table.
  • Page 75: Divergences

    Step 4 Administering Divergences If a step before a divergence is in the active status and one of the transition conditions after that divergence is met, the active status will be transferred, provided that the step after the transition is currently in the inactive status.
  • Page 76: Simultaneous Sequence Divergences

    A simultaneous sequence divergence is a program control structure for SFC, in which two or more steps are connected after a single transition. A simultaneous sequence divergence is represented by two horizontal lines. A single step is branched into two or more steps, which are made active at the same time. Trans2...
  • Page 77: Connections

    FALSE Administering Simultaneous Sequence Convergences If all the steps before a transition are in the active status, and their transition conditions are met, the active status will be transferred from all the steps before the transition to the step after the transition at the same time, provided that the step following the transition is currently in the inactive status.
  • Page 78: Automatic Registration Of Sfc Elements As Local Variables

    Step 2 Trans2 FALSE • With a jump, an arrow and the step number for the jump destination are described after a transition. • A jump entry is represented by an arrow immediately before the jump destination step (after the transition).
  • Page 79: Section 3 Offline Operations

    Creating a Simultaneous Sequence Divergence/Convergence ........79 3-2-9 Adding a Subchart......................81 3-2-10 Connecting to the Initial Step with a Jump (or Loop) ............. 84 3-2-11 Editing Independent (Isolated) SFC Elements ..............85 3-2-12 Tidying an SFC Chart ..................... 87 3-2-13 Changing the Step Type ....................
  • Page 80: Creating An Sfc Program

    An SFC program is inserted into the project workspace, and the SFC editor is displayed in the right of the workspace. Note: You can also create programs in either ladder or ST. Right-click the Programs item in the project workspace, and select Insert Program - Ladder or Insert Program - Structured Text from the pop-up menu.
  • Page 81: Allocating An Sfc Program To A Task

    An SFC program inserted into a project must be allocated to a “task”, which is the unit for execution. A program that is yet to be allocated to a task will be shown in the project workspace with a check mark on its program icon.
  • Page 82 Section 3-1 Click the close button to close the Program Properties dialog. When the program is allocated to a task, the check mark will be removed from its SFC program item icon in the program directory. Furthermore, the task to which the program is allocated will be indicated in parenthesis, next to the program name.
  • Page 83: Editing The Sfc Chart

    Step A step is the box in which the processing details for a single process are stored. It is represented by a single-line frame. It will be assigned the name, [Step 2] by default, but this can be changed.
  • Page 84: Editing (Inputting) A Transition

    Section 3-2 3-2-2 Editing (Inputting) a Transition A transition condition can be defined by direct input of a Boolean variable or by an ST expression. Alternatively, a transition program can be utilized by specifying the name. To input a transition condition, double-click the target transition, or right-click and select Edit Transition Condition from the pop-up menu.
  • Page 85 Input the name of the transition program as a transition condition. Assigning a Transition Program Name to a Transition A transition program can be set as a transition condition by assigning its name to a transition. Transition program names can be changed so that they are more self-explanatory.
  • Page 86: Adding An Action To A Step (Or To The Initial Step)

    Name field, and click OK. A prompt to create the variable will be displayed. If ‘Yes’ is selected, then a variable will be added to the Local Symbol table.
  • Page 87 You can insert a ladder program, an ST program, a Boolean variable, or an actual address as an action block. Here, a ladder program will be inserted as an action block. Select and right-click a step, and select Add Action - New Ladder Action from the pop-up menu.
  • Page 88 CX-Programmer Operation Manual (Cat. No. W446). Creating an Action Program in Advance and Assigning as an Existing Program An action program can be created in advance, and can be assigned to an SFC chart action block as an “existing action.” Creating a New Action Program New action programs can be created in either ladder or ST.
  • Page 89 Section 3-2 Setting AQs (Action Qualifiers) This section describes how to set an AQ for an action block. One of the 11 AQs must be set for each action block. The default qualifier is ‘N’. Multiple action blocks may be inserted into a single step. If a step contains two or more action blocks, each must be configured independently.
  • Page 90 Setting the Timer Value for an AQ (Action Qualifier) When “D”, “L”, “DS”, “SD”, or “SL” is selected as the AQ, the timer value must be set. Actions are controlled according to the AQ when the step timer reaches the specified timer value.
  • Page 91: Adding A Transition

    Editing the SFC Chart Section 3-2 Alternatively, clicking an action on the SFC chart will display the action in the split window (program view), as will clicking the number for a hidden action block, which in turn will display a spin box. Change the number to switch the required action program displayed in the program view.
  • Page 92: Adding A Step

    Right-click a transition, and select Add Step from the pop-up menu. Adding a Step and a Transition A step and a transition can be simultaneously added after a transition. Right-click a transition, and select Add Step and Transition from the pop-up...
  • Page 93: Inserting Immediately Before A Step Or Transition

    Inserting Immediately Before a Step or Transition Inserting a Step and a Transition Before a Step A step and a transition can be inserted before a step (or subchart step). Right-click a step (or subchart step), and select Insert Step and Transition Above from the pop-up menu.
  • Page 94 Editing the SFC Chart Section 3-2 A divergence and 2 subsequent transitions will be added. When using a divergence, add SFC elements so that each branch ends with a transition, enabling a convergence. Adding More Transitions Branches can be added to a divergence.
  • Page 95: Creating A Simultaneous Sequence Divergence/Convergence

    Note 1: You can also right-click the convergence, select Connections - Add Connection to Convergence from the pop-up menu, and drag the lead line to the target transition to connect transitions to a convergence. Right-click the line next to a conditional branch and select Use Default Transition Precedence to numerically display the execution order starting from 1.
  • Page 96 In order to add a simultaneous sequence convergence, each parallel-branched process flow must have a step (or subchart step) as its terminating element. Right-click one of the branched steps (or subchart steps), and select Add Simultaneous Sequence Convergence from the pop-up menu.
  • Page 97: Adding A Subchart

    The selected steps (or subchart steps) will be joined to the simultaneous sequence convergence. Note: You can also right-click the simultaneous sequence convergence, select Connections - Add Connection to Convergence from the pop-up menu, and drag the lead line to the target step to connect steps to a simultaneous sequence convergence. 3-2-9...
  • Page 98 Edit the subchart by adding and connecting SFC elements, just as with an SFC chart. The first SFC element must be the entry step, and the last must be the return step Creating a New Subchart Program and Adding an Existing Subchart Step A subchart program can be created in advance, and used as an “existing subchart”...
  • Page 99 Section 3-2 The subchart edit window will be displayed. Edit the subchart. Double-click an SFC program in the project workspace, or right-click and select Open from the pop-up menu. Right-click a transition, and select Add Subchart Step - Existing Subchart from the pop-up menu.
  • Page 100: Connecting To The Initial Step With A Jump (Or Loop)

    Right-click the bottom transition, and select Connections - Add Connection from the pop-up menu. Note: You can also right-click a transition, select Connections - Add Jump from the pop-up menu, and drag the connection to the jump destination step to establish a connection.
  • Page 101: Editing Independent (Isolated) Sfc Elements

    Connecting SFC Elements by Mouse Operation Independent SFC elements in the SFC editor can be connected. Draw out a connection from a selected SFC element, then, using the mouse, select the destination SFC element. If the destination SFC element can be connected, the mouse pointer will change to a connection cursor.
  • Page 102 Connecting the Output of an Isolated Transition as the Input for a Simultaneous Sequence Divergence A connection can be made from an isolated step to a divergence, or from an isolated transition to a simultaneous sequence divergence. Right-click a divergence or on a simultaneous sequence divergence, and select Connections - Add Connection To Divergence from the pop-up menu.
  • Page 103: Tidying An Sfc Chart

    Normal from the pop-up menu. Changing a Normal Step to the Entry Step Right-click a step in a subchart to be changed, and select Step Type - Entry from the pop-up menu. Changing a Normal Step to a Return Step Right-click a step in a subchart to be changed, and select Step Type - Return from the pop-up menu.
  • Page 104: Searching And Replacing Within An Sfc Chart

    Searching within an SFC Chart The “Find” function can be used to search for text strings within an SFC chart. If the text string is found, the SFC element containing the text string will be selected and displayed. The following text strings can be searched.
  • Page 105: Cross-Reference Report

    The Address Reference Tool can display SFC elements and variables, which are using the same address as the selected SFC element or same variable of an SFC chart. Note: For details on the address reference tool, refer to the CX-Programmer Operation Manual (Cat.
  • Page 106: Offline Program Check

    A program check can be performed on an SFC program. Right-click an SFC program in the project workspace, and select Compile from the pop-up menu. The check results for the program will be displayed on the Compile tab of the output window. 3-4-2...
  • Page 107: Miscellaneous

    Array Variables Array variables can be used with CX-Programmer. Array variables can handle a wide selection of data elements of the same data type. Individual values in an array variable are specified using an indexed variable name. Example: Variable Name [Index] The index of an array variable indicates the position of the data element within the array.
  • Page 108: Printing

    Click OK on the displayed New Symbol dialog. The array variable is inserted into the Symbols folder. 3-5-2 Printing The display in SFC View and programs and subcharts in an SFC chart can be printed. Comments can be included. Refer to the CX-Programmer Operation Manual (Cat. No. W446) for details.
  • Page 109: Section 4 Online Operations

    SECTION 4 Online Operations Connecting the PLC ....................94 4-1-1 Working Online....................... 94 4-1-2 Working Offline......................94 Transferring Programs from Computer to PLC............95 Transferring Programs from PLC to Computer............96 Comparing Programs....................97 Monitoring.........................98 4-5-1 Monitoring Start......................98 4-5-2 Monitoring SFC Editor ....................98 4-5-3 Monitoring Action/Transition Programs ...............
  • Page 110: Connecting The Plc

    Select Work Online from the PLC menu. A confirmation message is displayed. Click YES. You will be switched to the online state, and the online SFC editor is displayed. (The SFC editor is displayed in gray to indicate that you are working online.) 4-1-2 Working Offline Select Work Online from the PLC menu.
  • Page 111: Transferring Programs From Computer To Plc

    Tasks allocated SFC programs and ST programs, however, cannot be partially transferred. Note: If an SFC program or an ST program is allocated to a task for transfer to PLC using SFC Programming Function, the program cannot be read by CX-Programmer Ver. 7.0 or earlier.
  • Page 112: Transferring Programs From Plc To Computer

    Transferring Programs from PLC to Computer This section explains how to transfer SFC programs from a PLC to CX-Programmer. Select Transfer - From PLC from the PLC menu. The Transfer Option [From PLC] dialog is displayed. (*1) Select the items you wish to transfer.
  • Page 113: Comparing Programs

    Mnemonic View Button, or double-click the desired location. (See note 2.) Note 1: Select Partial Transfer - Compare Task with PLC from the PLC menu to compare programs on a task unit basis. Tasks allocated SFC programs or ST programs, however, cannot be partially transferred.
  • Page 114: Monitoring

    While in the MONITOR or RUN operating mode, present values will be updated according to the PLC’s operation status. (Present value monitor) If an action has an S-series AQ (S, SL, SD), its activity status can be monitored, even while the step itself is in the inactive status.
  • Page 115 Monitoring Section 4-5 If an action has an S-series AQ (S, SL, SD), its activity status can be monitored, even while the action blocks are hidden. Monitoring the Active Step The active step can be automatically displayed on the screen.
  • Page 116: Monitoring Action/Transition Programs

    In the project workspace double-click the action or transition to be monitored to display the editor window while working online. (*1) Clicking the number for a hidden action block in an SFC chart will display a spin box. Change the number to switch the required action program displayed on the...
  • Page 117 Monitoring Section 4-5 For details, refer to 3-2-3 Adding an Action to a Step (or to the Initial Step).
  • Page 118 Monitoring Section 4-5...
  • Page 119: Section 5 Debug Operations

    SECTION 5 Debug Operations Online Editing ......................104 5-1-1 Online Editing of SFC Charts ..................104 5-1-2 Online Editing of Actions andTransitions Editing ............108 5-1-3 Adding Actions/Transitions ..................111 Force Setting/Force-Resetting .................113 5-2-1 Force-Setting/Force-Resetting Transitions..............113 5-2-2 Force-Setting/Force-Resetting Steps................114 Set Step Timer Value....................115...
  • Page 120: Online Editing

    5-1-1 Online Editing of SFC Charts SFC chart can be edited online, as long as the PLC is not in RUN mode. Starting Online Editing Start monitoring. In the project workspace, select the SFC program to be edited. The SFC program...
  • Page 121 Select Program - Online Edit - Begin. The SFC program becomes editable. Begin editing the SFC program or subcharts. The editing operations are essentially the same as for offline editing. Note: Refer to Limitations of Online Editing on page 108 for precautions that apply during online editing. Transferring the Changes After editing is complete, select Program - Online Edit - Send Changes.
  • Page 122 Selecting a Transfer Mode In general, unless online editing is done frequently and continuously, "Standard Mode” should be used. If the transfer takes a long time to complete, try to resolve the situation by increasing the connection speed with the PLC.
  • Page 123 5. Click the Yes Button. When not in RUN mode, the project will be compared between the computer and PLC and if it is the same, the SFC source code will be transferred. When in RUN mode, change to a different mode and transfer the SFC source code using the menus.
  • Page 124: Online Editing Of Actions Andtransitions Editing

    2) Further extend the cycle time upon completion of online editing, when the execution results are backed up onto the internal flash memory. (During this time, the BKUP indicator on the front of the CPU unit will be lit, and progress will be displayed by the CX-Programmer.) Extension of the cycle time by an online edit is as follows.
  • Page 125 Select Program - Online Edit - Begin. The program becomes editable. Note: Only one SFC element at a time may be added to the project workspace during an online edit session. Begin editing the program. The editing operations are the same as for offline editing,(*1) (*2) Edit the ladder program in the program view.
  • Page 126 Cancel To discard the changes made to an edited ladder or ST program, select Program - Online Edit - Cancel. The edited ladder or ST program will return to the state before the editing, without being transferred to the PLC.
  • Page 127: Adding Actions/Transitions

    5-1-1 Online SFC Chart Editing. In the project workspace, select the folder for the SFC element to be added. Select Actions for an action and Transitions for a transition.
  • Page 128 When SFC elements are added, the changes must be sent to the PLC before online SFC chart editing For details, refer to 5-1-1 Online SFC Chart Editing. Note: Only one SFC element at a time may be added to the project workspace during an online edit session.
  • Page 129: Force Setting/Force-Resetting

    Unless you want to force the status of the previous step to change when you force-set a Transition Flag, always cancel the force-set status in advance.
  • Page 130: Force-Setting/Force-Resetting Steps

    When a step has been force-set, the Actions associated with that step will become active. When a step has been force-reset, the Actions associated with that step will become inactive. Note: The behavior of Action Qualifiers is the same as if the step had become active under normal conditions. Force-Setting/Force-Resetting a Step On the SFC editor, select and right-click the step to force-set/force-reset.
  • Page 131: Set Step Timer Value

    Section 5-3 Set Step Timer Value Present value of a step timer for the active step of the SFC program can be changed, as long as the PLC is not in the RUN mode. Changing a Step Timer Present Value From the SFC editor, select and right-click the step for which the step timer present value is to be changed.
  • Page 132: Work Online Simulator

    Work Online Simulator Section 5-4 Work Online Simulator The PLC Simulator can be used to check the operation of programs without transferring them to an actual PLC. 5-4-1 Starting and Ending the Simulator Starting the Simulator Start the CX-Programmer. Read a program that was previously created.
  • Page 133: Appendix A

    Appendix A Specifications for Step Control Instructions Step Control Instructions are used to control the active status of steps and subcharts in SFC programs. There are two Step Control Instructions. Instruction Mnemonic Outline STEP ACTIVATION Makes the specified step or subchart active to start execution of the actions.
  • Page 134 Error Flag P_ER Note • Designate Step Flags in the form step_name.X. Refer to 2-3-1 Steps for details. • Steps within subcharts cannot be specified • These instructions cannot be input or displayed on a Programming Console. "?" will be displayed.
  • Page 135 In the following example, step 4 will become active when W0.0 turns ON. Step1 W0.0 Step2 Action1 Step4.X Step3 Made active Step4 Step5 In the following example, step 3 (a subchart step) will become active when W0.1 turns ON. Step1 W0.1 Step2 Action1 Step3.X Step3 Made active Step4 Step5...
  • Page 136 Read the present value of the Step Timer. Symbol S: Step Timer D: First word to store the Step Timer’s present value Description The present value of the Step Time specified by S is stored starting at D. Variations Executed Each Cycle for ON Condition Variations...
  • Page 137 S: First word holding the Step Timer’s new present value D: Step Timer Description The present value of the Step Timer specified by S is changed to the value specified starting at D. Variations Executed Each Cycle for ON Condition...
  • Page 138 Specifications for Step Control Instructions Appendix A Operation Example In the following example, the present value of the Step Timer for step 2 is changed to 100 when W0.0 turns ON. Step1 W0.0 &100 Step2 Action1 Step2.T Step3 Step4 Step5...
  • Page 139: Appendix B

    When execution is started again with the SFCON instruction, it will start from the initial step. All outputs in the task that is paused will be reset and processing will be paused. Be careful when using this command if any outputs that will be reset are used in other tasks.
  • Page 140 128.) 128.) For other models For other models N: &0 to &31 (Correspond to cyclic tasks 0 to 31.) N: &0 to &31 (Correspond to cyclic tasks 0 to 31.) Description Description The SFC task specified by N is ended.
  • Page 141 • If the SCFPR instruction is executed for a step for which status has changed in the same cycle and then the SFCON instruction is executed, the SFC task will be started, but the P and P1 actions in steps that became active will not be executed.
  • Page 142 128.) 128.) For other models For other models N: &0 to &31 (Correspond to cyclic tasks 0 to 31.) N: &0 to &31 (Correspond to cyclic tasks 0 to 31.) Description Description Execution of the SFC task specified by N is Execution of the SFC task specified by N is paused.
  • Page 143 Status Error Flag P_ER Note: Specify the number displayed to the right of the SFC program in the workspace for the SFC task number, as shown below. As shown below, SFC programs can be created in interrupt tasks and executed as extra tasks. Refer to the SYSMAC CJ Series CJ2 Unit Software User’s...
  • Page 144: Appendix C

    Right-click an SFC program item in the project workspace, and select Properties from the pop-up menu. The size of the SFC chart is shown on the General tab of the displayed Program Properties Dialog Box: Neither the action program size nor the transition program size is not included.
  • Page 145 SFC Program Size and Execution Time Appendix C Trans7 Step1 Action1 Trans1 bFlag1 Trans2 bFlag2 Step2 D 1s bAction1 Step3 L 1s bAction2 Trans3 bFlag4 bFlag3 Trans4 Step4 Action2 Action3 Trans5 Transition1 Step5 Action4 Step6 Action5 Trans6 bFlag5 Step7 Action3...
  • Page 146 Example of SFC Program Execution Time When CJ2H-CPU68-EIP is used and Step 1 is active in the SFC program shown below, the execution time of the SFC program is about 13 µ seconds, including neither the action program size nor the transition program size.
  • Page 147: Index

    45 array variables, 5, 91 environmental settings, 23 extra tasks, 37 Boolean action (bit), 51 Boolean variable or actual address (bit), 55 features, 3 force-resetting, 113, 114 force-setting, 113, 114 changing step timer present values, 115 comparison, 97...
  • Page 148 22 project workspace, 9 ladder, 3 quick mode, 106 local variables, 62 loop, 61, 84 read step timer value instructions, 47 restrictions, 33 memory area, 38 return steps, 45 memory range, 38 monitoring, 98, 100 set step timer value instructions, 47...
  • Page 149 Index step timer, 73 transfer, 95, 96 step transfer conditions, 44 transfer conditions, 44 steps, 44, 67 transfer modes, 106 subchart, 45 transition programs, 10, 51 subchart programs, 10 transitions, 50, 67 subchart steps, 45 symbol tables, 9 unavailable instructions, 37...
  • Page 150 Index...
  • Page 151: Revision History

    Revision History A manual revision code appears as a suffix to the catalog number on the front cover of the manual. Cat. No. W469-E1-04 Revision code The following table outlines the changes made to the manual during each revision. Page numbers refer to the previous version.
  • Page 152 Revision History...

This manual is also suitable for:

Sysmac ws02-cxpc1-v8Sysmac cx-programmer 8.1

Table of Contents