Home

Operation Manual SFC Programming

image

Contents

1. sample2 CX Programmer NewPLC1 NewProgrami SFC Chart 5 oj xj ila di jew nse s Dranrarm iro ation sa Mindo Help lal x LEALES E AA E B eT ui ES Al E a Lom Th N z E la 3050 14 44 0436 ee ew locos FSS xj Trans 1 gt a olf am N MR A 4 e a InitialStep 2 22 NewPLC1 CJ1G H Offline Pon 1101 A Symbols venice ican ds E always OM Flay MN A He Oper T 10 Table and Unit Setup T Ticketissual Gak Closing Mess ceFlag TicketReceived progran Gason Hn Tornaod k NewProgrami 00 i 2 Symbols enflag F GateFullyOpen Actions PassGate T l PassinaGat amp PassingGate ae yy ses ClosingGate RASIAN GatePassed Lio OpeningGate GateClose l D 3s ClosingGata E TicketIssuance E P Transitions edFlag T GateFullyClosed Y GateFullyClosed e GatePassed Subchart1 Y TicketReceived FALSE Y VehicleDetected i b Initial Step YH GateFullyOpen ET Subcharts GD Subcharti FF Function Blocks S gt KP oject f e al For Help press F1 0 Offline y Window Components Section 1 3 Project Workspace SFC programming elements are hierarchically displayed and managed The Project Workspace is also known as the Project Tree Es NewProject NewPLC1 CJ1M Offline 4 10 Table and Unit Setup a Settings a Programs NewProgram 00 E Symbols SFC Program i port El Sectionl END Local Variable 53 Symbols EA Actions H
2. Action Folder E Action AE Action Action Programs Action3 A Ladder or ST Action Loe E ations a ae Transition Folder os Transitions Transition Programs p E 4 Ladder or ST E S Subchart Folder ga ds eee lt lt Function Blocks Subchart Programs Project SFC Programs SFC programs are registered as child items of the Programs folder in the project workspace Task allocation is required to execute the SFC program Symbol Tables 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 Actions Folder and Action Programs Action programs are registered in the Actions folder under the SFC program structure An action program describes the step actions in ladder or ST Action programs are associated to an action block within an SFC chart by selecting the relevant action name Sample4 CX Programmer SFC NewPLC1 NewProgram1 Diagram i Oj x we File Edit Yiew Insert PLC Program Tools Window Help l x osalmjenjimejeocjiarz ee llosa on nan jr 2 Dm sw a jea eaa Esfera w1 o053 Le 2 2029050 ee CEA AAA xi EA e E E NewPLC1 C51G H Offline Stepi 72 Symbols Trans1 p Trans
3. SFG Font Foreground Colour Background Colour Cell width Y Default m Y Default RENATA Custom Custom Pess E T Draw in 3D Cancel Apply Help Setting the Display Color 1 Using the tem combo box select the item to be set 2 Click Custom and display the Color dialog 3 Select a color and click OK Check the Default checkbox to use the default color 4 Click Apply OK The following items can be set e SFC background e SFC grid line 24 Window Components Section 1 3 SFC element Color of steps transitions divergences convergences simultaneous sequence divergences simultaneous sequence convergences and connections SFC monitoring active step and action block color SFC action action block color SFC subchart step subchart step color SFC transition expression Text color for transition conditions SFC transition name Text color for transition names Setting the Display Text 4 2 3 Click SFC Font and display the Font dialog Select the properties for the display text Click Apply OK The following items can be set Font name Style Size Character set SFC Tab Page Sets the display settings for the SFC editor AA x Diagrams PLE Symbols Appearance Ladder Information General SFC General SFC Editor Settings M Show Transition Name M Show Grid SFC Horizontal Split M Snap to Grid Automat
4. A hi Sa ee mest pamang Moone a ra Operating Mode NewProj Monitor ject E E NewPLC1 CJ1H H E A Symbols Compile All PLC Programs Fe Program Check Options Automatic Allocation AULOMauc ANOCALION Program Assignments Ctrl T Ctrl Shift T jons Clear All Memory Areas A Edt gt Ga lu Data Trace e Time Chart Monitoring AJ Acl A Adl Force c Set Trans3 gate NO Select the items you wish to transfer 3 Click OK Comparison is started and the comparison results are displayed 10 x a Compare Result Current Project Connected PLC File View FS Eo Mnemonic y Current Project NewPLC1 Connected PLC Y Actions E E A_gateOpen ts No applicable data yd Transitions J Subcharts AJ NewProgram2 01 Y Actions E A_gateOpen tai A gateClose Transitions 3 Subcharts AJ NewProgram2 01 gt For Help press FI sme O o M a 4 To display detailed program comparison results move the cursor to the desired location and click the 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 2 Only different same
5. Connections gt Add Subchart Step Open Transition Definition Cut Copy Paste Delete Tidy Descendant SFC Elements The default display ST expression of FALSE changes to the editable state 2 Inputa Boolean variable e g a an ST expression e g a b or a transition program name Creating a Transition Program and Defining it as a Transition A transition program can be created in advance for use as a transition condition Transition programs can be coded in either ladder or ST 1 Right click the Transitions folder in the project workspace and select Insert Transition Ladder or Structured Text from the pop up menu NewProject 0 63 NewPLC1 C51G H Offline Symbols FT 10 Table and Unit Setup e Memory E e Programs E E NewProgram1 00 Symbols Structured Text Erom File Y Allow Docking Hide Float In Main Window Properties M A transition program ladder or ST will be registered under the Transitions folder 2 Double click a transition program item ladder or ST in the project workspace or right click and select Open from the pop up menu 68 Editing the SFC Chart E e Programs E E NewProgrami 00 Symbols Y Actions Y Transitions Open Mnemonics Goto Rung Step Goto Commented Rung Cut Copy el Paste Delete Move e Up Move Down
6. Open Transition Definition Existing Subchart S f IC Cut O O O Copy Trans1 FALSE Paste Delete Tidy Descendant SFC Elements 81 Editing the SFC Chart Section 3 2 When the new subchart step is added the default SFC subchart will be displayed in the program view An SFC subchart item will be added to the Subcharts folder in the project workspace 22 sample CX Programmer SFC NewPLC1 NewProgrami Diagram a Ol x FH File Edit View Insert PLC Program Tools Window Help 18 xj DOSa ajsrR r1aajeciarz re 853 20 LARA DADA as j a aaj Bem m OGSSELK R Ome ERE BARA Oe i ADS 9 e es illo ee ses eG x Project For Help press F1 NewPLC1 Met 0 Node 0 Offline 2 Edit the subchart The default subchart contains an entry step a transition and a step 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 X ZA Creating a New Subchart Program and Adding an Existing Subchart Ste A subchart program can be created in advance and used as an existing subchart in adding a subchart step to an SFC chart Right click a Subcharts folder in the project workspace and select Insert SFC Subchart from the pop up menu il xl NewProject E E NewPLC1 C51G H Offline Symbols q 10 Table and Unit Setup l
7. Select and right click a Programs item in the project workspace and select Insert Program SFC from the pop up menu For details refer to 3 1 2 Creating Inserting a New SFC Program Assigning the SFC program to a task Select and right click an SFC program item in the project workspace and select Properties trom the pop up menu On the General tab of the displayed Program Properties dialog select a task from the Task Type list For details refer to 3 1 3 Assigning an SFC Program to a Task Editing SFC chart When an SFC program is created 3 types of SFC elements initial step transition and step are registered in the SFC chart editor by default Define the transition conditions and actions by adding to these SFC elements Transd b carlin Step Trans Ticket ut Trans ticket OpenGate N A_gateOpen gateopenLirmit D 3s A_gateClose gatecloseLimit A ticketOut Trans3 CloseGate Trans4 F Initial Checking the program Select and right click an SFC program item in the project workspace and select Compile from the pop up menu For details refer to 3 4 1 SFC Program Check Transferring the SFC Program to the PLC Select Transfer To PLC from the PLC menu For details refer to 4 2 Transferring Programs from Computer to PLC SFC Programming Example Section 1 4 Editing the SFC Chart for the Unattended Paid Parking Lot Trans F Transi carlin Trans ticket
8. Rename Y Allow Docking Hide Float In Main Window Properties Section 3 2 The edit window for the transition program ladder or ST will open allowing you to create the program For details on editing in ladder or ST refer to the CX Programmer Operation Manual Cat No W446 3 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 1 Right click the Transitions folder in the project workspace and select Properties from the pop up menu A Programs E E NewProgrami 00 St Symbols Y Actions Transitions 3 Subcharts Open JF Function Blocks Open Mnemonics Goto Rung Step Goto Commented Rung Cut Copy a Paste Delete Rename Y Allow Docking Hide Eloat In Main Window The Transition Properties dialog is displayed 2 Under the General tab input the transition program name into the Name field 3 Click the close button to close the Transition Properties dialog 4 Input the new transition program name as a transition condition 69 Editing the SFC Chart Section 3 2 3 2 3 Adding an Action to a Step or to the Initial Step Right click a step or the initial step select Add Action from
9. EXTENT OF SERVICE The license fee of the Software does not include service costs such as dispatching technical ERRORS AND OMISSIONS The information in this manual has been carefully checked and is believed to be accurate however no responsibility is assumed for clerical typographical or proofreading errors or omissions Vill Manuals Related to the CX Programmer CXONE AL 1 1C V4 AL 1 1D V4 W469 CX Programmer Operation Manual SFC this manual CXONE ALL 1 1C V4 AL 1D V4 CX Programmer Operation Manual Function Blocks Structured Texts CXONE ALL 1 1C V4 AL 1D V4 CX Programmer Operation Manual CXONE ALL 1 1C V4 AL 1D V4 W464 CX Integrator Operation Manual Explains how to use the SFC programming functions For explanations of other shared CX Programmer functions refer to the CX Programmer Operation Manual W446 Describes the function block functions and structured text programming functions that can be used with the CX Programmer For details on other CX Programmer functions refer to the CX Programmer Operation Manual Cat No W446 Describes the general CX Programmer operations that are not specifically related to SFC programming function block functions and structured text programming functions Describes operating procedures for the CX Integrator Network Configuration Tool for CS CJ CP and NSJ series Controllers CXONE ALLILIC V4 ALLJLID V4 W463 Installation and overview of
10. P1 SD Set The action is executed after the user specified time has passed since step activation and continues to be executed even after the step becomes inactive To cancel the SL Set The action is executed when the step becomes active and until the user specified time expires In contrast to L the action continues to be executed even after the step becomes inactive To cancel the execution use the R AQ The timer set value is a setting used by AQs which require a time element Timer set value is required by the following AQs 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 SD and SL control the time using a different timer than the step timer since they operate independently of step status 54 Elements of SFC Section 2 3 Action Execution Timing for Action Qualifiers AQs Inactive status l l a Executed N i Not Executed l p En i Executed just twice when the l final scan function is enabled l Executed just once when the P1 final scan function is disabled When the action is a bit it is I ON for just one cycle PO a Set Value p L gt gt I l I I yy q Sel Value I R Termination of execution S by the R AQ lag Set Value p
11. T l lt lt Set Value gt SL a Set Val et alue Ja i i i l l SD Set Value gt I I L L I l a Set Value DS i lt Set Value gt Actions An action is executed when a step changes to the active status Actions can be specified as either of the following e Bit Boolean variable or actual address e 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 Note Multiple steps can run the same action program within a single execution of the SFC Only simultaneously activated steps are affected by single scan execution Boolean Variable or Actual Address Bit An action block can be defined as a Boolean variable or actual address bit When the step becomes active the Boolean variable or actual address bit is turned ON according to the AQ and the bit is turned OFF if the action stops 55 56 Elements of SFC Section 2 3 Action Program If the action is executed the specified action program is executed Note The same action program can be specified in multiple steps of an SFC chart When two or more steps are active at the same time and have the same action program specified that action program is executed just o
12. amp 8255 Extra task O interrupt task 0 Extra task 1 interrupt task 1 Extra task 255 interrupt task 255 126 SFC Task Control Instruction Specifications Condition Flags Error Flag OFF Note Specify the number displayed to the right of the SFC program in the workspace for the SFC task number as shown below EF Se NewProject HED NewPLC1 CI1G H Offline om Programs a NewPragram 00 A Symbols pe 5 Section 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 Manual Cat No W473 and the SYSMAC CS CJ Series Programmable Controllers Programming Manual Cat No W394 for information on extra tasks AR Transitions E Subcharts Se MewProgram3 Int 01 e a Symbols vee LO Actions de Tess ua When using an extra task specify the SFC task number as shown above for the operand data For the program shown above for extra task 1 interrupt task 1 the SFC task number specification would be as follows Interrupt task 01 gt 88001 e These instructions cannot be used for the task in which they are programmed For example if the instruction is in cyclic task O task number 0 a task number of O cannot be specified e This instruction cannot be input or displayed on a Programming Console will be displayed Appendix B 127 Appendix C SFC Program Size and Execution Time This s
13. e ST expression e Transition program name Elements of SFC Section 2 3 Boolean Action Bit 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 ST Expression A transition condition can be defined using an ST expression Formats for ST programmed condition equations are listed below Formats for Boolean Variables in Defining Transitions with ST Expressions Operator Operator Example Details Name a 8 b OR c Condition met if both a and b are ON or if c is ON NOT bFlag Condition met if bFlag is OFF JOR JOR aorb Conditionmetif a orb isON Equality__ ____fa b_ Condition met if a and b are the same Formats for INT DINT LINT UINT UDINT ULINT CHANNEL REAL LREAL WORD DWORD LWORD UINT_BCD UDINT_BCD and ULINT_BCD Variables in Defining Transitions with ST Expressions Operator Operator Example Details Name Parenthesis nValue 10 amp Condition met if nValue is 10 and a is ON a 10 Comparison Condition met if nValue is 10 or greater Equality i nValue 10 Condition met if nValue is 10 Inequality nValue lt gt 10 Condition met if nValue is not 10 Transition Program Program names may be used as transition conditions A transit
14. Diagrams PLCs Symbols Appearance Ladder Information General SFC AA A NN Y Show rung dividers Ladder Ladder hd MV Show grid by default J Show rune annotation lists Show actual I O bit in XY Show symbol bar Find running tasks only J Synchronize ladder and mnemonic cursors Y Validate moving to the previous next runes by cursor keys Show output instructions horizontally J Allow address referencine without window Offline Edit Mode Show powerflow for the running tasks only Read only mode Y Check duplicated output and TIM CNT No Right busbar J Show right busbar Mnemonics v ST Structured Text y Actions Transitions y Mnemonics hitial position cells 7 Expands to widest rung Instruction dialog Y Show in simple dialog mode f Symbol filtering J Show with comment dialog C Name C Comment Both Cancel Apply Help 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 Structured Text Allows different sections of the same ST program to be viewed in a split window Symbols Displays the ST program edit window and the local symbol table at the same time Editor View to Show When Split SFC Default Actions Transitions Sets the content
15. AJ Transition2 esas F Function Blocks Project For Help press F1 i NewPLC1 Net 0 Node 0 Offline ji E ji Z 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 10 Window Components Section 1 3 Step1 lt q SFC View lt q 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 SFC View Displays an SFC chart or subchart Program View Displays the action program transition program or subchart for the action block transition or subchart step selected in the SFC view The action program transition program or subchart program can be edited in program view while viewing the SFC chart in the SFC editor 1 3 2 Menus Edit Menu This menu is displayed when the SFC editor is displayed in the main editing window and has the cursor focus Menu items are enabled and disabled depending on which SFC element is selected in the SFC editor Edit Step Name Enables editing of the selected step name Edit Transition Condition Enables editing of a selected transition name E
16. Check the checkbox to align SFC elements to the grid when drag and dropped Grid Width Use the slider to adjust the grid size Default Settings for SFC Elements Changes to the options are for newly added elements inserted into the SFC Editor only Existing elements keep the previous settings SFC elements are labeled using the specified text string and an automatically assigned number Step Prefix Display name Transition Prefix Display name Action Body Prefix Display name Transition Body Prefix Display name 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 previously added or inserted into the SFC Editor Note Reserved words for addresses cannot be used as display names Example S ST T TN A AC etc Use Extended SFC Settings When this option is selected the following advanced settings can be used Enabling Disabling the SFC Program s Final Scan The Apply Final Scan Logic Option can be selected in the General Tab of the SFC program s Property Dialog Box Option selected Final scan execution is enabled for that entire SFC program Option not selected Final scan execution is disabled for that entire SFC program Note For details on the final scan function refer to 1 5 2 Action Program Precautions SFC Programming Example Section 1 4 1 4 SFC Programmin
17. Description Execution of the SFC task specified by N is paused All outputs from the paused task are reset When the paused task is restarted with the SFCON instruction it is executed from the status that existed before it was paused Variations SFCPRN Instruction Outline Pauses execution of an SFC task The status of all outputs is held When execution of a paused task is restarted execution will start from the step that was active when the task was paused Symbol SFCPRN N SFC task number Operands Cyclic Task For CJ2 N 80 to amp 128 Correspond to cyclic tasks O to 128 For other models N 80 to 831 Correspond to cyclic tasks 0 to 31 Description Execution of the SFC task specified by N is paused All outputs from the paused task are held When the paused task is restarted with the SFCON instruction it is executed from the status that existed before it was paused Variations Executed Each Cycle for ON SFCPR Condition Executed Each Cycle for ON SFCPRN ee Condition Variations Executed Once for Upward None Differentiation Immediate Refreshing Specification None Variations Executed Once for Upward None Differentiation Immediate Refreshing Specification Applicable Program Areas SFCPR SFCPRN Function Block Step Subroutines Interrupt Area block program program task definitions areas areas programs Operand Data SFCPR SFCPRN Task name Cyclic tasks ae ee
18. E A_gat Partial Transfer p A_gat Y Transition de Cut _ Subcharts Ed Copy 4 F Function Blocks PF Paste Delete Ol Rename Y Allow Docking Eloat In Main Window Properties The check results for the program will be displayed on the Compile tab of the output window 22 Sample3 CX Programmer SFC NewPLC1 NewProgrami Diagram 3 4 lol xj iE File Edit Yiew Insert PLC Program Tools Window Help 8 x fosa EREA EEA EA T Tr EE j xea sekser rm oE EEL amp ae a a 016 050505 IFARA al xl ama Fy te Trans4p a O g Initial a O m ans 2 4 NewProject E E NewPLC1 CJ1H H Offline 52 Symbols GT 10 Table and Unit Setup Settings 8 a Programs E E NewProgrami 00 A Symbols E Actions Y 4 _ticketout rans3 CloseGate 1D 3s A_gateClosg ins4 gatecloseLimit p Initial E am Name r Action N N N lewPLO1 NewProgram1 la icketOut r Action Na a N me ticket me A gateOpen Ladder Act me A gateClose m t N E ction E Compiling SFC NewPrograml NewPrograml 0 errors 0 warnines The programs have been checked with the program check option set to Unit Wer 4 0 TE PR EEN AAA o Ead Donasi NewPLC1 Net 0 Node D Offline 3 4 2 Checking All Programs All programs including ladder programs and ST programs for SFC programs and action progra
19. as long as the PLC is not in RUN mode Starting Online Editing 1 Start monitoring 2 Inthe project workspace select the SFC program to be edited The SFC program is displayed in the SFC editor 2 Sample CX Programmer SFC NewPLC1 NewProgrami Diagram 0 x FS File Edit View Insert PLC Program Tools Window Help l x ormer Bel elata Bl n AR Feall e xaa Esi sia m k n O a E EL ae a ea 21 Bee BAAR Oe S ACS ees e HC xx Trans4p Se OB enc D 6 E E newPLC1 CI1H H Monitor Mode pao se pea _ Symbols Tran m 10 Table and Unit Setup i ans3 gateopenLimit ow Project f For Help press F1 NewPLC1 Net 0 Node 0 Monitor Mode 0 3ms 104 Online Editing Section 5 1 3 Select Program Online Edit Begin The SFC program becomes editable Sample CX Programmer SFC NewPLC1 NewProgram1 Diagram Fa File Edit View Insert PLC Program Tools Window Help ob Gd A a R ee Ctrl F7 ASCII malo ulm Online Edit E KAA BEE PIE Section Rung Manager 2 Send Changes CErl4 ShIFE LE IBRERESIEZE E 19 39 16 or Ctrl U sae xl Go to Online Edit Rung NewProject ED NewPLC1 CI1H H Monitor Mode OS Sy symbols Release SFC Online Edit Access Rights AT 10 Table and Init Sehin J 2 Sample CX Programmer SFC NewPLC1 NewProgrami1 Dia
20. Delete Connection From 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 2 Right click the line next to a conditional branch and select Use Default Transition Precedence to numerically display the execution order starting from 1 Then double click the numbers to change the execution order as desired 3 2 8 Creating a Simultaneous Sequence Divergence Convergence Creating a Simultaneous Sequence Divergence Adding 2 Steps A simultaneous sequence divergence can be added after a transition 1 Right click a transition and select Add Simultaneous Sequence Divergence from the pop up menu 79 Editing the SFC Chart Section 3 2 Edit Transition Condition Add Step and Transition Add Step Insert Transition and Step Above Insert Step Above Add Convergence Add Simultaneous Sequence Divergence Connections Add Subchart Step Open Transition Definition Cut Copy Paste Delete Tidy Descendant SFC Elements A simultaneous sequence divergence and 2 subsequent steps will be added When using a simultaneous sequence divergence add SFC elements so that each branch ends with a step or subchart step enabling a simultaneous sequence convergence Adding More Steps Branches can be added to a simultaneous sequence divergen
21. Trace A a Time Chart Monitoring A Acl Force TAT actiana Select the items you wish to transfer Click OK The transfer is started PLO NewPLCt Cancel Scan Programs ON 10 table le Special Unit Setup M 5 Symbols ME Comments Symbols Comments Program index Transfer To From Comment memory v e Transfer files of all tasks C Transfer files by the task M Use comments rune comments annotations of the PO Select Partial Transfer Task Transfer from PLC from the PLC menu to transfer programs on a task unit basis Tasks allocated SFC programs and ST programs however cannot be partially transferred For details on program transfer refer to the CX Programmer Operation Manual Cat No W446 Comparing Programs Section 44 4 4 Comparing Programs This section describes how to compare the SFC program in a CX Programmer project with the SFC program in a PLC determine any differences 1 Select Transfer Compare with PLC from the PLC menu The Compare Option dialog is displayed See note 1 2 Sample CX Programmer SFC NewPLC1 NewProgrami Diagram Compare Options 3 E x File Edit Yiew Insert PLC Program Tools Window Help Do e S 145 Work Online Ctri w Al 5 Mbs PLO NewPLO1 i E Mirra E work Online Simulate Cramer See ae aes p Include Cancel a KAA S Egt simulator ODGHFELK Ag V3 Program s
22. Transa gateopenLimit CloseGate D 3s A_gateClose Trans4 gatecloseLimit F Initial 1 Register the required user variables carlin ticket ticketOut gateopenLimit gatecloseLimit gateOpen and gateClose in the local symbol table For details refer to 1 4 1 Simple Example of an SFC Program 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 2 Create ladder action programs A_ticketOut A_gateOpen A_gateClose as Actions folder in the project workspace Select and right click the Actions folder for the SFC program items in the project workspace and select Insert Action Ladder Right click the inserted action program select Properties and enter the action program name Right click the inserted action program select Open and create the ladder action program Note Leave the action program s Reset Output at Final Scan setting at its default setting of ON reset Make the same setting for all of the following action programs too 3 Input the name for Step 1 Right click Step 1 and select Edit Step Name Input Initial into Step 1 4 Input the transition condition for Step 1 Right click the transition after Step 1 and select Edit Transition Condition Input carlin as the transition condition 5 Input the name for Step 2 Right click Step 2 and select Edit Step N
23. all actions for which Boolean variables are specified are executed according to the action execution judgment Then action programs are executed For information on the execution order of action programs refer to 1 5 2 Action Program Precautions e When the same action program is specified in two or more steps that are active at the same time that action program will be executed just once in a cycle The transition conditions of active steps are evaluated The transition program connected after the active step is executed at this time The current step is switched to inactive status and the next step is switched to active status if the transition evaluation determined to move to the next step 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 Note 2 SFC operation is different in the CV series PLCs In the CV series PLCs the status is not switched if the next step is active The subchart is executed if the subchart step is active Subcharts are processed in the following order 1 Subchart initialization 2 Transition evaluations inside the subchart 3 Step transition processing inside the subchart 4 Processing to return from the subchart Note Actions inside a subchart are executed at the same timing as previously described in Action Execution lf more than one subchart is active at the sa
24. and Unit Setup Es Settings E Memory card EB Error log PLC Clock lt Memory E A Programs Y NewProgrami 00 A Symbols E Actions YH A_ticketOut A_gateOpen Y a_gateclose A actiont AJ Action2 AJ Action3 AJ Action4 AJ actions Transitions 3 Subcharts JF Function Blocks For Help press F1 a ha E N z a T c ES 5 a Q a 2 uw e g D 2 D F 3 a 2 a 3 3 a oO wi 0 131 4 4 2 For details on editing ladder programs refer to the CX Programmer Operation Manual Cat No W446 Transferring the Changes 1 After editing is complete select Program Online Edit Send Changes The Send Changes dialog is displayed as shown below 109 Online Editing 110 Section 5 1 Sample CX Programmer SFC NewPLC1 NewProgram1 Diagram E File Edit View Insert PLC Program Tools Window Help Co ae Ged oR 2 R comi cane lene lita elon la Online Edit gt ie Begin GHI E pa LQA iste IBIS Section Rung Manager S FA Des i a E E m amas so zix 22 Go to Online Edit Rung z oe Transfer SEC Source to PLC E 2 NewPLC1 CJ1H H Stop Program Mode E S symbols Release SFC Online Edit Access Rights AT 10 Tahle and init Setin j SFC ST Online Edit Transfer A x Transfer Mode Standard Mode Cancel The source is transferred to the PLC wit
25. and connects it to the downside of a transition Add Connection From Draws out a connection from the Convergence downside of the selected convergence and connects it to the topside of a step Convergence of the selected convergence Convergence downside of the selected convergence sequence divergence to the clipboard sequence divergence to the clipboard Tidy Descendant SFC Elements Arranges SFC chart elements positioned after the selected Convergence Right Clicking a Simultaneous Sequence Divergence Add Simultaneous Divergent Step Branch Adds a step to the right side of the selected simultaneous sequence divergence Insert Transition Above Adds a transition to the topside of the selected simultaneous sequence divergence Insert Step and Transition Above Adds a step and a transition and connects them to the topside of the selected simultaneous sequence divergence Connections Add Connection To Draws out a connection from the Divergence topside of the selected simultaneous sequence divergence and connects it to the downside of a transition Add Connection From Draws out a connection from the Divergence downside of the selected simultaneous sequence divergence and connects it to the downside of a step Delete Connection To Deletes the connection on the topside Divergence of the selected simultaneous sequence divergence Delete Connection From Deletes the connection on the Divergence downside of the selected sim
26. complicated requirement exchanges between steps In other words each step can be programmed separately by a different developer making program development simpler and more efficient SFC Overview Section 1 1 Processing Contents Developed by A Steps can be developed separately Processing Contents lt t Developed by B 4 Developed by Processing Contents 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 1 1 2 CX Programmer Features The CX Programmer Support Software is equipped with an SFC editor and can be used to create monitor and debug SFC programs for CS CJ series and CJ2 series PLCs The CX Programmer supports SFC language in addition to conventional ladder and structured text ST programming languages With desirable features such as the user interface carried over from the earlier series and with the added SFC programming function the CX Programmer provides a programming environment that can take full advantage of the SFC language s features Combining SFC Ladder and ST for User Programs Each program allocated to a task can be coded as an arbitrary combination of SFC ladder and ST Hence the language best suited to each process can be utilized e g SFC for step prog
27. contents of the I O memory area An injury may otherwise result N WARNING A eaidion Before switching the operating mode of the PLC verify that there will be no resulting adverse effects on the equipment involved The operation of a user program must be thoroughly tested before use in an actual operation Be sure to run a program check before transferring the program Programs may be erased if program transfer is performed in the wrong direction Before proceeding with the transfer be sure to check direction 95 Transferring Programs from PLC to Computer 4 3 96 Section 4 3 Transferring Programs from PLC to Computer This section explains how to transfer SFC programs from a PLC to CX Programmer J 2 3 id Select Transfer From PLC from the PLC menu The Transfer Option From PLC dialog is displayed 1 2 Sample CX Programmer SFC NewPLC1 NewProgram1 Diagram Fil File Edit View Insert PLC Program Tools Window Help LO co tek R G lB erone arw ole 40 lms a KAA AIS Ea smor OGHEEL amp lo narran moe a mama F i ns E NewProject newPLC1 CI1H H Initial Ds rans 3 symbols Compile All PLC Programs F7 9 10 Table and Program Check Options E Settings Automatic Allocatio Automatic Allocation E Memory card Program Assignments lo ctione Clear All Memory Areas 7 Edit gt lu Data
28. gate begins to open gt Step 3 OpenGate gt AQ N Normal gt Action Active normal rotation of gate motor 7 When the gate is fully opened the gate open limit sensor is turned ON and the active status is transferred to the next step At this point the normal rotation of the gate motor is turned OFF 27 28 10 11 SFC Programming Example Section 1 4 gt Transition condition Trans3 Gate open limit sensor ON gateopenLimit If 3 seconds have elapsed since the gate has fully opened AND if the car has passed the gate and the vehicle sensor has turned OFF the transition conditions are met The reverse rotation of the gate motor is then turned ON and the gate begins to close gt Step 4 CloseGate gt AQ D Delay gt Action Active reverse rotation of gate motor When the gate is fully closed the reverse rotation of the gate motor is turned OFF gt Step 4 CloseGate gt Action Activate reverse rotation of gate motor 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 gt Transition condition Trans4 Gate close limit sensor ON gatecloseLimit The gate returns to the waiting status and waits for the next car efining Variables for the Unattended Paid Parking Lot SFC program user variables must be defined for the external I O devices Gate close
29. is started it is executed from the status that existed before it was paused Variations Executed Each Cycle for ON SFCON ae Condition Variations Executed Once for Upward None Differentiation Immediate Refreshing Specification None 124 SFCOFF Instruction Outline Ends execution of an SFC task The status of all outputs is held When execution of the SFC task is restarted it is executed from the initial step Symbol SFCOFF oN IN SFC task number Operands Cyclic Task For CJ2 N 80 to amp 128 Correspond to cyclic tasks O to 128 For other models N 80 to 831 Correspond to cyclic tasks 0 to 31 Description The SFC task specified by N is ended The status of all outputs is held When execution is restarted with the SFCON instruction the task is executed from the initial step Variations Condition Differentiation Immediate Refreshing Specification None Variations Applicable Program Areas SFCON SFCOFF Function Block Step Sub Interrupt Area block program program routines task definitions areas areas programs OK Operand Data SFCON SFCOFF Task name Operand Cyclic tasks O to 128 for CJ2 80 to amp 128 0 to 31 for other models 80 to 831 Extra task O interrupt task 0 88000 Extra task 1 interrupt task 1 88001 Extra task 255 interrupt task 255 88255 Condition Flags Error Flag OFF SFC Task Control Instruction Specifications Note e Specify t
30. name step name T For a subchart step within the same task subchart name step name T 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 Controlling a Step in an SFC Program from an External Ladder Program Ladder Program SFC Program 47 Elements of SFC Section 2 3 Controlling a Step in an SFC Program from an Action Ladder Program within the Same SFC Program SFC Program Activate Controlling an SFC Step from an Action Ladder Program within Another SFC Program SFC Program SFC Program Note If the SA step control instruction is used to activate another step in the same SFC program from an action ladder program in the SFC program the activated step s action will be executed in the next cycle 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 e lfthe SFC program containing the step activated with the SA step control instruction has already been executed the activated step will be executed in the next cycle e lfthe SFC program containing the step act
31. press F1 NewPLC1 Net 0 Node 0 Offline Section 3 2 4 Double click an SFC program in the project workspace or right click and select Open from the pop up menu 5 Right click a transition and select Add Subchart Step Existing Subchart from the pop up menu EAE A l i n h Edit Transition Condition Add Step and Transition Add Step Insert Transition and Step Above Insert Step Above Add Convergence Add Simultaneous Sequence Divergence Connections Add Subchart Step YU New Subchart Open Transition Definition Cut Copy ai ERE a Paste S gt Delete 3 Sen E Tidy Descendant SFC Elements Trans1 F FALSE a e 6 Double click the subchart step and select the subchart program from the combo list Select from subchart programs that have been registered in the project workspace as Subcharts folder 83 Editing the SFC Chart Section 3 2 MewProject 2 FT 1o Table and Unit Setup pu Settings i Subchartt Subchartt Subcharte Subcharts Cp Subcharti EE Subchart2 H Subchart3 LILES 3 2 10 Connecting to the Initial Step with a Jump or Loop The bottom transition of an SFC chart can be connected to any other step 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 men
32. 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 For details on ladder programs refer to the CX Programmer Operation Manual Cat No W446 For details on ST programs refer to the CX Programmer Operation Manual Function Blocks and Structured Text Cat No W447 Note SFC programs can be set as the default program of a newly created project Setup is performed on the PLCs tab under Tools Options For details refer to 1 3 6 Environmental Settings Unique to the SFC CX Programming Functions SFC chart editor has 3 types of SFC elements Initial Step Transition and Step registered by default 64 Creating an SFC Program 2 Sample CX Programmer SFC NewPLC1 NewProgram2 Diagram Fi File Edit view Insert PLC Program Tools Window Help 10 x 18 x osajejenjr mejociara re os 34 00 0722 2 Deee s ws Js XQ ls laa R 41941 1 OGRGELK ae RA BRS SAPO Pee ees llomea tara s xi NewProject E aD NewPLC1 C51G H Offline 2 Symbols 97 10 Table and Unit Setup E Settings Step2 rograms Step1 rans FALSE LJ subcharts 9 NewProgram2 Unassigned Symbols Actions Transitions Subcharts ee 42 4s fa 4 be e a NewPLC1 Net 0 Node 0 Offline 3 1 3 Allocating an SFC Program to a T
33. services from the Internet And if the User discovers a defect in the media which is attributable to OMRON and returns the Software to OMRON within the above warranty period OMRON will replace the defective media without charge If OMRON is unable to replace the defective media or correct the Software the liability of OMRON and the User s remedy shall be limited to a refund of the license fee paid to OMRON for the Software LIMITATIONS OF LIABILITY 1 THE ABOVE WARRANTY SHALL CONSTITUTE THE USER S SOLE AND EXCLUSIVE REMEDIES AGAINST OMRON AND THERE ARE NO OTHER WARRANTIES EXPRESSED OR IMPLIED INCLUDING BUT NOT LIMITED TO WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE IN NO EVENT WILL OMRON BE LIABLE FOR ANY LOST PROFITS OR OTHER INDIRECT INCIDENTAL SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF USE OF THE SOFTWARE 2 OMRON SHALL ASSUME NO LIABILITY FOR DEFECTS IN THE SOFTWARE BASED ON MODIFICATION OR ALTERATION OF THE SOFTWARE BY THE USER OR ANY THIRD PARTY 3 OMRON SHALL ASSUME NO LIABILITY FOR SOFTWARE DEVELOPED BY THE USER OR ANY THIRD PARTY BASED ON THE SOFTWARE OR ANY CONSEQUENCE THEREOF yi Application Considerations SUITABILITY FOR USE THE USER SHALL NOT USE THE SOFTWARE FOR A PURPOSE THAT IS NOT DESCRIBED IN THE ATTACHED USER MANUAL Disclaimers CHANGE IN SPECIFICA TIONS The software specifications and accessories may be changed at any time based on improvements or for other reasons
34. sumuana Action program N 2 EDE O anmnns Bit or Boolean variable HO 4 Action seses Action program o Type of action E Action azi Actiond a Transitions ADD Subrharke Example 2 The execution order for actions in steps that simultaneously become active e g steps 3 and 4 is not by step but rather bits and Boolean variables are executed first and then action programs 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 34 Precautions When Creating SFC Programs Section 1 5 Action program tree in workspace m HA Actions D UC oO Or anvmn eA Action2 Action execution order I Trans2 FALSE DIE DELE Action2 _ 3 4 o First bits CIO 10 01 1 and CIO 10 02 2 are executed i e turned ON and then the action programs are executed in the following order Action 2 3 Action 1 4 and Action 3 5 Refer to 2 2 Basic SFC Execution Cycle for information on the basic SFC execution cycle including the order of execution for action programs Refer to 2 3 3 Action Blocks for information on the execution of action blocks Final Scan Final scan function is an action program execution method defined in the IEC 61131 3 standard The CX Programmer conforms to this IEC standard and is equipped with the final scan function The final scan function executes the action program ju
35. the 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 70 Editing the SFC Chart Section 3 2 Adding a Ladder Program Action Block and Editing the Ladder Program Action blocks can be inserted into each step of an SFC chart 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 1 Select and right click a step and select Add Action New Ladder Action from the pop up menu Note Multiple action blocks can be inserted into a single step by repeating this procedure Step1 Step1 rt Trans1 0 Edit Step Name Step Type Step Timer Add Transition and Step Add Transition Insert Step and Transition Above Insert Transition Above New Structured Text Action Existing 4ctior Add Divergence Add Simultaneous Sequence Convergence Connections escendant SFC Elements 2 An action block is inserted to the right of the step When the action block is inserted the program view will switch to the edit window for ladder programs Furthermore a ladder program item will be added to the project workspace An icon will indicate that the item is a ladder program 3 Use the program view to edit the ladder action program The ladder editing procedure is the same as for CX Program
36. to be displayed in a split window in an SFC editor Select from Actions Transitions SFC and Symbols The setting is enabled when the project is saved and reopened Actions Transitions Displays an SFC chart in the SFC editor s SFC view and an action program or a transition program ladder or ST in the SFC editor s program view SFC Displays a single SFC chart in the SFC editor s SFC view and program view The different parts of the single SFC chart can be seen Symbols Displays the local symbol table and SFC chart in the SFC editor 23 Window Components Section 1 3 PLCs Tab Page Diagrams PLCs Symbols Appearance Ladder Information General SFC V Confirm all operations affecting the PLC Prohibit the online operations until the PG and PLC data matches Check forced status after online connection Default PLG details PLC Type 0s16 CJ1G hd Use Current PLC GPU CPU42 y J Use comment instructions J Automatically Transfer Program to Simulator Cancel Apply Help Default Program Type in New PLC Default SFC 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 x Diagrams PLCs Symbols Appearance Ladder Information General SFC Reset All Ladder Font Mnemonic Font ST Font
37. used and Step 1 is active in the SFC program shown below the execution time of the SFC program is about 13 u seconds including neither the action program size nor the transition program size paction2 130 A action blocks 52 action programs 9 56 action qualifiers 53 actions 55 activate step instructions 47 adding action blocks 70 adding steps 76 adding subchart steps 81 adding transitions 75 array variables 5 91 B Boolean action bit 51 Boolean variable or actual address bit 55 C changing step timer present values 115 comparison 97 compile 90 connecting SFC elements 85 connections 61 convergence 59 creating action programs 72 creating convergences 78 creating divergences 77 creating projects 64 creating SFC programs 64 creating simultaneous sequence convergences 80 creating simultaneous sequence divergences 79 creating subchart programs 81 creating transition programs 68 Index D deactivate step instructions 47 default settings for SFC parts 26 default SFC elements 67 divergence 59 E edit menu 11 entry steps 45 environmental settings 23 extra tasks 37 E features 3 force resetting 113 114 force setting 113 114 H hiding action blocks 74 index 91 indicator variables 58 initial steps 45 67 insert menu 12 inserting SFC programs 64 J jump 84 jump loop 61 131 K keyboard
38. 1 rans Trans Add Step Add Subchart Step gt Add Transition Add Divergence Add Convergence Add Simultaneous Sequence Divergence Add Simultaneous Sequence Convergence Add Step and Transition Add Transition and Step dd Gonnector Show All Action Blocks Hide All Action Blocks Gut Copy Paste Delete Select All Tidy All SFC Elements Import Export Note The actions associated with an individual step may be shown hidden While the action blocks are displayed right click the required step and de select Show Action Blocks from the pop up menu To display action blocks for an individual step when hidden right click the required step and select Show Action Blocks from the pop up menu When more than one action is registered the actions are executed from top down in the order they are arrange in the action program tree in the workspace 3 2 4 Adding a Transition A transition can be added after a step or subchart step 1 Right click a step or subchart step and select Add Transition from the pop up Step1 Step1 Edit Step Name Step Type gt Step Timer gt Add Action gt Show Action Blocks Add Transition and Step Insert Step and Transition Above Insert Transition Above Add Divergence Add Simultaneous Sequence Convergence Connections gt Open Subchart Definition Cut Copy ee Paste ft Delete Tidy Descendant SFC Elements Ad
39. 1 Force Setting Force Resetting Transitions Transitions can be executed or stopped forcibly by force setting force resetting as long as the PLC is not in the RUN mode Force setting turns a transition flag ON and force resetting turns a transition flag OFF The ON OFF status will be maintained until the forced status is cleared or until another force set force reset operation is performed It will not be changed by external inputs or by program execution results Force Setting Force Resetting a Transition 1 Inthe SFC editor select and right click the transition to force set force reset 2 Select Force Transition On or Force Transition Off from the pop up menu The selected transition will be force set force reset Trans q Si Cancel Open Transition Definitior The transition will be marked to indicate that it has been force set force reset as shown below Ds Trans OpenGate JN A gateOpe Clearing the Forced Status of a Transition 1 Inthe SFC editor select and right click the transition for which the force set force reset is to be cleared 2 Select Force Step Cancel from the pop up menu The force set force reset status is cleared for the selected transition Clearing All Forced Statuses 1 Select Force Cancel All Forces from the PLC menu The force set force reset status is cleared for all I O memory areas including transitions Force resetting Transitions I
40. 2 3 8 Connections A connection is the line which connects elements such as steps and transitions and represents the process flow Connections Jump Loop This is a function with which to make the execution jump from a transition to a specified step A jump and a loop are functionally identical but whereas the source and the destination are not connected for a jump they are connected for a loop Jump Jump Entry Step2 Jump 61 Elements of SFC Section 2 3 Loop e With a jump an arrow and the step number for the jump destination are described after a transition e A jump entry is represented by an arrow immediately before the jump destination step after the transition e When the transition conditions for the transition after the jump source step are met the active status is transferred provided that the jump destination step is currently in the inactive status Procedures Adding a Jump Right click a transition select Connections Add Jump From Transition to prepare a connection and then connect it to step which will become the destination of the jump Skip Skip is a divergence which has a transition element but no step element FALSE Procedures Adding a Skip Right click a convergence select Connections Add Connection To Convergence to prepare a connection and then connect it to the transition to be skipped 2 3 9 Automatic Registration of SFC Elements as Local Variables
41. A CIO Area e g I O bits CIO 0000 to CIO 6143 Step Timer EM Area E00000 to E32767 En_00000 to En_32767 n 0 to C binary data Condition Flags Error Flag OFF Note e Specify Step Timers in the form step_name T Refer to 2 3 1 Steps for details e Refer to 2 3 1 Steps for information on using this instruction e This instruction cannot be input or displayed on a Programming Console will be displayed Appendix A Specifications for Step Control Instructions Appendix A TSW Instruction Outline Changes the present value of the Step Timer Symbol TSW Da 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 me Condition Variations Executed Once for Upward TSW Differentiation Immediate Refreshing Specification Applicable Program Areas Function Block Step Subroutines Interrupt task Area block program program programs definitions areas areas Operand Specifications S CIO Area e g I O bits CIO 0000 to CIO 6142 W000 to W510 Holding Bit Area H000 to H510 Step Timer Auxiliary Bit Area A448 to A958 D00000 to D32766 EM Area E00000 to E32766 En_00000 to En_32766 n 0 to C Condition Flags Error Flag OFF Note e Specify Step Timers in the form step_name T Refer to 2 3 1 Steps for details e Refer to 2 3 1 Steps for i
42. C element When a transition is selected this shortcut adds a convergence When a step is selected it adds a simultaneous sequence convergence Adds a branch to a bottom SFC element When a transition is selected this shortcut adds a simultaneous sequence divergence When a step is selected it adds a divergence Inserts an independent step Inserts an independent transition Enables editing for the selected SFC element i e of the name When an action block is selected this shortcut displays the action program selection combo box When an action block is selected this shortcut displays the action qualifier selection combo box When a step is selected this shortcut adds an action block to the step When a step is selected this shortcut changes the step to an initial step Arranges SFC chart elements positioned after the selected SFC element Arranges all elements in the SFC chart Window Components Section 1 3 1 3 6 Environmental Settings Unique to the SFC Programming Functions This section lists environmental setting functions were not supported in CX Programmer but were added for SFC Programming Functions Environmental settings include the operating settings of the SFC programming functions operation settings and display settings 1 Select Tools Options from the menu The Options dialog will be displayed 2 Select a tab and configure the settings 3 Click Apply OK Diagrams Tab Page
43. CX One FA Integrated CX One Setup Manual Tool Package 1X Manuals Related to the CJ2 CS1 H CJ1 H CJ1M PLCs Name i Cat Now Contents O O S SYSMAC CJ Series CJ2H CPU6 ElP CJ2H CPU6 CJ2M CPU1L CU2M CPU3L Programmable Controllers Hardware User s Manual SYSMAC CJ Series CJ2H CPU6 ElP CJ2H CPU6L CJ2M CPU1LI CU2M CPU3L Programmable Controllers Software User s Manual SYSMAC CS CJ Series CS1G H CPUL _I EV1 CS1G H CPULI_IH CS1D CPUL_I_LIH CS1D CPULILIS CJ2H CPU6 1 ElP CU2H CPU6L CJ2M CPU1L CJ2M CPU3 CJ1H CPUL _IH R CJ1G CPU CJ1G CPU 7 L CJ1G H CPULUH LIP CJ1M CPULILI SYSMAC One NSJ Series NSJL 1 111 NSJ JE 11 B G5D O B M3D Programmable Controllers Instructions Reference Manual SYSMAC CS Series CS1G H CPUL 1 1 EV1 CS1G H CPULI_IH Programmable Controllers Operation Manual SYSMAC CJ Series CJ1G CPU CJ1G CPU 5 LI CJ1G H CPU 5 P CJ1M CPU Programmable Controllers Operation Manual SYSMAC CS CJ Series CS1G H CPUL 1 1 EV1 CS1G H CPULI_IH CJ1G CPU CJ1G CPU 7 LJ CJ1G H CPULILH 7 LIP CJ1M CPUL IL Programmable Controllers Programming Manual W472 W473 W474 W339 W393 W394 Provides an outline of and describes the design installation maintenance and other basic operations for the CJ series CJ2 CPU Units The fo
44. Conecte Lie ALEA A 94 4 2 Transferring Programs from Computer to PLC o ooooooooooccccnccnnnnnnnnnnnnnnnnononoonnnnnnnnnnnnnnnnnnnnnnonnnnnnnnnrnnnnnnnnnns 95 4 5 Transi mine Programs rom PLC AO Computer aaa 96 4k Comprimo Sd e de e lla des O 97 SN A A A Eee een ner rene mee 98 SECTION 5 Debug Operations ssccccccsssssccccssssscccccssssccsssssees LOS A Olmo Edna ia 104 slo Force O ELIAS EDIC Restin o o a do add da do a 113 a o a A secrete th Sanna Aland acne statant encima A 115 324 Work Online Simulators tn aa SEE r ST T ETE 116 111 ADPPENOIK Asia LL Specifications for Step Control Instructions ccccccccccccccecccccceeessssseeeeeeeceeeeeeeeeeaaaaesssseeeeeeceseeeeeeeeeeaeaaaaeaeesees 117 Appendix B 000000000000000000000000000000000000000000000000000000000000000000OIOIOIIIIDEABIEAAAAAAAAAIAAA 123 SEC Task Control Instruction Speci Cations ri A A E A 123 Appendix C 00000000000000000000000000000000000000000000000000000000000000000OIOIOIIOIIIBAAIAAAAAIAAAIAAA 128 SEC Procram size and Execution ME A iia 128 MA ic JOY Revision HLISUOPY Vai LOO 1V About this Manual SFC programming functions have been added to the CX Programmer This manual describes the specifications of the SFC language and the CX Programmer operations related to the SFC programming functions For operations not related to SFC programming refer to the CX Programmer Operation Manual Cat No W446 For details on operation
45. End If When step 1 has become inactive action flag Action1 Q goes OFF the action flag Action1 Q becomes FALSE and the output goes OFF 1 5 2 Action Program Precautions Action Program Execution Sequence The order of execution for the actions in multiple steps that become active simultaneously within the same SFC execution cycle is as follows 1 Bits and Boolean variables 2 Action programs If multiple action programs become active they are each executed once each cycle from top down according to their position in the action program tree in the workspace Example 1 The execution order for multiple action programs registered in a single step is not according to the order of the action programs next to the step but rather in the order the action programs are arranged in the workspace 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 Action execution order First bits ClO 10 01 1 and CIO 10 02 2 are executed i e turned ON and then the action WwProject MewPLC1 CJ1M offline 1 Symbols Trans Step ADT IO Table and Unit Setup programs are executed in the following order Action program Action 2 3 Action 1 4 and Action 3 5 J execution order r r ane Pa 5 Action A iii Action program ye Programs a El MewPragrarmi 00 MM 1 A A Bit or Boolean variable N 3 Action
46. H Monitor Mode A Symbols q 10 Table and Unit Setup E Settings E Memory card Error log PLC Clock et Memory E A Programs NewProgrami 00 Running 2 Symbols Actions Transitions Subcharts F Function Blocks gateopenLimit 4 gateOpen Q gateOpen For Help press F1 NewPLC1 Net 0 Node 0 Monitor Mode O 3ms SYNC For details refer to 3 2 3 Adding an Action to a Step or to the Initial Step 101 Monitoring Section 4 5 102 SECTION 5 Debug Operations I A AA aa aN Ser 104 Salat Online Editing ot SEC Chats lianas 104 5 1 2 Online Editing of Actions and Transitions Editing occccccnnnnnnnnnnnnnnnnnnonnnnnnnnnnnnnonnnnss 108 3 1 Addins ACUSE OS is 111 5 2 Force Setting Force Resetting 0 ssseeeeeeececeecccccceseceessssssssssseeeeeeeecceaensaeoees 113 5 2 1 Force Setting Force Resetting TIansSItiODNS oooooooooooooooccnnnnnnnnnnnnnnnnnnnnnnnnonnnnnnnnnnnnnnnnnnss 113 5 2 2 Force Setting Force Resetting Steps ur tinsel roren ieee ra toe E delaras 114 o o A 115 JA A E 116 5 4 1 Starting and Ending the Simulator usa 116 103 Online Editing Section 5 1 5 1 Online Editing SFC programs can be edited when the PLC CPU unit is operating in MONITOR mode This means that SFC programs can be debugged or edited even on devices for which around the clock operation is required 5 1 1 Online Editing of SFC Charts SFC chart can be edited online
47. Init Setin Transfer SEC Source to PLC Release SFC Online Edit Access Rights SFC ST Online Edit Transfer x F Transfer Mode Standard Mode Cancel The source is transferred to the PLC with the program The program can be fully reconstructed when uploaded from the PLC Quick Mode The source is not transferred to the PLC with the program The program cannot be fully reconstructed when uploaded from the PLC 2 Select the transfer mode and click OK The edited SFC program is transferred to the PLC For details on the transfer modes refer to Transfer Modes and Selecting a Transfer Mode below 105 Online Editing Section 5 1 3 When the transfer is complete the SFC program automatically reverts to the non editable state To perform further editing repeat the online editing procedure from the beginning Transfer Modes Standard Mode The SFC source code and object code for the SFC program are both transferred to the PLC CPU Unit In Standard Mode transfer may take a little longer to complete depending on the amount of data You cannot perform another edit or transfer operation while a transfer is in progress Quick Mode Only the object code for the SFC program is transferred to the PLC CPU Unit The SFC source code will not be transferred Since only the object codes are transferred Quick Mode transfers are much faster than Standard Mode transfers After transferring the o
48. SYSMAC CX Programmer Ver 9 CXONE AL l C V4 AL IL 1D V4 Operation Manual SFC Programming SYSMAC CX Programmer Ver 9 1 CXONE AL l 1C V4 AL JLID V4 Operation Manual SFC Programming Revised October 2010 TABLE OF CONTENTS About TUS MEU E A A A A A E Ii v Redd and Understand TUS MORIA AA AAA dia vi Warranty and Limuanons Of Liab ta AAA SAA TEA AAA Sei A vi ADPUCa OR CONSIDERAS iO vil DIS AAA II A E secon Vill SECTION 1 Overview escscsccoccesecccococococcecosocococcesecocococoesesecesocsesesee L Sl SPC OVON Witt AS E EAS A TE A Ree eee wane 2 lez CAER sramimer SPECIICATIONS aariin odao a bonkcauinauneinledtacsaneaansetondainassethlseoneqviaanaqunse deeds 6 eS WAINGCOW OMIPONCMUS uta ici 8 14SEC PO ranne Example iii 24 l 5 Precautions When Creatine SPC Programs serere a ea Sethe e E E A A laste EE aia 33 SECTION 2 SFC Fundamental s ccccccccscsscscccccsccccccccccscccccecs GI 2 SEC Basie Operator to aaa tdo a 42 22 ABASTO SEC Execution Cleo lr 43 2 5 VE A ect cteatueriectsastcieseate E ciaseacoessaae te E a E A O 44 SECTION 3 Offline Operations cccsssccccssscccsssssccssssscccesssccesses OO Salk Creations EC Oda ds 64 32 EMS the SEC EA o 67 5 3 Searchine and Replacing within anm SEC CA as 88 SA ORNE Pros rant MCC AA Pe E RO ECO S 90 DH Mee lano aiii loci 91 SECTION 4 Online Operations csssccccsssscccsssccccsssscccessssccsses JI Acd
49. When a step an action program a transition action with a bit specification or an SFC element for a subchart is created a system variable is automatically registered in the local symbol table 62 3 1 3 2 3 3 3 4 3 5 SECTION 3 Offline Operations Creatine an SECO AMA LL A asaanemenes 64 Saleh Creatine Now Project ltd ita 64 Se Creatine nserine kaNew ECOS adicto 64 3 13 Allocatine an SPC Program to a Tasio 65 Pitino tie SPC CR ii 67 3 2 1 Default Elements of an SFC Program cccccccncncnnnnnnnonnnononnnnnnnnnnnnnnonnnnnnnnnnannnnnnnnnnnnnnnnnnnnnos 67 3 2 2 Editing nputtns a TIOS al 68 3 2 3 Adding an Action to a Step or to the Initial Step coccccccccccnnnnnnnnnnnoooncnncnnncnnnnnnnnos 70 2d AMS TS O olaaa 19 F29 Addin A A ER 76 3 2 6 Inserting Immediately Before a Step or Transition ooooonnnnnncnncnnnnncnnnnnnnnnnonnnnnnnnnnnnnnnnnnos T11 32 Creatine a Diverecence ConvergenGE sores onnie ioe e a E AE T11 3 2 8 Creating a Simultaneous Sequence Divergence Convergence ooooooooooooooooccnncnncnnnnnnnnononos 79 Dele O IA a a a e aE 81 3 2 10 Connecting to the Initial Step with a Jump or LOOP oocccccncncncnnnnnnnnnnnnnononononnnnnnnnnnnnnnos 84 3 2 11 Editing Independent Isolated SFC Element oooooooonnnncccnononnnononnncnnnonnnnnnoonnnnnnnnnnnnnnnonos 85 32 12 Tiida SEC CA 87 2213 Chans ine the Step LI PE A A A A EES 87 Searching and Replacing within an SFC Chart occccccccncncnnnn
50. Work Online from the PLC menu A confirmation message is displayed Sample CX Programmer SFC NewPLC1 NewProgram1 Diagram xj Fa File Edit View Insert PLC Program Tools Window Help Se About to connect to the PLC 0 gt E ne E ATR Online ho Do you wish to continue E Work Online Simulator Ctrl Shift44 X Q a HE Si Exit Simulator lla Al Ea E p Auto Online gt l Operating Mode E NewProject Monitor gt NewPLC1 CIH H Symbols Compile All PLC Programs FE 9 10 Table and Program Check Options Settings Automatic Allocation Se Memory Program Assignments E o Programs NewProgre Memory gt 2 Symbo Transfer gt EL Actions partial Transfer B An Protection E A Glear All Memory reas PH ea AJ Aci lu Data Trace Time Chart Monitoring Force 2 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 2 Sample CX Programmer SFC NewPLC1 NewProgrami Diagram a E Dj xj fo Eile Edit View _Insert PLC Program Tools Window Help 5 SDA i a xj losa ajenj erejociarna 2 6534 L 0 DARIA DODD wlaa aqqa 2 S Bleek e vue oo gael amp 3 8 4 to 5 15 0555 RA FADS ares gt dx NewProject E 2 NewPLC1 CJ1H H St
51. a and input First Address and Size 6 Click the OK Button in the Edit Function Block SFC Memory Range Dialog Box 7 Click the OK Button in the Function Block SFC Memory Allocation Dialog Box Note Set the memory areas for both SFC bit and SFC word 38 Precautions When Creating SFC Programs 1 5 7 Subchart Online Editing Function Restrictions Subcharts cannot be edited during online editing Section 1 5 39 Precautions When Creating SFC Programs Section 1 5 40 SECTION 2 SFC Fundamentals o A N 42 2 2 Basie SPC Execution C yC E sooroo aa E 43 Dao AGE MAC HS OS Cn O nad 44 2E O PP Oia 44 Dae LAS iso ita tias 50 2 AC HON RRA 32 Deore WIV CT ICE eana a A Dp wigueusa aan itaud sattosneasel dante 59 AS CORE O ear fetta re ren etic eat rte er ore 59 2 3 6 Simultaneous Sequence Divergences ccccccccccceeceececeeeeseeessseesseeeeeeeeceeeeeeeeaeaaeassneees 60 2 3 7 Simultaneous Sequence COnversences e 60 2R CONDE CHONS 3 sss onssonsvensdeesooassons adaadedbocnsuapl eee deetocuanepas O EO EA aE EEA 61 2 3 9 Automatic Registration of SFC Elements as Local Variables occcccccccnnnnnmmmmmmmo 62 41 2 1 42 SFC Basic Operation Section 2 1 SFC Basic Operation This section describes the behavior of an SFC program using a basic step progression control Step Progression Control Step progression control is a method of program control in which the execution of each step consisting
52. a convergence put the mouse pointer over the output side of the transition to be connected and click For a simultaneous sequence convergence put the mouse pointer over the output side of the step to be connected and click Connecting the Output of a Convergence as the Input for an Isolated Step or Connecting the Output of a Simultaneous Sequence Convergence as the Input for an Isolated Transition A connection can be made from an isolated step to a convergence or from an isolated transition to a simultaneous Sequence convergence 1 Right click a convergence or on a simultaneous Sequence convergence and select Connections Add Connection From Convergence from the pop up menu 2 For a convergence put the mouse pointer over the input side of the step to be connected and click For a simultaneous sequence convergence put the mouse pointer over the input side of the transition to be connected and click 86 Editing the SFC Chart Section 3 2 3 2 12 Tidying an SFC Chart SFC elements can be tidied in the SFC editor Note When a complicated SFC chart cannot be tidied as intended recover the chart from unintentional modifications using Edit Undo and then adjust the chart manually Tidying an SFC Chart Right click the background of the SFC editor and select Tidy All SFC Elements from the pop up menu All elements in the SFC chart will be tidied Tidying Selected Elements in an SFC Chart Right click an SFC element in an SFC char
53. active always add the action flag as a NO condition for the calculation by ANDing the flag in the execution condition for the calculation For details on action flags refer to the explanation of Flags Used to Monitor a Step s Active Status in 2 3 Elements of SFC 35 Precautions When Creating SFC Programs Section 1 5 Example 1 0 00 oo 0 00 oo Add action flag 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 DO will not be incremented in the final scan Example 2 0 00 JMP0 515 A Add action flag 0 00 JME0 516 When you do not want a timer counter PV refreshed after the step becomes inactive in timer counter instruction processing like the processing in the chart shown above add the action flag by ANDing the flag as a NO execution condition to a JUMP JMPO instruction and enclose the timer counter instruction between JMPO and JMEO Even if the final scan is executed the PV will not be refreshed additionally ST Program Include an Action flag FALSE condition with an AND condition in a statement such as an IF statement and execute the processing 1 5 3 Precautions for Transition Programs A bit output or timer counter instruction used in a transition program will not be reset when moving to the next step e operation of the bit output or timer counter instructio
54. active before the user specified time expires the action will not be executed When the step becomes active the action is executed until the user specified time expires Should the step become inactive execution of the action will be terminated The action is executed for as long as the step is active Carries out the same operation as SD In contrast to SD the action will not be performed if the step becomes inactive before the user specified delay time expires To cancel the execution use the R AQ 53 Elements of SFC Section 2 3 Pulse Ifthe final scan function is enabled the action is executed for two cycles when the step becomes active If the final scan function is disabled the action is executed for only one cycle when the step becomes active a Pulse active Pe al Pulse inactive Reset When a step becomes active and its action is being executed by the S SL SD or DS AQ the specified action is stopped and reset If the action is being executed but not by the S SL SD or DS AQ then the action is only reset not stopped The reset operation sets the following OUT OUT NOT instruction OFF TIM TIMH instruction Reset Other Timer Counter Shift registers Hold S Se The action is executed when the step becomes active and continues to be executed even after the step becomes inactive To cancel the execution use the R AQ execution use the R AQ
55. also confirm which address corresponds to which SFC element of the SFC chart Note For details on cross reference reporting function refer to the CX Programmer Operation Manual Cat No W446 1 Select Cross Reference Report from the View menu The Cross Reference Report window will be displayed 2 Using the Report type combo box and Memory Area combo box set the requirements for the report 3 Click Generate 3 3 4 Address Reference Tool 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 No W446 1 Select Windows Address Reference Tool from the View menu The Address Reference Tool window will be displayed 2 Select an SFC element or a variable from an SFC chart The selected item address will be displayed in the Address field of the Address Reference Tool window 3 Click Find 89 Offline Program Check Section 3 4 3 4 Offline Program Check 3 4 1 SFC Program Check A program check can be performed on an SFC program 1 Right click an SFC program in the project workspace and select Compile from the pop up menu ix x NewProject E E newPLC1 CI1H H Offline 52 Symbols 9 10 Table and Unit Setup E Settings lt lt Memory E a Programs B 2 Symbols Open 3 0 Actions E Atick 2
56. ame Input TicketOut into Step 2 6 Add an action program to the action in Step 2 Right click Step 2 and select Add Action Existing Action Double click the right hand side of the action block and select A_ticketOut from the combo box 7 Input the transition condition for Step 2 Right click the transition after Step 2 and select Edit Transition Condition Input ticket as the transition condition 8 Input the name for Step 3 Right click Step 3 and select Edit Step Name Input OpenGate into Step 3 9 Add an action program to the action in Step 3 Right click Step 3 and select Add Action Existing Action Double click the right hand side of the action block and select A_gateOpen from 31 32 10 11 12 13 14 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 Input the transition condition for Step 3 Right click the transition after Step 3 and select Edit Transition Condition Input gateopenLimit as the transition condition Input the name for Step 4 Right click Step 4 and select Edit Step Name Input CloseGate into Step 4 Add an action program to the action in Step 4 Right click Step 4 and select Add Action Existing Action Double click the right hand side of the action block and select A_gateClose from the combo box Input the transition condition for Step 4 Righ
57. anch ends with a transition enabling a convergence Creating a Conditional Join Add a convergence to merge conditionally branched SFC chart process flows In order to add a convergence each conditionally branched process flow must have a transition as its terminating element Right click one of the conditionally branched transitions and select Add Convergence from the pop up menu 78 Editing the SFC Chart Section 3 2 n ranc s CALCE Edit Transition Condition Add Step and Transition Add Step Insert Transition and Step Above Insert Step Above ho Divergence Add Simultaneous Sequence Connections b Add Subchart Step Open Transition Definition Cut Copy Paste Delete Tidy Descendant SFC Elements A convergence and a subsequent step will be added 2 Right click the created convergence and select Connections Add Connection from the pop up menu x To _Conwl From OK Cancel Add Convergent Transition Branch Add Step Add Subchart Step gt Add Step and Transition Cut Add Connection To Convergence Copy Add Connection From Gonyergence Paste Delete Ti Descndint SPC Honan i The Add Connection dialog will be displayed 3 Confirm that the transitions to be joined are selected in the Add Connection dialog and click OK The selected transitions will be joined to the convergence Delete Connections To Convergence
58. andard mode transfer with source code and quick mode transfer without SFC source code Variables Structure Structure variables are supported for ladder ST action programs and ladder ST transition variables programs They cannot be used on the SFC chart view or Sub chart view TIMER TIMER COUNTER type variables are supported for ladder ST action programs and COUNTER type ladder ST transition programs variables They cannot be used on the SFC chart view or Sub chart view The maximum number of transition programs action programs and subcharts is as follows when using function blocks number of definitions are included CJ2H CPU Units 2 048 max CJ2M CPU Units CJ2M CPUL11 _12 _18 256 max CJ2M CPUL14 L 5 2 048 max CS1H CJ1H CPU Units 1024 max CJ1M CPU Units 256 max Window Components Section 1 3 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 The project workspace and SFC editor can be displayed in a horizontally or vertically split window so that the structural relationship between the SFC chart and action block or transition program can be clearly understood SFC Editor
59. ansfer modes 106 transition programs 10 51 transitions 50 67 U unavailable instructions 37 V view menu 12 133 Index 134 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 07 Revision code The following table outlines the changes made to the manual during each revision Page numbers refer to the previous version Revision Revised content code June 2007 Original production August 2007 Pages 104 to 106 108 Or and subchart or or and subcharts removed Page 113 Information added on force setting transitions Page 125 Precautions added 06 February 2010 Added upgrade information of CX Programmer __ _ 135 Revision History 136 Authorized Distributor
60. ansferring from the active step to the next step are set to the right hand side of a transition in one of the following ways e Bit Boolean variable or actual address e Inputting a ST expression other than FALSE e Inputting a transition program name ladder or ST Transition conditions are set to the ST expression FALSE conditions not fulfilled by default 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 For details refer to 1 3 6 Environmental Settings Unique to the SFC CX Programming Functions Processes can be added as actions in an action block for execution upon activation of the step There is no limit on the number of actions that can be added 67 Editing the SFC Chart 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 1 To input a transition condition double click the target transition or right click and select Edit Transition Condition from the pop up menu Step1 Step1 Edit Transition Condition Add Step and Transition Add Step Insert Transition and Step Above Insert Step Above Add Convergence Add Simultaneous Sequence Divergence
61. ask An SFC program inserted into a project must be allocated to a task which is the unit for execution Section 3 1 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 Note The following procedure for allocating a program to a task may be postponed until program creation is completed Be sure to allocate the program however before transferring it to the PLC as a user program Use the following procedure to allocate a program to a task 1 In the project workspace right click the inserted SFC program item and then select Properties from the pop up menu lt lt Memory E a Programs H NewProgrami 00 52 Symbols Z Transition 3 Subcharts Partial Transfer 4 F Function Blocks Y coe Copy mM Paste Delete Rename Y Allow Docking Hide Eloat In Main Window 2 On the General tab of the displayed Program Properties dialog select a task from the Task Type list To set the program name input the program name into the Name text box at this point 65 Creating an SFC Program Section 3 1 Program Properties a General Protection Comments Name New Programa Task type Hnassiened Unassigned w Cyclic Task 00 Startups Cyclic Task 02 Cyclic Task 03 Cyclic Task 04 3 Click the close button to close the Program Properties d
62. asks Extra tasks containing SFC programs are started and stopped using the SFCON and SFCOFF instructions from other tasks See note 2 The following numbers are used in the SFCON and SFCOFF instructions to specify the task numbers Refer to Appendix B SFC Task Control Instruction Specifications for specifying methods Extra task 2 scheduled interrupt task 1 Extra task 3 scheduled interrupt task 2 Extra tasks 4 to 99 interrupt tasks 4 to 99 Extra tasks 100 to 131 I O interrupt tasks Extra tasks 132 to 255 interrupt tasks 132 to 255 Note 1 When using extra tasks be sure to refer to the CU2H Programmable Controllers Software User s Manual Cat No W473 and the CS CU NSJ Programming Manual Cat No W394 and confirm application methods If the conditions to execute extra tasks as interrupt tasks are met the task will not execute normally 2 Do not use the TKON and TKOFF instructions to stop and start tasks with SFC programs The instructions will not function normally 37 Precautions When Creating SFC Programs Section 1 5 1 5 6 Memory Allocation In CX Programmer the system allocates memory automatically to steps transitions and actions With the factory default setting the FB Non Retain memory area H512 and later of the function block will be allocated This memory area may be insufficient however for larger SFC programs In this case use the SFC bit and SFC word memory areas for SFC When usi
63. becomes active the actions defined in the normal step are executed The normal step is represented as shown below e There is no limit on the number of normal steps used within an SFC chart e A normal step can hold one or many action blocks e When a normal step becomes active action blocks assigned to the step are executed Subchart Step A subchart step is the step that calls up the subordinate SFC chart subchart from an SFC chart The subchart step is represented as shown below Step 1 Subchart 1 A subchart is the macro expansion of an SFC step into a group of SFC programs similar to the subroutine of a conventional programming language 45 Elements of SFC Section 2 3 Subchart Entry Terminal Subchart Step Subchart FALSE Return Step Subchart Return Terminal ATT A subchart is called up by a subchart step lts execution begins at the subchart entry terminal and returns to the main process flow at the subchart return terminal e There is no limit on the number of subchart steps used within an SFC chart e f the transition conditions for the downside transition are met while a subchart step is active the active status is not transferred to the next subchart step until the SFC within the subchart reaches its return step e The processing of a subchart always begins at the subchart entry terminal and ends at the subchart return terminal 4 e When the return step becomes active it will re
64. bject codes in Quick Mode transfer the SFC source code for the SFC program to the PLC CPU Unit when 1 executing Transfer SFC Source to PLC or 2 going offline After sending changes a yellow mark will be displayed at the bottom of the screen to indicate that the SFC source code has not been transferred The yellow mark will disappear after the SFC source code has been transferred 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 Should the transfer time take so long as to interfere with debugging i e when performing frequent and successive online edits while debugging use Quick Mode to transfer but be fully aware of the Limitations of Quick Mode No SFC Source Code Transfer described below AN Cia Limitations of Quick Mode No SFC Source Code Transfer CX Programmer is not capable of uploading a correct program including the SFC charts unless the SFC source code for the SFC program has been transferred Hence when working online if changes made to the SFC program have been transferred in Quick Mode CX Programmer may become incapable of uploading the program if before switching to the offline state i e before the SFC source code is transferred the computer CX Programmer crashes or if the PLC system
65. ce 1 Right click an existing simultaneous sequence divergence and select Add Simultaneous Divergent Step Branch from the pop up menu Step1 Step1 rans2 Add Simultaneous Divergent Step Branch gt m a o Insert Transition Above Step3 Step4 7 Steps E CJ CJ LJ Insert Step and Transition Above Connections b Cut Copy Paste Delete Tidy Descendant SFC Elements A step is added to the simultaneous sequence divergence Creating a Simultaneous Sequence Convergence Add a simultaneous sequence convergence to merge parallel branched SFC chart process flows In order to add a simultaneous sequence convergence each parallel branched process flow must have a step or subchart step as its terminating element 1 Right click one of the branched steps or subchart steps and select Add Simultaneous Sequence Convergence from the pop up menu 80 Editing the SFC Chart Section 3 2 Edit Step Name Step Type b Step Timer gt Add Action Show Action Blocks Add Transition and Step Add Transition Insert Step and Transition Above Insert Transition Above Add Divergence Add Simultaneous Sequence Convergence Connections gt Open Subchart Definition Cut Copy Paste Delete Tidy Descendant SFC Elements A simultaneous sequence convergence and a subsequent transition will be added 2 Right click the simultaneous sequence convergence and select Connecti
66. ce and select Connections Add Connection To Divergence from the pop up menu 2 Fora divergence put the mouse pointer over the output side of the step to be connected and click For a simultaneous sequence divergence put the mouse pointer over the output side of the transition to be connected and click Connecting the Output of a Divergence as the Input for an Isolated Transition or Connecting the Output of a Simultaneous Sequence Divergence as the Input for an Isolated Step A connection can be made from an isolated transition to a divergence or from an isolated step to a simultaneous sequence divergence 1 Right click a divergence or on a simultaneous sequence divergence and select Connections Add Connection From Divergence from the pop up menu 2 For a divergence put the mouse pointer over the input side of the transition to be connected and click For a simultaneous sequence divergence put the mouse pointer over the input side of the step to be connected and click Connecting the Output of an Isolated Transition as an Input for a Convergence or Connecting the Output of an Isolated Step as an Input for a Simultaneous Sequence Convergence A connection can be made from an isolated transition to a convergence or from an isolated step to a simultaneous sequence convergence 1 Right click a convergence or on a simultaneous sequence convergence and select Connections Add Connection To Convergence from the pop up menu 2 For
67. connection from the topside of the selected divergence and connects it to the downside of a step Draws out a connection from the downside of the selected divergence and connects it to the topside of a transition Divergence of the selected divergence Divergence downside of the selected divergence Use Default Transition Precedence Paste Delete Tidy Descendant SFC Elements Right Clicking a Convergence Cut The order of execution can be set by deselecting removing the check marks items By default the execution order is from left to right and numbers are not displayed Cuts the selected divergence to the clipboard Copies the selected divergence to the clipboard Pastes the contents of the clipboard Deletes the selected divergence Arranges elements of the SFC chart positioned after the selected divergence selected convergence selected convergence Add Subchart Step Existing Subchart Add Step and Transition New Subchart Creates and adds a new subchart and connects it to the selected convergence as a subchart step Connects an already registered subchart to the selected convergence as a subchart step Adds a step and a transition and connects them to the selected convergence 17 Window Components Section 1 3 Connections Add Connection Opens the Add Connection dialog Add Comnection To Draws out a connection from the Convergence topside of the selected convergence
68. ct workspace double click the action or transition to be edited to display the editor window 3 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 2 Sample CX Programmer SFC NewPLC1 NewProgrami Diagram Fa File Edit View Insert PLC Program Tools Window Help Io gt El a Ela amp compile Ctrl F V Ral nio T Online Edit aKa S i BIg Section Rung Manager 27 Send Changes RA BA Oe i ap En 4 ag a oe om izi xi Go to Online Edit Rung NewProject E m NewPLC1 CJ1H H Stop Program Mode E Symbols gT 10 Table and Unit Setup E3 Settings 5 Memory card EB Error log PLC Clock Transfer SEC Source to PLC Release SFC Online Edit Access Rights TicketOut lt r Memory E eS Programs G2 NewProgrami 00 Symbols y Actions 4_ticketout amp A_gateOpen EA A mataflnca OpenGate 4 Begin editing the program The editing operations are the same as for offline editing 1 2 1 Edit the ladder program in the program view 2 Sample CX Programmer SFC NewPLC1 NewProgram1 Diagram E J ol xj File Edit View Insert PLC Program Tools Window Help lj x ERER e XQ P S ils ER m oo a E EL ale a a a a a uE NewProject E 2 NewPLC1 CJ1H H Stop Program Mode Symbols GT 10 Table
69. determined by the order top to bottom that the action programs are listed in the project workspace 3 An action program is executed just once per cycle unlike the CV series SFC operation even if the action program is used in multiple steps and the multiple steps are active at the same time CX Programmer Specifications Section 1 2 Action qualifiers 11 types Actions Boolean address bits Boolean variables or actual addresses or action programs Note 1 A ladder or ST program can be used for an action program 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 The reset operation depends upon the type of program added as follows e Specified bit Reset e Ladder program The default setting is to reset outputs If you do not want the outputs reset specify that in the action program s properties e ST program Not reset Direct addressing An actual address can be specified for an action or transition using an SFC chart s Boolean action transition or a ladder program Only variables can be used to specify addresses in ST programs Direct addressing is not possible Step control Step activation deactivation Step timer Steps in an SFC chart can be activated or deactivated from the following ladder
70. ding a Transition and a Step A transition and a step can be simultaneously added after a step or subchart step 1 Right click a step or subchart step and select Add Transition and Step from the pop up menu 75 Editing the SFC Chart Section 3 2 Step1 Step1 Edit Step Name Step Type gt Step Timer gt Add Action gt Show Action Blocks Add Transition and Step Add Transition Insert Step and Transition Above Insert Transition Above Add Divergence Add Simultaneous Sequence Convergence Connections gt Open Subchart Definition Cut Copy Paste Delete Tidy Descendant SFC Elements 3 2 5 Adding a Step A step can be added after a transition 1 Right click a transition and select Add Step from the pop up menu Step1 Step1 Edit Transition Condition Add Step and Transition Insert Transition and Step Above Insert Step Above Add Convergence Add Simultaneous Sequence Divergence Connections gt Add Subchart Step gt Open Transition Definition Cut Copy Paste E Delete Tidy Descendant SFC Elements Adding a Step and a Transition A step and a transition can be simultaneously added after a transition 1 Right click a transition and select Add Step and Transition from the pop up menu Edit Transition Condition Add Step and Transition Add Step Insert Transition and Step Above Insert Step Abo
71. dit Action Name Displays a combo box in the selected action block enabling selection of the action program name Edit Action Qualifier Displays a combo box in the action qualifier of the selected action block enabling action qualifier selection block s action qualifier timer block s indicator variable 11 Window Components Section 1 3 Element topside of the selected SFC element Add Connection From SFC Element downside of the selected SFC element Element of the selected SFC element Delete Connection From Deletes the connection on the SFC Element downside of the selected SFC element Tidy Element Positions Arranges all of the elements in the SFC chart 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 Resets the scaling ratio of the SFC editor to 100 Insert Menu This menu is enabled only when the SFC editor is displayed Step When a bottom transition is selected this item adds a step and connects it to the transition When a transition is not selected it inserts an independent step Subchart Step When a bottom transition is selected this item adds a subchart step and connects it to the transition When a transition is not selected it inserts an independent subchart step Transition When a bottom step is selected this item adds a transi
72. documentation for your computer and enable using the RS 232C port as a normal serial port e With some notebook computers the default settings for saving energy do not supply the rated power to the RS 232C port There may be both Windows settings for saving energy as well as setting for specific computer utilities and the BIOS Following the instructions in documentation for your computer disable all energy saving settings Do not turn OFF the power supply to the PLC or disconnect the connecting cable while the CX Programmer is online with the PLC The computer may malfunction Confirm that no adverse effects will occur in the system before attempting any of the following Not doing so may result in an unexpected operation e Changing the operating mode of the PLC e Force setting force resetting any bit in memory e Changing the present value of any word or any set value in memory Check the user program for proper execution before actually running it on the Unit Not checking the program may result in an unexpected operation When online editing is performed the user program and parameter area data in CJ2 CS1 H CJ1 H CJ1M and CP1H CPU Units is backed up in the built in flash memory The BKUP indicator will light on the front of the CPU Unit when the backup operation is in progress Do not turn OFF the power supply to the CPU Unit when the BKUP indicator is lit The data will not be backed up if power is turned OFF To display the status o
73. dures by a qualified operator and only for the purposes described in this manual 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 Indicates an imminently hazardous situation which if not avoided will result in death DANGER or serious injury Additionally there may be severe property damage Indicates a potentially hazardous situation which if not avoided could result in death WARNING or serious Injury Additionally there may be severe property damage Ac ti Indicates a potentially hazardous situation which if not avoided may result in minor or aution X11 moderate injury or property damage NWARNING Caution Caution Confirm safety thoroughly in advance when using the CX Programmer to transfer any 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 The following functions require particular caution when using the CX Programmer to transfer data to the CPU Unit s I O memory e Transferring data from the CX Programmer to the CPU Unit s CIO Area with the PLC Memory Window function e Transferring data from a Memory Card or EM file memory to the CPU Unit s ClO Area with the Memory Card Window function Con
74. e merges a process flow which has been split into two or more process flows i e by a divergence Trans4 FALSE Trans5 59 Elements of SFC Section 2 3 2 3 6 2 3 7 60 Administering Convergences If a step before a convergence is in the active status and its transition conditions are met the active status will be transferred provided that the step after the transition is currently in the inactive status Procedures Adding a Convergence Right click a transition and select Add Convergence Right click an existing convergence and select Connections Add Connection or right click and select Connections Add Connection to Convergence 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 FALSE Administering Simultaneous Sequence Divergences If a step before a transition is in the active status and its transition conditions are met the active status will be transferred to all the steps after the divergence at the same time provided they are all currently in the inactive status Following the transfer all the steps immediately after the double line are simultaneously made active and are executed in order from left to
75. ection describes how to check the size and execution time of the SFC program object code C 1 SFC Program Object Code Size The SFC program capacity can be checked using CX Programmer 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 Program Properties 3 xl General Comments Mame NewProgram Task type Cyclic Task 07 M Operation start Api Final Scan Logic Size 278 Steps The following table shows the standard program size of each element Program Size Unit Step Task 60 to 90 10 to 20 4 to 40 Ladder ST program 9 to 60 Transition 7 to 20 Ladder ST program 10 to 30 ST equation Depending on the conditional equation Subchart 15 to 30 Note The program size varies depending on the divergence convergence method or the combination of AQ types Example of SFC Program Size The SFC program size shown below is about 370 steps including neither the action program size nor the transition program size 128 SFC Program Size and Execution Time Appendix C Trans1 bAction2 Trans3 bFlag3 Trans5 Transition1 C Step1 Total SFC Program Usage The total number of action programs transition programs and sub charts used in SFC programs is di
76. efault setting the outputs are reset If you want to retain the output status deselect the ladder program s Reset Output at Final Scan Option remove the check mark Note 1 When timer instructions are being used and outputs are set to be held not reset the Timer Completion Flags will also be held and the next time that the same action is executed it will start execution with the Timer Completion Flag ON If you want to reset the timer Completion Flags separately include the action flag see note 2 in the timer instruction s input condition by ANDing the flag as a NO condition to reset the timer 2 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 Used to Monitor a Step s Active Status in 2 3 Elements of SFC ST Program With the default setting the outputs are held If you want to reset the outputs reset the outputs by including an Action flag FALSE condition 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 Used to Monitor a Step s Active Status in 2 3 Elements of SFC 33 Precautions When Creating SFC Programs Section 1 5 Example TER Action1 If Action FALSE Then output FALSE
77. ettings E Operating Mode gt z Trans LES table Transfer All Monitor gt mal lt t Special Unit Setup mua v Symbols E NewPLC1 CI1H H e Y S Symbols 4 Compile All PLC Programs F7 se bs v E Comments Program Check Options sta ps 3 Program inde Automatic Allocation Program Assignments s Symbols Comments Program index Transfer To From Comment memory y e Transfer files of all tasks Transfer files by the tash IV Clear program memory 7 Exclude Port HostLink Peripheral of PLO Settines from the transfer targe get C ET gt ff From PLC Ctrl Shift T Partial Transfer a Protection CR Compare with PLC ction Clear All Memory Areas 7 Edit Ga lu Data Trace Time Chart Monitoring AJ Acl fA Acl Force a set ACETONE 2 Select the items you wish to transfer 3 Click OK The transfer is started 1 Select Partial Transfer Task Transfer to PLC from the PLC menu to transfer programs on a task unit basis 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 For details on program transfer refer to the CX Programmer Operation Manual Cat No W446 Confirm the safety of the destination node before transferring a program or changing
78. experiences a power failure Should such a situation occur you may be able to re transfer the SFC source code by using the following procedure 106 Online Editing Section 5 1 Transferring the Source Code from a Backed up Project 1 Start the CX Programmer 2 Transfer the project in Quick Mode before transferring the SFC source code The following message will be displayed if the transfer fails for a project CX Programmer v7 2 x FB SFC ST Source in the project D programisample3_NewPLC1 FBK may not be transferred correctly Go online and check the status of the PLC cmai 3 Click the OK Button The backed up project that was transferred with Quick Mode will be started 4 Connect online to the PLC to which data was previously transferred in Quick Mode The following message will be displayed CX Programmer v7 2 x Check if the backed up FB SFC ST Source can be transferred If No is selected the program cannot be transferred from the PLC correctly after going online Yes No 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 Transferring the SFC Source Code Manually 1 Start the CX Programmer and open the project file for which the SFC source code is to be transferred 2 Connect online to the PLC
79. f the Transition Flag following a step that became active when step status changes is force set the step status will immediately change again and the actions will not be executed 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 113 Force Setting Force Resetting Section 5 2 5 2 2 Force Setting Force Resetting Steps Steps can be activated or deactivated forcibly by force setting force resetting as long as the PLC is not in the RUN mode Force setting activates a step and force resetting deactivates a step The activity status will be maintained until the forced status is cleared or until another force set force reset operation is performed It will not be changed by external inputs or by program execution results 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 1 On the SFC editor select and right click the step to force set force reset 2 Select Force Transition On or Force Transition Off from the pop up menu The selected step will be force set force reset Transdh tick w Show Action Blocks Tidy Descendant SFC Elements The
80. f writing to flash memory on the CX Programmer select Display dialog to show PLC Memory Backup Status in the PLC properties and then select Windows PLC Memory Backup Status from the View Menu 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 some Programming Device displays to mean Programmable Controller XV 1 1 1 2 1 3 1 4 1 5 SECTION 1 Overview SFC ON A O PU II 2 ll SECCIONES Wal aiii 2 Pele CA Prosramimer Meares rita siicn 3 CX Prosraminer Speci CavlOms sacc ne note O cio 6 Ie2eL PEC Models Supports Pr a 6 15222 SPE CM CADA dia 6 WINGO OMI ONC MIS rites da AIRE A A aaa alae dd 8 ES TSE e ee te Ut 8 O II sae 11 523 SEC Editor Pop up Menu x A oidos 14 5 4 Toolbar ICONS micaela cocida ic E T 21 ES Keyboard HoOncU aan o ano 22 1 3 6 Environmental Settings Unique to the SFC Programming Functions 23 SEC Prosramimins Explora 2i lA Simple Example Oran ShC FOSTI Mea anti tata tuediuaineasamaisctuunued 27 1 4 2 Procedures for Using EXPLOTA teca 30 Precautions When Creating SFC ProgramMS occcccccccncnnnnnnnonnnnnnnnnonnnnnnnnnnnnnnnnnnnnnnnnnnnnns 33 1 5 1 Holding or Resetting an Action s Outputs oooooonnnccnnnnnnnnnnnnnnnnnnnononononnnnnnnonnnnnnnnnnnn
81. firm safety at the destination node before transferring a program to another node or changing contents of the I O memory area Doing either of these without confirming safety may result in injury Execute online editing only after confirming that no adverse effects will be caused by extending the cycle time Otherwise the input signals may not be readable xi Application Precautions X1V Observe the following precautions when using the CX Programmer s SFC functions As arule 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 When making changes verify the operational timing of actions in the preceding and following steps Note Refer to 7 5 7 Holding or Resetting an Action s Outputs and 1 5 2 Action Program Precautions for details Observe the following precautions before starting the CX Programmer e Exit all applications not directly related to the CX Programmer Particularly exit any software such as screen savers virus checkers E mail or other communications software and schedulers or other applications that start up periodically or automatically Disable sharing hard disks printers or other devices with other computers on any network e With some notebook computers the RS 232C port is allocated to a modem or an infrared line by default Following the instructions in
82. g Example The section provides a simple example of an SFC program and describes the procedures for program development using CX Programmer 1 4 1 Simple Example of an SFC Program SFC will be used to program a ticketing system for an unattended paid parking lot Study the action flow scenario and clarify the steps and transition conditions Check for external devices also and define the variables Ticket Sensor Ticket Dispenser Gate Open 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 1 Waiting for an incoming car gt Step 1 Initial step When a car enters the vehicle sensor is turned ON and the active status is transferred to the next step gt Transition condition Trans1 Vehicle sensor ON carln 3 When the vehicle sensor is turned ON the ticket dispenser is turned ON and a ticket is issued gt Step 2 TicketOut gt AQ N Normal gt Action Active ticket dispenser 4 When the ticket dispenser issues a ticket the ticket sensor is turned OFF 5 When the driver takes the ticket the ticket sensor is turned OFF and the active status is transferred to the next step At this point the ticket dispenser is also turned OFF gt Transition condition Trans2 Ticket sensor ON ticket 6 When the driver takes the ticket normal rotation of the gate motor is turned ON and the
83. gram a E Oj x FE Eile Edit View Insert PLC Program Tools Window Help 218 x 0 cota oe es Se lates re e eee ele ee e xaa Els sa Te O EEEL mapang aep E xi E NewProject E es NewPLC1 CJ1H H Monitor Mode 5 Symbols GT 10 Table and Unit Setup Settings E Memory card EB Error log E PLC Clock jer Memory A Programs NewProgrami 00 A Symbols E Actions Transitions Subcharts F Function Blocks Trans3 gateopenLimit e A Project For Help press F1 NewPLC1 Net 0 Node 0 Monitor Mode 0 3ms YA 4 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 1 After editing is complete select Program Online Edit Send Changes The Send Changes dialog is displayed as shown below 5 Sample CX Programmer SFC NewPLC1 NewProgrami Diagram fa File Edit Yiew Insert PLC Program Tools Window Help osa a oa Eei ane ero lae ml la Online Edit 27 Begin GHI e a X Q A E EJES BIB Section Rung Manager Em senc Ctrl Shift E Ca eae Ctrl U RA BA Os asas e xl AE Go to Online Edit Rung NewProject E D NewPLC1 CJ1H H Monitor Mode 2 Symbols AT 10 Tahle and
84. h the program The program can be fully reconstructed when uploaded from the PLC C Quick Mode The source is not transferred to the PLC with the program The program cannot be fully reconstructed when uploaded from the PLC 2 Select the transfer mode and click OK The edited ladder or ST program is 3 Cancel transferred to the PLC When the transfer is complete the ladder or ST program automatically reverts to the non editable state To perform further editing repeat the online editing procedure from the beginning 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 Online Editing Section 5 1 5 1 3 Adding Actions Transitions When editing new actions or transitions online perform the following operation to add an action or transition and then edit the added action or transition online using procedure 5 1 1 Online SFC Chart Editing 1 Inthe project workspace select the folder for the SFC element to be added Select Actions for an action and Transitions for a transition Sample CX Programmer SFC NewPLC1 NewProgram1 Diagram O Oj xj FD File Edit view Insert PLC Program Tools Window Help 181 x osa ajena j erjocjiars o 03 N DADR LIC DTAE s a o Al EERME AFA IZ ODE ale see eA ie Ie E NewPr
85. he number displayed to the right of the SFC program in the workspace for the SFC task number as shown below Es NewProject NewPLCi C 1G H Offline Ha Programs Egl MewProgrami 00 o e Symbols 2 a Symbols As shown below SFC programs can be created in interrupt tasks and executed as extra tasks Refer to the SYSMAC CS CJ Series Programmable Controllers Programming Manual Cat No W394 for information on extra tasks AR Transitions O Subcharts Ea MewProgram3 Ink 01 Symbols ve O Actions eee anar When using an extra task specify the SFC task number as shown above for the operand data For the program shown above for extra task 1 interrupt task 1 the SFC task number specification would be as follows SFCON amp 8001 Interrupt task 01 amp 8001 e These instructions cannot be used for the task in which they are programmed For example if the instruction is in cyclic task O task number 0 a task number of O cannot be specified e This instruction cannot be input or displayed on a Programming Console will be displayed Precautions on Using SFCPR Do not execute the SFCPR instruction for an SFC task that has been ended see note Even if the SFCPR instruction is executed for an SFC task that has been ended the outputs will be reset and the task will not be started If this happens you can executed SFCON again to start the task Appendix B Note Use the Task Flag to
86. he unit for the AQ timer value is determined by the step timer setting Right click the step and select Step Timer Use Second Timer or Use Millisecond Timer from the pop up menu Hiding the Action Blocks Action blocks may be shown hidden on the SFC chart While the action blocks are displayed right click the background of the SFC editor and select Hide All Action Blocks from the pop up menu Trans1 Trans Add Step and Add Subchart Step gt Add Transition Add Divergence N Actions Add Convergence Add Simultaneous Sequence Divergence Add Simultaneous Sequence Convergence Add Step and Transition Add Transition and Step 4d0 Connector Select All Tidy All SFC Elements Import Export All action blocks on the SFC chart will be hidden The number of action block included in a step will be displayed to the right of each step 74 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 Showing the Action Blocks Action blocks may be shown hidden on the SFC chart While the action blocks are hidden right click the background of the SFC editor and select Show All Action Blocks from the pop up menu Step Step
87. ialog Qe Memory Qe Memory ES ds Programs E a Programs E Sat MewPrograrmi 00 El Ash MewPrograrni 00 SS Symbols E Symbols Bn E Sectionl aa Section i xy p ENG a PMerProgram Unassigned Symbols re Symbols 10 Actions O Actions a eb Transitions z SF Transitions _ oe IE Subcharts a aie E Subcharts m sE Function Blocks E Function Blocks 4 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 66 Editing the SFC Chart Section 3 2 3 2 Editing the SFC Chart This section describes the process of creating an SFC chart using the SFC editor to connect various SFC elements 3 2 1 Default Elements of an SFC Program When a new SFC program is created in the project workspace the following SFC elements are automatically generated in the SFC editor Initial Step lt HW Stent Transition FALSE lt Transition Conditions Initial Step This is the step that becomes active upon program execution start It is represented by a double line frame It will be assigned the name Step 1 by default but this can be changed For details refer to 1 3 6 Environmental Settings Unique to the SFC CX Programming Functions Transition The transition conditions conditions for tr
88. ically Show Active Step in Monitoring Mode e Automatically Select Active Step in Monitoring Mode Grid width DESA Defaults For New SFC Elements Step Prefix SFC Editar Stepe Transition Prefix SFC Editor Tranz Action Body Prefis VWforkspacel Action Transition Body Pretis VWforkspacel Transition Subchart Prefs Paforkspace Subchart Element width Die Ehk A A ons EI p e Use extended SFC settings SFC Editor Settings 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 SFC Horizontal Split Default Checked Check the checkbox to split the SFC editor window horizontally remove the check to split the window vertically The setting is enabled when the project is saved and 25 Window Components Section 1 3 26 reopened Automatically Show Active Step in Monitoring Mode Default Checked Check the checkbox to have SFC diagram editor program view automatically updated to track the active step while debugging or editing online Automatically Select Active Step in Monitoring Mode Default Checked Displays the active step s action program This function is effective when the action is hidden Snap to Grid Default Not checked
89. ile Advanced Settings I Cancel 3 On the displayed Advanced Settings dialog check the Array Symbol checkbox input the size of the array and click OK x Array Settings Gancel V Array Symbol Array Size fi 0 4 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 92 4 1 4 2 4 3 4 4 4 5 SECTION 4 Online Operations COMBS CLS the PEO cect ee es EEEE EEEE E 94 Andel Working Online sarcina E E O 94 Ape Work me ONE eerren E 94 Transferring Programs from Computer to PLC occcccccnnnnnncnnnnnnoonnccnnnnnnnnnnnnnnnnnnnoos 95 Transferring Programs from PLC to COMPpuUter ccccccccncncnnncnnnnnononnnnnnnnnnnnnnnnnnnnnnnnnnns 96 Comparimo Proa iii a 97 AAPP cenponmaceceasnetenetemaaseatesscenacanacedasatasadadaaacatadaeaaaacacacasa amie 98 Ao Montos tatiana A 98 4 5 2 Monitoring SEC Editor srein aE a a a 98 4 5 3 Monitoring Action Transition Programs oooooooooooooncccnnononnnnnnnnnnnnnnnnnonnnnnnnnnnnnnnnnnnnnnnnnnnos 100 93 Connecting the PLC Section 4 1 4 1 Connecting the PLC This section describes how to connect a PLC to a computer 4 1 1 Working Online While displaying the SFC editor switch to the online mode 1 Select
90. in the waiting status with no processing to perform until the transition conditions are met Steps which do not have an action to execute are referred to as dummy steps Step Types There are following types of steps e Initial step e Normal step e Subchart step Initial Subchart Step 1 Siep Normal A 44 Elements of SFC Section 2 3 Initial Step An initial step is the step that unconditionally becomes active upon program execution start All other steps are inactive at this moment It is also the first step to be executed in the SFC chart When the initial step becomes active the actions defined in the initial step are executed The initial step is represented as shown below e Only one initial step can be created within an SFC chart e The initial step does not necessarily need to be positioned at the head of the program e n initial step can hold one or many action blocks e When the initial step becomes active action blocks assigned to the step are executed If the power supply is turned OFF during SFC program execution The program will be executed from the initial step when the power supply is turned back ON To perform initialization when continuing operation or to select the steps with the step control instructions to continue step operation include status control programming in the initial step Normal Step A normal step is the step that becomes active if the transition condition is met When the step
91. ion of some actions may be prevented by AQs Basic SFC Execution Cycle Section 2 2 2 2 Basic SFC Execution Cycle e Action execution judgment e Action execution O Transition evaluation O Step transition processing O Subchart processing The following processing is performed in the SFC execution cycle as 1 unit for all active steps No processing is performed for inactive steps Action execution judgment Action execution Transition evaluation Step transition processing Cycle Subchart processing I O refreshing The results of the previous cycle s step transition processing is received and the AQ action qualifier is read to determine whether or not the all of actions will be executed When a Boolean bit is specified in the action the action is executed based on the result of the action execution judgment When multiple Boolean bits are specified in a single step they are executed in the order from top to bottom that they appear in the action block If active status has changed since the previous cycle final scan processing see note is performed for any action programs in steps that have changed to inactive status Note Refer to 1 5 2 Action Program Precautions for information on the final scan operation When a step Is active the action programs written in the step are executed in the following order including actions in subcharts based on the result of the action execution judgment e First
92. ion program can be coded using either Ladder or ST as the language In CX Programmer a transition condition is met when the Boolean variable with the same name as the transition program is switched to ON Example 1 b bit for a PRG Transition Program Name Any name a PRG Condition met if a is OFF 51 2 3 3 52 Elements of SFC Section 2 3 Example 2 OR bits for a and b TRANS lt Transition Program Name ft Any mame a TRANS Condition met if a or b is ON b When a transition program is used as a transition condition specify a transition program name for the transition condition If a conditional equation is specified with a different Boolean variable name than that of transition program name for the transition condition the program will not run properly b OR TRANS Transition Program Name Another Boolean a TRANS Variable name o The condition of a Boolean output that was used inside a transition program is also retained after moving to the next step Ladder Program Some instructions are not supported when defining a transition program in ladder logic 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 An END instruction is n
93. ions A Action Lf p ns2 Transition2 Trans4 bbb gt 10 h Transition1 ae Subcharts subchart1 2 Symbols 5 Transition F Function Blocks Project AA 4 For Help press F1 NewPLC1 Net 0 Node 0 Offline TE Z Subcharts Folder and Subchart Programs Subchart programs are registered in the Subcharts folder under the SFC program A subchart program allows an SFC program with large scale step progression control to be developed in parts improving the reusability and visibility of the program and allowing for more structured programming of the SFC program Subchart programs are subcharts for SFC charts and are associated with an SFC chart by selecting the same subchart name In program view it is possible to check whether an SFC subchart is a partial SFC chart of the SFC program Sample4 CX Programmer SFC NewPLC1 NewProgram1 Diagram 4 pe lol xj FA File Edit View Insert PLC Program Tools Window Help x fjosajejenj maejociana oe os R LIC DAD te ja ax aa Edel Blt R444 o og eel amp S 15m 25 rra lan PEA 4 ewe ix E NewProject newPLC1 C51G H Offline 5 Symbols g 10 Table and Unit Setup Es Settings lt Memory E Programs G NewProgrami 00 5 Symbols 2 1 Actions YH Actiont 9H Action2 Action3 action4 AJ Actions A Action lL Transitions Transitiont
94. ions Boolean bit specifications and action programs in a single SFC program Select Program Action used list The following dialog box will be displayed so that the use of the actions can be checked e Selecting the Main SFC e Selecting a Subchart xi ES Steps Entry Step Initial Step Action Action Action Actiond Action Action Ea Steph Step Step Action Action Action EA Step Return Step Subchart step b ctionz Boolean Action Shep Action Boolean Actor Action Action e Steps are displayed from the top in the order in which they are registered Multiple active subcharts are executed in the order in which they are registered i e from top down as they are displayed in the dialog box Elements of SFC Section 2 3 e fan 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 Both kinds of flags are changed by the step s active inactive status and both can be used as bits in ladder and ST programs Action Flag Q Action_name Q This flag is ON when the step is active and goes OFF when the step is inactive This flag can be used as an input condition in a ladder or ST program to prevent execution of a process when a step is deactivated The flag can also be used as an input condition in an ST program
95. isting Action from the pop up menu 4 Right click the added action block and select Edit Action Name from the pop up menu 5 Select the action program from the combo list 72 Editing the SFC Chart Step1 Edit Step Name Step Type gt Step Timer Boolean Action Add Transition and Step New Ladder Action New Structured Text Action Add Transition Insert Step and Transition Above Insert Transition Above Add Divergence Add Simultaneous Sequence Convergence Connections gt Open Subchart Definition Delete Cut Copy Paste Tidy Descendant SFC Elements 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 1 Double click the AQ of an action block and select an AQ from the combo list Step1 Section 3 2 Step1 O Step2 ON Action lAction2 y For specifications on AQ operations refer to 2 2 3 Action Blocks Setting the Timer Unit for a Step Timer The step timer is started when a step is activated and when D L DS is selected as the AQ time control of these actions are executed according to the present value of the step time
96. it Transition Condition Add Step and Transition dd Step Insert Transition and Step Above Insert Step Above Add Convergence Add Simultaneous Sequence Divergence z ct E seiner Sa a am cu A Transa FALSE EEEE M EEEE M Tidy Descendant SFC Elements 3 2 11 Editing Independent Isolated SFC Elements Independent SFC elements can be inserted into the SFC editor and can later be connected to create an SFC chart 1 With no SFC element selected on the SFC editor right click the background of the SFC editor and select an element to insert from the pop up menu 2 Drag and drop the SFC elements and position them in the order they are to be connected 3 Use connections to connect the 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 Click to establish the connection Step Connecting the Output of an Isolated Transition as the Input for a Step A connection can be made from an isolated transition to a step 1 Right click a step and select Connections Add Connection To Step from the pop up menu 2 Put the mouse pointer over the output side of the transition to be connected and click Connecting the O
97. iti gpa Q 10 Table and Unit Setup gt de ee lt A Memory p2 E i E A Programs we ia NewProgram1 00 nsan il E oa Step3 N Action2 ral Trans3 aaa gt 5 Action3 Es Action4 eta A actions lA actions Tyans4 bbb gt 10 z Transitions Transitiont AJ Transition2 Subcharts Subcharti 2 Symbols F Function Blocks Project For Help press F1 NewPLC1 Net 0 Node 0 Offline Window Components Section 1 3 Transitions Folder and Transition Programs Transition programs are registered in the Transitions folder under the SFC program A transition program describes the step progression conditions which need to be expressed by multiple input signals or by the more complex ladder or ST logic Transition programs are associated with an SFC chart s transition by selecting the same transition name Sample4 CX Programmer SFC NewPLC1 NewProgram1l Diagram ie pe Oj xj E File Edit view Insert PLE Program Tools Window Help o 18 x Osu AR treja cana 2 86588 0D AR LIC DAD a a Qo sis Bhat e444 o oe eel amp 5 98180 0 um ER EEE ETA AE xl 5 5 NewProject C a E zen NewPLC1 C51G H Offline _ A 72 Symbols Transition1g q 10 Table and Unit Setup L ES Es Settings ee lt j Memory ee ee Tra E Programs E E NewProgrami 00 A Symbols 2 1 Actions actiont YH Action2 actions actions AJ act
98. itor Mode O 3ms SYNC 2 To stop monitoring select Monitor Monitoring from the PLC menu 1 While the PLC is running the active step element and the action element under execution are displayed in yellowish green The display color can be changed by selecting Tools Options Appearance 2 While in the MONITOR or RUN operating mode present values will be updated according to the PLC s operation status Present value monitor 3 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 98 Monitoring Section 4 5 Trans4 gatecloseLimit P Initial 4 Ifan action has an S series AQ S SL SD its activity status can be monitored even while the action blocks are hidden gatecloseLimit P Initial Monitoring the Active Step The active step can be automatically displayed on the screen 1 Switch to the online mode as previously described 2 Select Options SFC from the Tools menu Options x Diagrams PLCs Symbols Appearance Ladder Information General SFC General SFC Editor Settings Show Grid Snap to Grid Y Show Transition Name IV SFG Horizontal Split a A AA A A td Grid Width m Defaults For New SFC Elements Step Prefix SFC Editor Step Transition Prefix SFC Editor Trans i i s S Action Body Prefix Workspace Action Tran
99. ivated with the SA step control instruction has not yet been executed the activated step will be executed in the same cycle Step timer value read set instructions can be used in the same way as step activation deactivation instructions e A step can have a step timer to maintain the time which has elapsed since the step became active For each step the time unit on the step timer can be set to either of the following 48 Elements of SFC Section 2 3 e 100 milliseconds e 1 second e The first operand time range for a step timer value instruction reading varies according to the time unit of the specified step timer as follows e 100 milliseconds 0 to 6553 5 seconds e 1 secondO to 65535 seconds e Actions with the action qualifier D DS or L are executed in synchronization with the step timer Caution should therefore be exercised when making changes to the step timer of a step which has those action qualifiers in its actions e When the step becomes inactive the step timer is stopped and the elapsed time data is saved The step timer is reset when the step becomes active again e When the step timer value reaches the upper limit the timer will stop and maintain the maximum value For detailed specifications of step control instructions refer to Appendix A Specifications for Step Control Instructions Precautions on Subcharts Executing the SA Step Control Instruction for a Subchart Step When the SA step control instructi
100. k a transition and select Add Step Defining the Initial Step To convert a normal step to an initial step right click the normal step and select Step Type Initial Adding a Subchart Step Right click a transition and select Add Subchart Step New Subchart Defining a Subchart Right click a Subcharts folder in the project workspace and select Insert SFC Subchart Administering a Step Control Instruction Input the instruction as a regular ladder instruction and specify the target step flag Transitions A transition represents the condition in which the active status transfers from the step before the transition to the step after it One transition must be set between steps The transition is represented as shown below ro FALSE Operation of Transitions When the transition condition is met the step before the transition becomes inactive and the step after it becomes active In this way the transition controls the program flow from step to step e When representing transition conditions with transition programs turning a transition program name ON will turn the represented transition condition ON Transition Conditions Transition conditions are to be defined on the right hand side of the figure When a transition is added to the SFC editor its default condition is the ST expression FALSE The condition equation for a transition can be set to any one of the following e Bit Boolean variable or actual address
101. lick the action or transition to be monitored to display the editor window while working online 1 Sample CX Programmer SFC NewPLC1 NewProgram1 A_ticketOut Diagram mE File Edit View Insert PLC Program Tools Window Help osa msn majocjla ri eN fa 58 01 DARLE Zw ae a naa els Bim Raw OSEA le ae so e BEE l x aia x BARAAT se ERES EE sx xj 0 E NewProject E E newPLC1 CI1H H Monitor Mode 2 Symbols QT 10 Table and Unit Setup Settings 4 a E Memory card ee PEE EB Error log 8 PLC Clock lt A Memory El A Programs B NewProgrami 00 Running 5 Symbols E Actions Y A_ticketOut a_gateOpen YH a_gateclose Action1 AJ Action2 AJ Action3 AJ actiong AJ actions Transitions Subcharts F Function Blocks Project f ll 4 For Help press F1 gt NewPLC1 Net 0 Node 0 Monitor Mode O 3ms SYNC rungO 0 0 100 2 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 program view 100 Monitoring Section 4 5 2 Sample CX Programmer SFC NewPLC1 NewProgrami Diagram a E ES Oj xj H File Edit View Insert PLC Program Tools Window Help l x losa ajeaj eejociar a oke jaaa iSi semei am o og EEL e a a a an le ea a 6 Raras Ls as xi NewProject E D NewPLC1 CJ1H
102. limit sensor gatecloseLimit Boolean Ticket dispenser Output ticketOut Normal operation of gate motor_ Output Reverse operation of gate Output gateClose motor Note It is also possible to specify actual addresses rather than variables SFC Programming Example Section 1 4 Example SFC Program for the Unattended Paid Parking Lot The following example shows part of an SFC program for the ticket issuing system of an unattended paid parking lot based on the defined action flow scenario and variables The action program is created using ladder logic Trans4 b Trans carlin TicketOut A ticketOut Trans ticket OpenGate N A_gateOpen Trans3 gateopenLimit CloseGate D 3s A_gateClose Trans4 gatecloseLimit F Initial Action Program A_tiketOut Starting Stopping the Ticket Dispenser P_On ticketout 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 carlin gateClose Note Leave each action program s Reset Output at Final Scan setting at its default setting of ON reset 29 30 SFC Programming Example Section 1 4 1 4 2 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 4
103. llowing information is included Overview and features System configuration Installation and wiring Troubleshooting Use this manual together with the W473 Describes programming and other methods to use the functions of the CJ2 CPU Units The following information is included CPU Unit operation Internal memory areas Programming Tasks CPU Unit built in functions Use this manual together with the W472 Describes the ladder diagram programming instructions supported by CS CJ series or NSJ series PLCs When programming use this manual together with the Operation Manual or Hardware User s Manual CS1 W339 CJ1 W393 or CJ2 W472 and Programming Manual or Software User s Manual CS1 CJ1 W394 or CJ2 W473 Provides an outline of and describes the design installation maintenance and other basic operations for the CS series PLCs The following information is included An overview and features The system configuration Installation and wiring I O memory allocation Troubleshooting Use this manual together with the W394 Provides an outline of and describes the design installation maintenance and other basic operations for the CJ series PLCs The following information is included An overview and features The system configuration Installation and wiring I O memory allocation Troubleshooting Use this manual together with the W394 Describes programming and other methods to use the functions of the CS CJ se
104. log will be displayed Find in SFC Editor EO x Find what Cancel TF Match whole word only Match case Input the search text into the Find what combo box Check the Match whole word only checkbox and or mark the Match case search option as necessary Click Find Next An SFC element containing the search text will be selected and displayed 3 3 2 Substituting within an SFC Chart The Find function can also be used to replace text strings within an SFC chart The following text strings can be searched 88 Step name Transition name Symbol name for the transition condition ST expression for the transition condition Program name for the transition condition Boolean variable name for the action block Select Replace from the Edit menu The Replace in SFC Editor dialog will be displayed Replace in SFC Editor xj Find what Replace with po Replace Replace All Match whole word only Cancel Match case Input the search text into the Find what combo box and input the replacement text into the Replace with combo box Check the Match whole word only checkbox and or mark the Match case search Searching and Replacing within an SFC Chart Section 3 3 option as necessary 3 Click Find Next then click Replace after confirming the text to be replaced To replace all instances click Replace All 3 3 3 Cross Reference Report A list of addresses used by the program can be displayed You can
105. main active until the active status is transferred for the parent subchart e 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 e A subchart can call up another subchart There is no limit on the subchart layers e When the return step becomes active and the subchart is terminated all other active steps within the subchart are simultaneously terminated e A subchart step does not hold any action e A single subchart can be called up by multiple subchart steps When two subchart steps attempt to call up the same subchart however the latter caller must wait until subchart execution is completed for the former caller 46 Elements of SFC Section 2 3 Step Control Instructions Step control instructions SA SE TSR TSW can be used to control SFC steps SA Activate step Switches a step to the activate status SE Deactivate step Switches a step to the inactivate status TSR Read step timer value instruction Reads the present value of the step timer TSW Set step timer value instruction Updates the present value of the step timer In each of the instructions the step flag is specified as follows e For within the same task step name X For within another task program name step name X In each of the instructions the step timer is specified as follows For a step within the same task step name T For a step within another task program
106. me time the subcharts are executed from top down in the order the subcharts are arranged in the workspace 43 Elements of SFC Section 2 3 2 3 Elements of SFC This section explains the element of SFC AA lt lt Initial step The first step to be made active IO Transition Supported Boolean variable Bit Boolean address Bit Y Step ST expression Program Ladder or ST JUMP ENTRY Jump Destination Action Supported Boolean variable Bit Boolean address Bit Program Ladder or ST Can be multiple Number unlimited t 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 An active step executes the actions defined in that step while an inactive step does not execute any actions until it becomes active The step status transfers when the transition condition is met but the transfer actually depends the status of the step before the transition as well as the transition condition The status of steps transfers when all of the following conditions are met Step Transfer Condition All transition conditions have been met All steps before the transition point are in the active status Note The step transfers even if the connecting step after the transition is active Some steps do not have an action to execute These steps will remain
107. me 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 Maximum Extension of Cycle Time 1 During Online Edit 2 During Backup 4 of cycle time ACAitisi When performing online editing in the MONITOR mode ensure that the cycle time required for the program to be updated does not exceed Watch Cycle Time specified in PLC Settings Otherwise a cycle time error will occur and operation of the CPU unit will be stopped To run the CPU unit again first switch to the PROGRAM mode and then switch to the RUN mode or the MONITOR mode Limitations of Online Editing Limitations for online editing are as follows For CS CJ series units except for CJ2 CPU Units SFC programs including the action programs and transition programs can be edited online only if they are 4K steps or smaller For CS CJ series units except for CJ2 CPU Units the maximum allowable change in size for a single online edit session is 0 5K After completing online editing do not turn the PLC power OFF until the CPU unit completes a backup to the internal flash memory i e until the BKUP LED on the front of the CPU unit switches from lit to dimmed Turning the PLC power OFF before the backup is complete i e while
108. mer Refer to the CX Programmer Operation Manual Cat No W446 Adding an ST Program Action Block and Editing the ST Program Action blocks can be inserted into each step of an SFC chart You can insert either a ladder program an ST program a Boolean variable or an actual address as an action block Here an ST program will be inserted as an action block 1 Select and right click a step and select Add Action New Structured Text Action from the pop up menu Note Multiple action blocks can be inserted into a single step by repeating this procedure Step1 Step1 Pare Tran FALSE Step2 Edit Step Name Step Type b Step Timer d Boolean Action B New Ladder Action Add Transition and Step Add Transition Insert Step and Transition Above Insert Transition Above Add Divergence Add Simultaneous Sequence Convergence Connec tions Open Subchart Def Cut P escendant SFC Elements 2 An action block is inserted to the right of the step When the action block is inserted the program view will switch to the edit window for ST programs Furthermore an ST program item will be added to the project workspace An icon will indicate that the item is an ST program 3 Use the program view to edit the ST action program The ST editing procedure is the same as for CX Programmer Refer to the 71 Editing the SFC Chart Section 3 2 CX Programmer Operation Manual Cat No W446 Creating an Acti
109. mple bflag a Variable Example bflag a b Variable and Arithmetic Operators For SFC programs ladder programs action programs within SFC programs and ladder programs within transition programs the index must be a numeric value Variables cannot be used as the index For ST programs the index can be defined by both numeric value and variables For CJ2 series CPU Units the index can be defined by both numeric value and variables for ladder programs Note For details on array variables refer to the CX Programmer Operation Manual Cat No W446 and the CX Programmer Operation Manual Function Blocks and Structured Text Cat No W447 Inserting an Array Variable 1 Inthe project workspace select and right click Symbols folder and select Insert Symbol from the pop up menu izi x NewProject 2 3 NewPLC1 CJ1H H Offline D Sie om Se GP 10 Tabh Edit Es Setting E 1 0 Comment lt lt Memory El Progran ae sy J Validate Symbols EC 25 Large Icons o Small Icons EE Ly Details B Paste Delete Reusable File Y Allow Docking Hide Float In Main Window Properties 2 Specify the variable in the displayed New Symbol dialog and click Advanced Settings 91 Miscellaneous Section 3 5 E xl Name bf lag Data type BOOL Address or value ES yA Comment 7 Link the definition to the project s CX Server f
110. ms can be checked at the same time 1 Select Compile All PLC Programs from the PLC menu Sample3 CX Programmer SFC NewPLC1 NewProgrami Diagram File Edit view Insert PLC Program Tools Window Help Knew ca Es amp Work Online Ctrl w a Work Online Simulator GESIEN S a Q ES Si Exit Simulator pE m ap Auto Online gt Operating Mode gt Monitor NewProject NewPLC1 CJ1H H a Symbols baa Compile All PLC Programs T 10 Table and L Program Check Options Settings Automatic Allocation lt Memory Program Assignments E A Programs NewProgre Memory gt 5 Symbo Transfer gt b Y Action Partial Transfer Sl A Protection E A Clear All Memory reas Transit 3 Subche TF Function Blocks lu Data Trace Time Chart Monitoring Force gt Set Edit Protect 7 The check results for the program will be displayed on the Compile tab of the output window 90 Miscellaneous Section 3 5 3 5 Miscellaneous 3 5 1 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 Example bflag 5 Numeric Value Exa
111. n Applicable Program Areas SA SE Function Block Step Sub Interrupt Area block program program routines task definitions areas areas progam Usage OK ok ok ok ok Condition Flags Error Flag OFF Note e Designate Step Flags in the form step_name X Refer to 2 3 1 Steps for details e Steps within subcharts cannot be specified e These instructions cannot be input or displayed on a Programming Console will be displayed 118 Specifications for Step Control Instructions Appendix A Operation Examples In the following example step 4 will become active when WO O turns ON EMT ET Made active In the following example step 3 a subchart step will become active when WO 1 turns ON AE steps Made active 119 Specifications for Step Control Instructions A 2 READ SET TIMER TSR SET STEP TIMER TSW TSR Instruction Outline Read the present value of the Step Timer Symbol N 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 Executed Each Cycle for ON TSR Condition Executed Once for Upward TSR Differentiation Immediate Refreshing Specification Variations Variations Applicable Program Areas Function Block Step Subroutines Interrupt task Area block program program programs definitions areas areas Operand Specifications O A A
112. n Above Adds a transition and a step and connects them to the topside of the selected step Insert Transition Above Adds a transition to the topside of the selected step Add Divergences Adds a divergence and 2 transitions and connects them to the selected step Add Simultaneous Sequence Convergence Adds a simultaneous sequence convergence and a transition and connects them to the selected step 14 Window Components Section 1 3 Connections Add Connection Opens the Add Connection dialog Add Jump to Step Draws out a connection from the topside of the selected step and connects it to the downside of the transition that is to become the jump starting point Add Connection To Step Draws out a connection from the topside of the selected step and connects it to the downside of a transition Delete Connection To Step Deletes the connection on the topside of the selected step Draw Connections to Step Changes the topside of the selected as Jump step to a jump Add Connection From Step Draws out a connection from the downside of the selected step and connects it to the topside of a transition Delete Connection From Step downside of the selected step Copy Copies the selected step to the clipboard Paste Pastes the contents of the clipboard Deletes the selected step Tidy Descendant SFC Elements Arranges elements of the SFC chart positioned after the selected step Online Pop Up Menu Menu Sub Menu Func
113. n for the selected SFC element Show All Action Blocks Displays all action blocks Hide All Action Blocks Hides all action blocks Cut Copy A Pastes the contents of the clipboard ES d yO Select All Selects all SFC elements in the SFC chart Tidy All SFC Elements Arranges all elements in the SFC chart Import Export Import from XML File Loads a program saved in XML format Import from Structured Text Loads a program saved in ST format File Export as Structured Text Creates program file in ST format File 20 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 Deg jax Rara on clas aaa ar ma a y S a pasala a a en ass AE sof Ble aa Mi E e eee 4 Ladder Diagram Toolbar Resets the scaling ratio of the SFC editor to 100 Insert Toolbar Pop up Menu Insert SFC Program Creates a new SFC program Insert ST Program Creates a new ST program SFC Toolbar Add Step Adds an SFC step E Add Subchart Step Adds an SFC subchart step Add Entry Step Adds an SFC subchart entry step ES Add Return Step Adds an SFC subchart return step MN Y Add Transition Adds an SFC transition N Add Divergences Adds an SFC divergence Add Convergence Adds an SFC convergence E Add Simultaneous Divergence Adds an SFC simultaneous sequence divergence Add Simultaneo
114. n will continue 36 Precautions When Creating SFC Programs Section 1 5 1 5 4 Ladder Language Instructions That Cannot Be Used in Action Programs and Transition Programs The following instructions cannot be used for action programs and transition programs Unsupported instructions Block programming instructions All instructions including BPRG and BEND Subroutine instructions SBS GSBS RET MCRO SBN GSBN and GRET Jump instructions JMP CUP CUPN and JME Step ladder instructions STEP and SNXT I O refresh instruction IORF TMHH and TMHHX instructions except for the CJ1 H R CJ2 CPU Units Special instructions FRMCV and TOCV Record position manipulation instructions PUSH FIFO LIFO SETR and GETR Failure point detection Instruction FPD Index register setting instruction MOVRW 1 5 5 Task Allocation SFC programs are assigned to cyclic tasks to use them See note Refer to 3 1 3 Allocating an SFC Program to a Task for information on allocating tasks Note Do not use SFC programs in interrupt tasks They will not execute normally Allocating Extra Tasks 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 t
115. nce in a cycle An action program can be coded using either Ladder or ST as the language Ladder Program An action block can be defined as a ladder program Some instructions are not supported when defining an action program in ladder logic For details refer to 1 5 4 Ladder Language Instructions Can Not Be Used in Action Programs and Transition Programs In ladder programs the Reset Output at Final Scan Option can be selected in the action s properties to turn OFF the ladder program s outputs when the step is inactive If function blocks are used in the ladder program the status of outputs used in the function blocks will be held 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 action qualifier should be used ST Program An action block can be defined as an ST program For specifications on the ST language used when defining transition programs in ST refer to Part 2 Structured Text ST in the CX Programmer Operation Manual Function Blocks Structured Text Cat No W447 Action Execution Order Refer to 1 5 2 on Action Program Precautions tor information on the order of execution of actions within a step and the actions within multiple active steps Checking Action Usage lt is possible to display a list of all of the act
116. nd transition conditions can be viewed and edited while envisioning the entire program picture allowing the features of SFC to be fully realized Action Blocks Shown ransp Initial Sol SFC View lt q Program View SFC Overview Section Action Blocks Hidden 34 gt Initial J Ticketout SFC View Trans4 gatecloseLimit gt Initial Program View Online Editing and Debugging SFC charts can be edited online Furthermore action blocks can be hidden while 1 1 debugging and the step progression status can be checked The SFC chart editor will display the action programs in the program view even while the action blocks are hidden 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 a 5 b 5 ST b 7 a 7 SFC CX Programmer Specifications Section 1 2 1 2 CX Programmer Specifications This section describes the CX Programmer s operating environment in which SFC functions can be used For details on the basic CX Programmer operating environment refer to the CX Programmer Operation Manual Cat No W446 1 2 1 PLC Models Supporting SFC The following PLCs Programmable Logic Controllers support the SFC language Note e SFC cannot be used on CP series PLCs e Microsoft Net Framework 1 1 or later must be installed e Internet Explorer 5 1 or later must be ins
117. ne subchart step and another subchart step calling the same subchart changes to inactive status or the subchart is deactivated with the SE instruction the subchart execution will continue as long as the subchart step for which the subchart is currently being executed is still active Note SFC operation is different in the CV series PLCs In the CV series PLCs if a given subchart step is active another subchart step calling the same subchart cannot become active by a status transition or execution of a step control instruction In this case execution of the previous step continues and the step goes into standby status e When multiple subchart steps are in standby status the subchart that is executed next is determined by the order in which the subchart steps are registered The execution order can be confirmed in the Action Used List Dialog Box Refer to Checking Action Usage under 2 3 3 Action Blocks 49 Elements of SFC Section 2 3 2 3 2 50 Flags Used to Monitor a Step s Active Status Step Flags These flags indicate the steps active inactive status The flags are expressed as Step_name X and each flag will be ON when the corresponding step is active or 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 clic
118. nformation on using this instruction e This instruction cannot be input or displayed on a Programming Console will be displayed 121 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 WO O turns ON MRE a The active steps is indicated by a solid circle 0 122 Appendix B SFC Task Control Instruction Specifications The following type of control can be achieved by using the SFC Task Control Instructions e Ending SFC task execution using the SFCOFF instruction e Pausing SFC task execution and resetting outputs using the SFCPR instruction e Pausing SFC task execution and holding outputs using the SFCPRN instruction e Restarting execution of SFC tasks that have been ended or paused using the SFCON instruction Ends execution of an SFC task The outputs from any actions that are being SECOFF executed in the task that is ended will be held and processing will be ended PRESO 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 E Pad mre When execution is started again with the SFCON instruction it will start from the RESET SFCPR step that was active before the task was pa
119. ng the SFC bit and SFC word memory areas for SFC uncheck the Share SFC with FB Memory checkbox Memory Area Default Value Allocable First Address End Address Area FB Non Retain H512 H1407 896 CIO WR HR DM EM FB Retain H1408 H1535 HR DM EM SFOBItO ua Wa Na SFC Word NA Na TNA 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 Setting Procedure 1 Select Memory Allocation Function Block SFC Memory Function Block SFC Memory Allocation from the PLC menu The Function Block SFC Memory Allocation Dialog Box will be displayed 2 Uncheck the Share SFC with FB Memory checkbox Function Block SFC Memory Allocation NewPLC1 Memon rea Start Address End Address Size OF FB Non Retained H512 H1407 296 foe FB Retained H1405 H1535 128 FB Timer T3072 T4095 1024 Edi FB Counter Calz C4095 1024 SFC Bit Share with F 5 Default SFC Word Share with F nee Pele Advanced e Share SFC with FB Memory 3 Select SFC Bit or SFC Word 4 Click the Edit Button in the Function Block SFC Memory Allocation Dialog Box The Edit Function Block SFC Memory Range Dialog Box will be displayed PLC1 xj Memory Area SFC Bit Memory Region o Cancel Start Address li 024 Size E4 Edit Function Block Memory Range Jew 5 Select Memory Are
120. nnnnnnnononanonncnnnnnnnnnnnnnnnnnnos 88 l Searching wiin an SFE Cha hisa a 88 3 3 2 Substituting within an SFC Chart occccccccccncnnnnnnnonnnnnnnnnnnnnnnnnnnnnnnnononononanonnnnnnnnnnnnnnnnnnnos 88 o BA a TEESE 89 Jok Address Reference OOM tit 89 Ofline Frosrant Celta it eos t din ain aiii ivi 90 o Prora Chek orense A e 90 JA OMeCKane All Proa islas 90 MSC Han ON aiii n a a 91 FE Ay PP A nheadaton 91 o DA E au 92 63 Creating an SFC Program Section 3 1 3 1 Creating an SFC Program 3 1 1 Creating a New Project 1 Start CX Programmer and select New from the File menu 2 From the Device Type list on the Change PLC dialog select a PLC model which supports the SFC programming function a list of which is provided below 3 Press the Settings button to select a CPU type For details on other settings refer to the CX Programmer Operation Manual Cat No W446 3 1 2 Creating Inserting a New SFC Program Use the following procedure to create an SFC program for a project 1 Inthe project workspace right click the Programs item and select Insert Program SFC from the pop up menu E NewProject 2 3 NewPLC1 CJ1M Offline Symbols QT 10 Table and Unit Setup Es Settings e Memory E E Insert Prograrn de Cut 3 Copy JF Fur MA Paste Delete 2 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
121. nnnnnnnos 33 125 2 Acton Prosram Precautions ssoi as 34 1 5 3 Precautions for Transition Progtams taa a is 36 1 5 4 Ladder Language Instructions That Cannot Be Used in Action Programs and Transition Prod taS osos 37 lS Task Alo eses NSE 37 15520 Menor Alo caos 38 1 5 7 Subchart Online Editing Function RestricCtiODS ccccccccccccnnnnnnnnanonnnnnnnonnnnnnnnnonnnnnnnnonnnnos 39 SFC Overview Section 1 1 1 1 SFC Overview 1 1 1 SFC Overview The SFC Sequential Function Chart language is a graphical programming language developed to facilitate the description of step progression programs which mainly control sequential processes 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 Processing Contents Step Transition Condition Processing Contents Step Transition Condition Processing Contents Step Transition Condition SFC offers the following advantages Since step flow and program control correspond even third party programmers can easily understand the program as a whole This reduces the program debugging and maintenance workload Correspond ence Equipment Control SFC Program External Device Control Programs can be created separately for each step without the need to consider
122. of an entire process is sequential or time dependant SFC is a graphical programming language developed to allow step progression control to be easily implemented Step Ladder has been widely used as a language for describing step progression control but SFC has visual properties superior to traditional Step Ladder Consider the following example Execute Process 1 until Condition A is met then stop Process 1 and execute Process 2 The following shows the behavior of an SFC program using basic step progression control Process 1 is executed and if condition A is met process 2 is executed as an example Assign Process 1 to Action 1 Trans1 Assign Process 2 to Action 2 Assign Condition A the transition condition between steps to Trans 1 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 The following illustrates that the transition condition Trans1 is met and that the active status has transferred from step 1 to step 2 The step showing 6 is the active step gt Conditions Met for Trans 1 Trans1 All the actions within an active step are executed for at least one cycle even if the condition for the step to transfer to the next step has been met Note however that the execut
123. oject 5 D NewPLC1 CJ1H H Stop Program Mode A Symbols q 10 Table and Unit Setup E Settings E Memory card EB Error log 8 PLC Clock et Memory E o Programs B NewProgrami 00 3 Aluketout YH A_gateOpen Y 4_gateclose Al Action1 Al Action2 AJ Action3 AJ Actions AJ Actions Transitions Sf Suocnarts z JF Function Blocks OpenGate Os For Help press F1 NewPLC1 Net 0 Node 0 Stop Program Mode 2 Sample CX Programmer SFC NewPLC1 NewProgram1 Diagram y 0 xj E File Edit View Insert PLC Program Tools Window Help l x josw of R Gene ci lero lara nin Bele ae nline Edit al lls Kan ES BIS Section Rung Manager 87 send Changes trl Shift E CL 44 Sa BE E fx la Ctrl U ABE Pest RE fell ee 2 Cancel izi xi 1 Go to Online Edit Runa E NewProject ED newPLC1 CI1H H Stop Program Mode SEES muiol Sy symbols Release SFC Online Edit Access Rights QT 10 Table and Unit Setup mai Settings E Memory card EB Error log E PLC Clock Ge Memory E 8 Programs a NewProgrami 00 a Symbols ons Y A_ticketOut p A_gateOpen Y a_gateclose A Actiont A Action2 A Action3 A Action A ActionS A Transitions E Subcharts F Function Blocks Project Fi o Online edits the selected item s Online edits the selected item s A NewPLC1 Net 0 Node 0 S
124. om the Transition downside of the selected transition and connects it to the topside of a step Transition of the selected transition Transition as Jump transition to a jump Add Comnection To Draws out a connection from the Transition topside of the selected isolated transition and connects it to the downside of a step Transition downside of the selected transition Add Subchart Step New Subchart Creates and adds a new subchart and connects it to the selected transition as a subchart step Existing Subchart Connects an already registered subchart to the selected transition as a subchart step Open Transition Definition Opens the selected transition program Cut Cuts the selected transition to the clipboard Copy Copies the selected transition to the clipboard Pastes the contents of the clipboard Deletes the selected transition Tidy Descendant SFC Elements Arranges SFC chart elements positioned after the selected transition Online Pop Up Menu Force Step program positioned after the selected transition 16 Window Components Section 1 3 Right Clicking a Divergence selected divergence topside of the selected divergence Insert Transition and Step Above Adds a transition and a step and connects them to the topside of the selected divergence Connections Add Connection Opens the Add Connection dialog Add Connection To Divergence Add Connection From Divergence Draws out a
125. on 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 1 Select and right click an Actions folder in the project workspace and select Insert Action Ladder or Structured Text from the pop up menu See Memory kN Programs E NewProgrami 00 Y Symbols Structured Text sod Subche y i E Function Blocks 4 UE BE m3 el Paste From File Delete Y Allow Docking Hide Float In Main Window Properties An action program ladder or ST will be registered under the Actions folder 2 Double click the action item ladder or ST or right click and select Open from the pop up menu E eS Programs B NewProgrami 00 Symbols Actions Transitic L Subchar Open Mnemonics 37 Function Blocks Goto Rung Step Goto Commented Rung Cut Copy E Paste Delete Move Up Move Down Rename Y Allow Docking Hide Float In Main Window Properties The edit window for the action program ladder or ST will open allowing you to create the program For details on editing in ladder or ST refer to the CX Programmer Operation Manual Function Blocks and Structured Text Cat No W447 3 Right click a step and select Add Action Ex
126. on is executed for a subchart step that subchart step will become active and the subchart will operate from the entry step Executing the SE Step Control Instruction for a Subchart Step When the SE step control instruction is executed for a subchart step that subchart step will become inactive and the subchart s operation will stop Active steps in the subchart will become inactive 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 Operation When Multiple Subchart Steps Calling the Same Subchart Are Active e When a given subchart step is active another subchart step calling the same subchart can become active by a status transition or execution of the SA instruction see note In this case the subchart s current execution status will not change Execution of the subchart for any other subchart steps will standby until the subchart step that first called the subchart becomes inactive e If the subchart step for which the subchart is currently being executed changes to inactive status or the subchart step is deactivated with the SE instruction the subchart will be executed again from the entry step for any other subchart step that was in standby status e f a subchart is currently being executed for o
127. on of programs without transferring them to an actual PLC 5 4 1 Starting and Ending the Simulator Starting the Simulator 1 Start the CX Programmer 2 Read a program that was previously created 3 Select Work Online Simulator from the Simulation Menu The Simulator and CX Programmer will be connected online and the Download Options Dialog Box will be displayed 4 Click the OK Button The program will be downloaded to the Simulator Download successful will be displayed when the data has been downloaded 5 Click the OK Button The online connection will be broken 6 Select Operating Mode Monitor from the PLC Menu to switch to MONITOR mode Ending the Simulator 1 Select Work Online Simulator from the Simulation Menu The online connection between the Simulator and CX Programmer will be broken 2 Select Exit Simulator from the Simulation Menu The Simulator will be ended Limitations The debugging functions of the Simulator such as step execution and breakpoints cannot be used for SFC charts ladder ST action programs ladder ST action programs or subcharts In addition online editing is disabled while PLC simulator is used 116 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 SA Makes the specified step or s
128. ons Add Connection from the pop up menu Add Connection E x Cancel s Add Simultaneous Convergent Step Branch gt From _S5SGonw1 To Add Transition Add Transition and Step IZ Draw Connection as Jump Cut Add Connection To Convergence Copy Add Connection From Gonvergence Paste Delete Delete Connections To Convergence Delete Connection From Convergence Tidy Descendant SFC Elements The Add Connection dialog will be displayed 3 Confirm that the transitions to be joined are selected in the Add Connection dialog and click OK 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 Adding a Subchart Adding a Subchart Step and Creating a New Subchart Program A subchart step can be added after a transition The subchart program can be created later 1 Right click a transition and select Add Subchart Step New Subchart from the pop up menu Step1 mn Edit Transition Condition Add Step and Transition Add Step Insert Transition and Step Above Insert Step Aboye Add Convergence Add Simultaneous Sequence Divergence Connections Add Subchart Step y E
129. op Program Mode 3 Symbols 9 10 Table and Unit Setup Settings fl Memory card EB Error log E PLC Clock NewProgrami 00 Symbols E Actions 4 _ticketout 8 A_gateOpen Y A_gateclose AJ actions A actionz A actiona A Actions AJ actions Transitions Subcharts 3 Function Blocks rans3 gateopenLimit For Help press F1 NewPLC1 Net 0 Node 0 Stop Program Mode 7 4 1 2 Working Offline 1 Select Work Online from the PLC menu You will be switched to offline state 94 Transferring Programs from Computer to PLC Section 4 2 4 2 Transferring Programs from Computer to PLC This section describes how to transfer SFC programs from CX Programmer to a PLC After creating a program it can be transferred to a PLC system by establishing an online connection between CX Programmer and the PLC system 1 Select Transfer To PLC from the PLC menu The Transfer Option To PLC dialog is displayed 1 2 Sample CX Programmer SFC NewPLC1 NewProgram1 Diagram Download Options WE File Edit View Insert PLE Program Tools Window Help Dee c amp E Work Online Ctrl la Ea E3 uo E amp PLC NewPLC1 i E rT RE 85 Work Online Simulator Ctrl SHiFE HWY Include E aKa S Exit Simulator 00434 E i MY Program s IE i gt SAG SE SE lt a A fea oe m m aa a TAREA O Eo S
130. ot required at the end of a ladder transition program ST Program For specifications on the ST language used when defining transition programs in ST refer to Part 2 Structured Text ST in the CX Programmer Operation Manual Function Blocks Structured Text Cat No W447 Procedures Adding a Transition Right click a step and select Add Transition Action Blocks An action block is used to program the processes for a step A single step can register multiple action blocks An action within an action block can have the following information registered e Action Qualifier AQ e Action name e Indicator Variable An Action block is represented as shown below In the following figure action qualifier AQ action name and indicator variable are illustrated from left to right Elements of SFC Section 2 3 S AQ Indicator Variable Action Name e An action block is inserted into a single step e There is no limit on the number of actions registered with an action block Administering Action Blocks 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 With action programs the programs are executed in sequence after execution of the Boolean bit ac
131. prevent the SFCPR instruction from being executed for an SFC task that has been ended This is not possible however when using an SFC program in an extra task e If the SCFPR instruction is executed for a step for which status has changed in the same cycle the outputs will be reset This means that the final scan and the PO action in steps that became inactive will not be executed e lf 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 Precautions on Using SFCPR SFCPRN e The step timers will continue to operate for steps paused with the SFCPR or SFCPRN instruction The displayed time however will not change e Step timers may not operate correctly when the SFCPR or SFCPRN instruction is used 125 SFC Task Control Instruction Specifications Appendix B B 2 SFC PAUSE WITH RESET SFCPR SFC PAUSE NO WITH RESET SFCPRN SFCPR Instruction Outline Pauses execution of an SFC task The status of all outputs is reset When execution of a paused task is restarted execution will start from the step that was active when the task was paused Symbol SFCPR N SFC task number Operands Cyclic Task For CJ2 N 80 to 8128 Correspond to cyclic tasks O to 128 For other models N 80 to 831 Correspond to cyclic tasks 0 to 31
132. programs SFC task readings by using the SA step activation instruction and the SE step deactivation instruction control updates Ladder program outside of SFC programs Action ladder program within an SFC program Action ladder program within another SFC program Executing and Time elapsed since the activation of a step can be read and updated by using the TSR ending SFC read step timer value instruction and the TSW set step timer value instruction tasks O to 6553 5 sec Unit 100 millisecond or O to 65535 sec Unit 1 sec Stopping SFC The execution and ending of SFC tasks can be controlled from the ladder program with tasks output the SFC Task Control Instructions reset or output Execute If the SFC task was completed the SFC task status is completely reset and hold execution proceeds from the initial step If the SFC task was stopped the SFC task is executed from the step where the task was stopped The status of outputs is held and the SFC task is ended Transitions can SFC tasks can be stopped outputs reset or outputs held from the ladder program with the be SFC Task Control Instructions force set force Output reset Resets the outputs and pauses the SFC task reset online for Output hold Retains the output status and pauses the SFC task a step by step execution Online Editing Allows SFC chart editing actions addition deletion and transitions addition deletion Note Choose between st
133. r The unit of a step timer can be set to seconds or 100 milliseconds 1 Right click the step and select Step Timer Use Second Timer or Use Millisecond Timer from the pop up menu Step ans El Edit Step Name Step Type Add Action v Show Action Blocks Add Transition and Step Add Transition Insert Step and Transition Above Insert Transition Above Add Divergence Add Simultaneous Sequence Convergence Connections Open Subchart Definition Cut Copy Paste Delete Tidy Descendant SFC Elements Use Millisecond Timer gt v Use Second Timer hs 73 Editing the SFC Chart Section 3 2 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 1 Right click an action block and select Edit Action Qualifier Time from the pop up menu Step1 Trans Step1 ans 5 E L i iS Ms Action 2 OC E Action1 gd Edit Action Name dal i Edit Action Qualifier Edit Action Qualifier Time Open Action Definition Add Action gt Display Indicator Variable on Diagram Edit Action Indicator Variable Cut Copy Paste Delete 2 Input the timer value 0 65535 for a one second timer or 0 6553 5 for a millisecond timer Note T
134. rd sequence convergence Tidy Descendant SFC Elements Arranges SFC chart elements positioned after the selected simultaneous sequence convergence Right Clicking an Action Block Edit Action Name Displays a combo box in the selected action block enabling selection of the action program name Edit Action Qualifier Displays a combo box in the action qualifier of the selected action block enabling action qualifier selection Edit Action Qualifier Time Enables editing of the selected action block s action qualifier timer Opens the selected action program Opens the selected action program selected action program address to the selected action block adds it to the selected action block Action to the selected action block 19 Window Components Section 1 3 TA e the selected action block shown hidden block s indicator variable clipboard clipboard Pastes the contents of the clipboard Deletes the selected action block Right Clicking the SFC Editor Background Add Step Inserts an independent step as an independent subchart step as an independent subchart step Add Divergence Inserts an independent divergence Add Convergence Inserts an independent convergence Inserts an independent simultaneous sequence divergence sequence convergence Add Step and Transition Adding a Step and a Transition Add Transition and Step Adding a transition and a step Add Connector Inserts a connectio
135. ression ladder for device control and ST for mathematical processes The common functions of CX Programmer are still available to use regardless of the language used User Program SFC Step Progression Control ML Ladder Programming Language Best Device Control Suited to the Process is Selectable E ST a a 1 Mathematical Processes SFC Overview Section 1 1 Ladder and ST as Part of SFC Programs The step actions and transition conditions within an SFC program can be coded in either ladder or ST The step actions and transition conditions coded in ladder or ST are registered in an SFC program as action programs and transition programs El Programs ls MewPrograrmi 00 Symbols as mH Actions m 8 Action3 lt lt Action Programs Ladder U Actions STI Action lt Action Programs ST ed OU Transition E Tn Subcharts EY Subcharti Transition Program ST sa E Function Blocks 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 In addition action blocks can be hidden in the SFC view but action programs and transition programs can be viewed and edited in the program view even when the action blocks are hidden in the SFC chart Processing contents a
136. results can be displayed for SFC programs Details are not available For details on program comparison refer to the CX Programmer Operation Manual Cat No W446 97 Monitoring Section 4 5 4 5 Monitoring This section describes the basic operations for monitoring programs and PLC status For program debugging operations refer to section 5 4 5 1 Monitoring Start 1 Switch to the online mode as previously described 2 Inthe project workspace select the program to be monitored Changing the Operating Mode To change the PLC operating mode select a mode as follows PROGRAM Mode PLC Operating Mode Program MONITOR Mode PLC Operating Mode Monitor RUN Mode PLC Operating Mode Run The functions that can be used in each operating mode are as follows Operating mode Program execution Online editing Name PROGRAM Display OK OK 4 5 2 Monitoring SFC Editor 1 Switch to the online mode as previously described The monitor screen of the SFC editor is displayed as shown below 1 2 3 427 CX Programm ample0 il er SFC NewPLC1 NewProgram1 Diagram E Fl ol x E File Edit View Insert PLC Program Tools Window Help x DuA eela eaaa ala B a 0 AR ETR as a A QA Elsie erre O p a EEL 8 at t a EPR CIERRES EA AA E Le ris hh F Prog NewProgrami 00 Running 2 Symbols y Function Blocks For Help press F1 NewPLC1 Net 0 Node 0 Mon
137. ries PLCs The following information is included Programming Tasks File memory Other functions Use this manual together with the W339 or W393 Name SC d at Now Contents Describes the ladder diagram programming instructions supported by CS CJ series PLCs When programming use this manual together with the Operation Manual CS1 W339 or CJ1 W393 and Programming Manual Cat No W394 SYSMAC CS CJ Series CS1G H CPUL IL EV1 CS1G H CPULILJH CJ1G CPUL IL CJ1G H CPULJLIH CJ1G CPULILIP CJ1M CPULIL Programmable Controllers Instructions Reference Manual SYSMAC CS CJ Series CS1G H CPULILI EV1 CS1G H CPUL LJH CS1W SCB21 V1 41 V1 CS1W SCU21 41 CJ2H CPU6 ElP CJU2H CPU6L CJ2M CPU1L CU2M CPU3L CJ1G CPUL IL CJ1G H CPULJLIH CJ1G CPULILIP CJ1M CPULI 1 CJ1W SCU21 V1 41 V1 Communications Commands Reference Manual W340 Describes the communications commands that can be addressed to CS CJ series CPU Units The following information is included C series Host Link commands FINS commands Note This manual describes commands that can be sent to the CPU Unit without regard for the communications path which can be through a serial communications port on the CPU Unit a communications port on a Serial Communications Unit Board or a port on any other Communications Unit X1 Notice OMRON products are manufactured for use according to proper proce
138. right Procedures Adding a Simultaneous sequence divergence Right click a transition and select Add Simultaneous Sequence Divergence To make a simultaneous sequence divergence with three or more branches right click an existing simultaneous sequence divergence and select Add Simultaneous Divergent Step Branch to add a branch Simultaneous Sequence Convergences A simultaneous sequence convergence is a program control structure for SFC in which a single transition is connected after two or more steps A simultaneous sequence convergence is represented by two horizontal lines A simultaneous sequence convergence merges a process flow which has been split into two or more process flow i e by a simultaneous sequence divergence Elements of SFC Section 2 3 Trans3 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 Procedures Adding a Simultaneous Sequence Convergence Right click a step and select Add Simultaneous Sequence Convergence Right click an existing simultaneous sequence convergence and select Connections Add Connection or right click and select Connections Add Connection to Convergence
139. rocess flow branches from a single step to two or more steps and active status is transferred for the branch on which the transition conditions are mel Trans2 FALSE Trans3 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 e f multiple transition conditions at a divergence are simultaneously met priority will be given to the left most step Transition at a divergence can only take place for one step If the priority of the steps has been changed however active status will be transferred according to the priority order Procedures Adding a Divergence Right click a step and select Add Divergence To make a divergence with three or more branches right click an existing divergence and select Add Divergent Transition Branch to add a branch Note Right click the divergence and clear the selection of the Use Default Transition Precedence to display the execution order numerically starting from 1 The order of execution can be specified freely by double clicking a corresponding number and changing it 2 3 5 Convergences A convergence is a program control structure for SFC in which a single step is connected after two or more transitions A convergence is represented by a single horizontal line A convergenc
140. s related to function blocks and structured text refer to the CX Programmer Operation Manual Function Blocks Structured Texts Cat No W447 Intended Audience This manual is intended for the following personnel who must also have knowledge of electrical systems an electrical engineer or the equivalent e Personnel in charge of installing FA systems e Personnel in charge of designing FA systems e Personnel in charge of managing FA systems and facilities AN l Please read this manual and related manuals carefully and be sure you understand Caution the information provided before attempting to install or operate the 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 section Read and Understand this Manual Please read and understand this manual before using the product Please consult your OMRON representative if you have any questions or comments 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
141. shortcuts 22 L ladder 3 local variables 62 loop 61 84 memory area 38 memory range 38 monitoring 98 100 N normal steps 45 normal tasks 37 O object code 106 offline 94 online connection 94 online editing 104 108 111 operating mode 98 overview 2 P PLC models 6 64 pop up menu 14 precautions for transition programs 36 program check 90 program comparison 97 program menu 13 program properties 65 132 program transfer 95 96 program view 11 project directory 9 project workspace 9 Q quick mode 106 R read step timer value instructions 47 restrictions 33 return steps 45 S set step timer value instructions 47 setting action qualifiers 73 setting AQs 73 setting the display color 24 setting the display text 25 setting the timer unit 73 setting the timer value 74 SFC 2 SFC editor 10 SFC editor settings 25 SFC source code 106 SFC view 11 showing action blocks 75 simultaneous sequence convergence 60 simultaneous sequence divergence 60 skip 62 specifications 6 ST 3 ST expression 51 standard mode 106 step control instructions 47 step progression control 42 step timer 73 step transfer conditions 44 steps 44 67 subchart 45 subchart programs 10 subchart steps 45 symbol tables 9 T task allocation 65 tasks 37 tidying 87 toolbar 21 transfer 95 96 transfer conditions 44 tr
142. sition Body Prefix Workspace Transition Subchart Prefix Workspace Subchart Element Width 1 1 j Cancel Apply Help 3 Check the Automatically Show Active Step in Monitoring Mode checkbox and click OK As the active status is transferred for the SFC editor displayed on the screen the screen will scroll automatically to display the currently active step 99 Monitoring Sample CX Programmer STC NewPLC1 NewProgrami Diagram lol xj FB rie Cdk view Insert PLC Program Tools Window Help 19 x Dari ese sem oolmtalewlfassaltn Regs 2 mam ule KQQ lara aww ospteel amp lla Seles o mm BM ARO gt wg i Programs New Program 00 Running 5 Symbols O Actions 9 a_tickercur Y A_gateOpen H a_gateciose Action sample LX Programme EN Ele gde yew insert PLC program Tons Window Help la x ee A Me EEA EA e we a galt a sts e e e XQ SERIE RA S 44a w o p GEL e o ele see DARE gt OP eee m m da aa DE 2 C1 CILH H Monkor Pr symbols Y 10 Table and Unit Setup fa Settinas Memory card A Y Prog rame amp NowProgram1 00 Running 2 Symbols gatecioseLimit For Help press F1 4 5 3 Monitoring Action Transition Programs This section describes how to monitor ladder programs for actions and transitions ST programs cannot be monitored Monitoring Ladder Program Execution Section 4 5 1 Inthe project workspace double c
143. splayed in the following Memory View Dialog Box 1 Select Memory View from the View Menu Example CJ2M CPU35 Memory View Ub Used UM OS Steps Free Lhd 61761 Steps Function Block Define H 2 SFL 52048 Instance E 4 2048 Used FE Program rea 352220480 Steps 62464 Steps Used FB Source 96341048064 Bytes Function Block Area Define The number of function blocks that are defined and the number of action programs transition programs and sub charts used in SFC programs Note The number of action programs transition programs and sub charts used in SFC programs is displayed in parentheses SFC xx if one or more SFC programs is used 129 SFC Program Size and Execution Time Appendix C C 2 SFC Program Execution Time The SFC program execution time varies depending on the following CPU Unit model Active inactive status of the steps Combination of AQ types of the actions Areas specified in the Function Block SFC Memory Allocation Dialog Box The following table shows the standard execution time of each element Unit Micro second Element Element Step 5 to 10 5 to 8 7 to 12 7 to 12 7 to 12 10 to 17 mie e oa 99 foa oe as Action Boolean Ladder ST program 0 6 10 2 5 Transition pen fewa O es ae Ladder ST Executed ae N c O EA program Executed Bea fos Ha foe for fa fr notexecutea 03 os fos os oe fos Example of SFC Program Execution Time When CJ2H CPU68 EIP is
144. st 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 Disabling the Final Scan Operation The final scan function can be enabled and disabled with the following method Select Tools Options from the menu click the SFC Tab select the Use Extended SFC Settings Option and select the Apply Final Scan Logic Option in the General Tab of the SFC program s properties Option selected Final scan execution is enabled for that entire SFC program Option not selected Final scan execution is disabled for that entire SFC program Programming Precautions When Passing Execution Results through a Transition When the final scan is enabled the step action will be executed once in the next cycle after the step changes from active to inactive status Always use the following method to write the action programs in the step before the transition to prevent the final scan from affecting the results when calculation results such as counter values from an action in the step before the transition are being evaluated in the step after the transition Ladder Programming Observe the following precautions if the Reset Output at Final Scan Option is deselected check mark removed in the ladder program s properties When a program section has a calculation that you do not want executed when the step become in
145. step will be marked to indicate that it has been force set force reset as shown below Clearing the Forced Status of a Step 1 Inthe SFC editor select and right click the Step for which the force set force reset is to be cleared 2 Select Force Step Cancel from the pop up menu The force set force reset Status is cleared for the selected step Clearing All Forced Statuses 1 Select Force Cancel All Forces from the PLC menu The force set force reset status is cleared for all l O memory areas including steps 114 Set Step Timer Value Section 5 3 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 1 From the SFC editor select and right click the step for which the step timer present value is to be changed 2 Select Set Step Timer Value from the pop up menu The Set Step Timer Value dialog is displayed Weis Set Step Timer Yalue TicketOut 3 xj Initial Cn DEE A Timer Value seconds ns Cancel ans2 tick v Show Action Blocks Tidy Descendant SFC Elements 3 On the Set Step Timer Value dialog input the desired timer value 0 65535 seconds or 0 6553 5 seconds and click OK The new value is reflected on the PLC 115 Work Online Simulator Section 5 4 5 4 Work Online Simulator The PLC Simulator can be used to check the operati
146. t and select Tidy Descendant SFC Elements from the pop up menu Other SFC elements below the selected SFC element will be tidied 3 2 13 Changing the Step Type Changing a Normal Step to the Initial Step Right click the step to be changed into the initial step and select Step Type Initial from the pop up menu Changing the Initial Step to a Normal Step Right click the initial step to be changed into the normal step and select Step Type 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 87 Searching and Replacing within an SFC Chart Section 3 3 3 3 Searching and Replacing within an SFC Chart 3 3 1 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 Step name Transition name Action program name for the action block Boolean symbol name for the action block Subchart name Symbol name for the transition condition ST expression for the transition condition Program name for the transition condition Select Find from the Edit menu The Find in SFC Editor dia
147. t click the transition after Step 4 and select Edit Transition Condition Input gatecloseLimit as the transition condition Add a jump to Step 1 Right click the transition after Step 4 and select Connections Add Connection On the Add Connection dialog select Initial as the jump destination Check the Draw Connection as Jump checkbox and click OK Precautions When Creating SFC Programs Section 1 5 1 5 Precautions When Creating SFC Programs 1 5 1 Holding or Resetting an Action s Outputs The action s type determines whether the action s outputs see note are held or reset when the step goes from active to inactive status Note In this section the term output refers to the following e For a bit specification it refers to the specified bit address value in memory e For a ladder program it refers to the value written in memory by an instruction e For an ST program it refers to the value written in memory by a statement Bit Specification e The output is reset when a holding action qualifier S is not specified but a qualifier such as action qualifier N is specified e When a holding action qualifier S is specified the output is held by the action qualifiers execution condition even if the step becomes inactive In this case the output can be reset by using a resetting action qualifier R and adding a step as shown in the following chart Output Boolean variable A opa Ladder Program With the d
148. t j Memory E T Programs E E NewProgrami 00 Actions LJ Transitions i Function blocks Insert SFC Subchart Gopy Mm Paste Delete Y Allow Docking Hide Float In Main Window Properties A subchart program will be registered under the Subcharts folder 3 Double click the registered subchart program or right click and select Open from the pop up menu 82 Editing the SFC Chart xl NewProject ED NewPLC1 C51G H Offline Symbols 4 10 Table and Unit Setup Settings lt A Memory E A Programs B NewProgrami 00 3 Symbols Y Actions Y Transitions 3 Subcharts Subcharie iF Function Blocks Compile db Cut Copy a Paste Delete Rename Y Allow Docking Hide Float In Main Window Properties n The subchart edit window will be displayed Edit the subchart Sample CX Programmer SFC NewPLC1 NewProgram Subcharti Diagram 2 iol x fa File Edit View Insert PLC Program Tools Window Help 18 xj osa ajen eejocjiara t e asa ona ar 2 Dz was aaa Est lee fr uew I oE EL lae 3 5 me Er Arana ir ss ERE zix A a Y u ii 2 E NewProject 2 9 NewPLCILCS1G H Ortine Se Symbuls GT 10 Table and Unit Setup fa Settings E Programs E NewProgrami 00 SA Symbols m Actions E Transitinms E O Subcharts E Subchartl JF Function Blocks For Help
149. talled 1 2 2 Specifications Item Details Programming language for SFC ladder or ST tasks In any combination SFC program unit Tasks 1 task 1 SFC chart CJ2 384 tasks max 128 cyclic tasks 256 extra tasks Other models 288 tasks max 32 cyclic tasks 256 extra tasks Tasks supported for SFC Cyclic or extra tasks program allocation Steps transitions actions jumps subcharts Note SFC elements are automatically registered to local variables SFC chart shapes Series divergence convergence simultaneous sequence divergence convergence jump Note Number of divergences convergences simultaneous sequence divergences convergences and subcharts are unlimited Unlike with SFC for CV series Step status Active inactive Note PAUSE and HALT are not supported Unlike with SFC for CVM1 CV series Transitions Boolean address bits Boolean variables or actual addresses ST expressions or transition programs Note 1 A ladder or ST program can be used for a transition program 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 Action blocks Action Qualifiers AQ 11 types action Note 1 There is no restriction on the number of action blocks allocated to a step 2 f there are multiple action programs in the same step the execution order is
150. that does not have a connection in the SFC chart Program Menu This menu is enabled only when the SFC editor is displayed Online Edit Transfer SFC ST Source to When an SFC program revision is being transferred PLC Online Edit in quick mode during online SFC chart editing only the SFC source code is transferred later Release FB SFC ST Makes PLC access rights invalid in the event of Online Edit Access Rights process interruption due to communication error during online SFC chart editing 13 Window Components Section 1 3 1 3 3 SFC Editor Pop up Menu This section describes menus which are displayed by right clicking within the SFC editor 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 Offline Pop Up Menu name step step step step address to the selected step adds it to the selected step New Structured Text Creates a new ST program and adds it Action to the selected step Existing Action Adds an already registered action to the selected step Show Action Blocks Shows hidden action blocks Add Transition and Step Adds a transition and a step and connects them to the selected step Add Transition Adds a transition and connects it to the selected step Insert Step and Transitio
151. the BKUP LED on the front of the CPU unit is still lit will interrupt the backup and the program will revert back to the unedited state Function blocks cannot be edited online Also neither function block definitions nor function block instances can be added or deleted by editing online Addresses allocated in steps and transitions during online editing will be initialized when online editing is ended Perform online editing in two steps when adding an action program or transition program to an SFC chart 1 First use online editing to add the new action program or transition program to the SFC program and transfer the data to the PLC 2 Perform online editing again to add the action program or transition program created in the first step to the SFC chart Subcharts cannot be edited online Precautions on Online Editing If an SFC chart is changed using online editing in the same cycle in which step status changes the final scan and the PO action of steps that became inactive will not be executed The P and P1 actions of steps that became active will also not be executed Online Editing of Actions and Transitions Editing Ladder and structured text programs for actions and transitions can be edited online as long as the PLC is not in the RUN mode Online Editing Section 5 1 Note When online editing actions transitions it is not possible to edit the SFC chart Starting Online Editing 1 Start monitoring 2 Inthe proje
152. the pop up menu and select one of the following e Boolean Action Boolean variable or actual address e New Ladder Action e New Structured Text Action e Existing Action Adding a Boolean Variable Action Block Action blocks can be inserted into each step of an SFC chart Here a Boolean variable bit action block will be inserted 1 Select and right click a step and select Add Action Boolean Action from the pop up menu Note Multiple action blocks can be inserted into a single step by repeating this procedure If a step contains multiple action blocks they will be executed in sequence from top to bottom Edit Step Name Step Type Step Timer b E E New Ladder Action Add Transition and Step New Structured Text Action Add Transition Existing Action Add Divergence Add Simultaneous Sequence Convergence escendant SFC Elements Boolean Action An action block is inserted to the right of the step 2 Clicking in the action will display a Browse button The Select Symbol dialog box shown below will be displayed Select Symbol loj x Symb OOO Scope NewPrograml Cancel Symbols 3 Selecta variable from the list shown or enter a variable name in the Symbol field and click OK Note The variables shown are already registered in the local symbol table If the entered variable does not currently exist enter the variable name in
153. tion Force Step Activates the selected step Deactivates the selected step Cancels the forced status Set Step Timer Value Updates the step timer value Open Subchart Definition Opens a subchart Show Action Blocks 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 Edit Transition Condition Enables editing of the selected transition condition Add Step and Transition Adds a step and a transition and connects them to the selected transition Add Step Adds a step and connects it to the selected transition Insert Transition and Step Above Adds a transition and a step and connects them to the topside of the selected transition 15 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 Connections Add Jump From Transition Draws out a connection from the downside of the selected transition and connects it to the topside of the step that is to become the jump destination Add Connection From Draws out a connection fr
154. tion Right click a step and select one of the following from Add Action Boolean Action New Ladder Action New Structured Text Action Existing Action Selecting an AQ Double click an AQ in an action block and select from the combo list Changing the Time Set Value for an AQ Right click an action block and select Edit Action Qualifier Time Adding a Boolean Variable 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 Defining an Action Program Right click the Actions folder in the project workspace and select either Ladder or Structured Text both under Insert Action Adding a Ladder Program Right click a step and select Add Action New Ladder Action or if an action program is already registered select Existing Action to use an existing action program Adding an ST Program Right click a step and select Add Action New Structured Text Action or if an action program is already registered select Existing Action to use an existing action program 58 Elements of SFC Section 2 3 2 3 4 Divergences A divergence is a program control structure for SFC in which two or more transitions are connected after a single step A divergence is represented by a single horizontal line With a divergence the p
155. tion and connects it to the step When a step is not selected it inserts an independent transition Divergences When a bottom step is selected this item adds a divergence and 2 transitions and connects them to the step When a step is not selected it adds a step a divergence and 2 transitions Convergences When a conditionally branched bottom transition is selected this item adds a convergence and a step and connects them to the transition Simultaneous Sequence Divergences When a bottom transition is selected this item adds a simultaneous sequence divergence and 2 steps and connects them to the transition When a transition is not selected it adds a transition a simultaneous sequence divergence and 2 steps Simultaneous Sequence Convergences When a parallel branched bottom step is selected this item adds a simultaneous sequence convergence and a transition and connects them to the step 12 Window Components Section 1 3 Step and Transition When a bottom transition is selected this item adds a step and a transition and connects them to the transition Transition and Step When a bottom step is selected this item adds a transition and a step and connects them to the step Simultaneous Convergent Step Above Inserts a step on the topside of a simultaneous sequence convergence Convergent Transition Above Inserts a transition on the topside of a convergence Connector Draws a connection from an SFC element
156. tions and the sequence is from top to bottom in the order that they appear in the project workspace Action Qualifier AQ AQ defines the execution timing for each action It can determine how the actions should be executed when the step becomes active Only one AQ can be specified for each action The action s type determines whether the outputs are held or reset when the step goes from active to inactive status When necessary change the initial settings or add reset processing to the program e When a bit is specified the output is reset when a holding action qualifier S is not specified The output status is held if a holding action qualifier is specified e With ladder programs the outputs are reset by default The default setting can be changed to hold the output s status e With ST programs the status of the outputs in the program is held by default When necessary write reset processing in the program and use the Action Flag a flag that goes ON when the corresponding step in an ST program becomes inactive to control the reset processing Note For details refer to 7 5 7 Holding or Resetting an Action s Outputs Types of Action Qualifiers AQs There are 11 AQ types as follows D DS L SD and SL have a time element For functions and for time element availability of the 11 AQ types refer to the following table The action is executed after the user specified time has passed since step activation If the step becomes in
157. to which data was previously transferred in Quick Mode The status bar of the CX Programmer will flash a yellow message saying that the source code is different 3 Select Project Online Editing Transfer SFC ST Source The source code transfer dialog box will be displayed 4 Click the OK Button The SFC source code automatically back up onto the computer will be compared with the object code on the PLC system If the two codes match the SFC source code can be transferred Normally CX Programmer converts compiles the program code SFC source code into the code which is executable by the CPU unit object code and transfers both of these codes The CPU unit saves the program s SFC source code and object code onto the user memory area and onto the internal flash memory CX Programmer can recover the transferred program by the transfer from the CPU unit only when both of these codes have been properly saved Cancel 1 To discard the changes made to an edited SFC program select Program Online Edit Cancel The edited SFC program will return to the state before the editing without being transferred to the PLC 107 Online Editing 5 1 2 108 Section 5 1 Effect on CPU Unit Operation Performing online editing in MONITOR mode i e while the CPU unit is in operation will 1 Extend the cycle time for the CPU unit by several cycles when the CPU unit program is rewritten and 2 Further extend the cycle ti
158. top Program Mode Sc ji31wfz 0 Node 0 Stop Program Mode SYNC 071314 You can now add an SFC element of the selected type Note When online editing actions transitions it is not possible to edit the SFC chart 111 Online Editing Section 5 1 a Sample CX Programmer SFC NewPLC1 NewProgram1 Diagram 3 Oj xj 1 File Edit View Insert PLC Program Tools Window Help l x BEAREN TETEE 11 Bae RP ER OR o a MEE CANCEL BEET narran arras zx E NewProject E jaan NewPLC1 CJ1H H Stop Program Mode E Symbols q 10 Table and Unit Setup E Settings E Memory card EB Error log 8 PLC Clock lt j Memory E 3 Programs B NewProgrami 00 IA Structured Text Erom File AJ Act v Allow Docking Transit Hide Subche DF Function Blocks Float In Main Window Properties Project F NewPLC1 Net 0 Node 0 Stop Program Mode SYNC 07131 4 3 The added SFC element can be used for online SFC chart editing 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 112 Force Setting Force Resetting Section 5 2 5 2 Force Setting Force Resetting 5 2
159. u and drag the connection to the jump destination step to establish a connection XT O O oa Connection 3 x To Trans3 From Cancel gt From Trans3 To Step2 Step1 Trans Step3 Edit Transition Condition Add Step and Transition I Draw Connection as Jump Add Step Insert Transition and Step Above Insert Step Above Add Convergence Add Simultaneous Sequence Divergence Add Subchart Step Add Jump From Transition z Add Connection From Transition Open Transition Definition a Delete Connection Erom Transition Cut Y Draw jection From Transition as Jump Copy Paste Delete Add Connection To Transition Delete Connection To Transition The Add Connection dialog will be displayed 7 Onthe Add Connection dialog select the destination step element 8 Check the Draw Connection as Jump checkbox and click OK Note For a loop connection remove the check from Draw Connection as Jump checkbox Add Connection xj To Trans3S From From Trans To gt ans Steps Steps A RE O Trans e Draw Connection as Jump Plisson M HEEE B Changing a Loop to a Jump A loop can be changed to a jump 1 Right click a loop transition and select Connections Draw Connection From Transition as Jump from the pop up menu 84 Editing the SFC Chart Section 3 2 1 Step3 O O m p rans3 FALSE m ESEE n Ed
160. ubchart active to start execution of the actions STEP SE Makes the specified step of subchart inactive to end execution of the actions DEACTIVATION Status is changed as follows by the Step Control Instructions Cre ERE Actions executed SA SE Crate HE Actions not executed Note The active steps is indicated by a solid circle 0 Example 1 Action 1 in step 2 can be used to make step 4 active AE ET Made active Example 2 A subchart step can be specified to make the subchart active BET ye Steps Made active Refer to 2 3 1 Steps for information on using the Step Control Instructions SA SE 117 Specifications for Step Control Instructions Appendix A A 1 STEP ACTIVATE SA and STEP DEACTIVATE SE SA Instruction SE Instruction Outline Outline Changes a step used in an SFC chart from inactive to Changes a step used in an SFC chart from active to active status inactive status Symbol Symbol D Step Flag D Step Flag Description Description The step specified by D is made active The step designated by D is made inactive Actions executed Actions executed SA SE Actions not executed Actions not executed Variations Variations Executed Each for ON Executed Each Cycle for ON Variations ore Variations L Executed Once for Upward Executed Once for Upward SE Differentiation Differentiation Immediate Refreshing Specification Immediate Refreshing Specificatio
161. ultaneous sequence divergence sequence divergence to the clipboard sequence divergence to the clipboard sequence divergence Tidy Descendant SFC Elements Arranges SFC chart elements positioned after the selected simultaneous sequence divergence 18 Window Components Section 1 3 Right Clicking a Simultaneous Sequence Convergence 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 Add Transition and Step Adds a transition and a step and connects them to the selected simultaneous sequence convergence Connections Add Connection To Draws out a connection from the Convergence topside of the selected simultaneous sequence convergence and connects it to the downside of a step Add Connection From Draws out a connection from the Convergence downside of the selected simultaneous sequence convergence and connects it to the topside of a transition Delete Connection To Deletes all connections on the topside Convergence of the selected simultaneous sequence convergence Delete Connection From Deletes the connection on the Convergence downside of the selected simultaneous sequence convergence Cuts the selected simultaneous sequence convergence to the clipboard Copies the selected simultaneous sequence convergence to the clipboa
162. us Adds an SFC simultaneous sequence En Convergence convergence Add Connector Adds an SFC connection 21 Window Components 22 1 3 5 Keyboard Shortcuts Shortcuts Section 1 3 The following shortcuts can be used in SFC chart editor SFC Editing Step SFC Editing Transition Step and Transition Transition and Step SFC Editing Subchart Connections SFC Editing Join SFC Editing Branch Unconnected Step Unconnected Transition SFC Editing Editing of Selected Parts SFC Editing Action Qualifier AQ Actions Initial Step Align Tidy All SFC Elements Shortcut Shift S Shift T Shift P Shift R A J Shift J When a bottom transition is selected this shortcut adds a step and connects it to the transition When no SFC element is selected within the SFC chart inserts an independent step When a bottom step is selected this shortcut adds a transition and connects it to the step When no SFC element is selected within the SFC chart inserts an independent transition transition and connects them to the transition step and connects them to the step When a bottom transition is selected this shortcut adds a subchart step and connects it to the transition When no SFC element is selected within the SFC chart inserts an independent subchart step When an SFC element is selected this shortcut displays the Add Connection dialog Adds a join to a bottom SF
163. used The Step Time for the paused step will continue to operate even while the step is paused Pauses execution of an SFC task The outputs from any actions that are being executed in the task that is paused will be held and processing will be paused SFC PAUSE WITH NO When execution is started again with the SFCON instruction it will start from the RESET SFCPRN step that was active before the task was paused The Step Time for the paused step will continue to operate even while the step is paused SFC ON SFCON Restarts execution of an SFC task that was ended or paused using one of the other SFC Task Control Instructions SFC task SFC task SFC task SFCPRN 4 4 SFCOFF SFCPR Outputs held Outputs reset Outputs held SFCON SFCON l SFCON Executed from initial step Executed from status before pause Executed from status before pause 123 SFC Task Control Instruction Specifications Appendix B B 1 SFC ON SFCON SFC OFF SFCOFF SFCON Instruction Outline Restarts execution of an SFC task that was ended or paused using one of the other SFC Task Control Instructions Symbol SFCON N SFC task number Operands Cyclic Task For CJ2 N 80 to amp 128 Correspond to cyclic tasks O to 128 For other models N 80 to 831 Correspond to cyclic tasks 0 to 31 Description The SFC task specified by N is started If an ended task is started it is executed from the initial step If a paused task
164. utput of a Step as the Input for an Isolated Transition A connection can be made from a step to an isolated transition 1 Right click a step and select Connections Add Connection From Step from the pop up menu 2 Put the mouse pointer over the input side of the transition to be connected and click Connecting the Output of an Isolated Step as the Input for a Transition A connection can be made from an isolated step to a transition The connection is made between the input side of the transition and the output side of the step 85 Editing the SFC Chart Section 3 2 1 Right click a transition and select Connections Add Connection From Step from the pop up menu 2 Put the mouse pointer over the output side of the step to be connected and click Connecting the Output of a Transition as the Input for an Isolated Step A connection can be made from a transition to an isolated step 1 Right click a transition and select Connections Add Connection To Step from the pop up menu 2 Put the mouse pointer over the input side of the step to be connected and click Connecting the Output of an Isolated Step as the Input for a Divergence or 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 1 Right click a divergence or on a simultaneous sequence divergen
165. ve Add Convergence Add Simultaneous Sequence Divergence Connections gt Add Subchart Step gt Open Transition Definition Cut Copy Paste Delete Tidy Descendant SFC Elements 76 Editing the SFC Chart Section 3 2 3 2 6 Inserting Immediately Before a Step or Transition Inserting a Step and a Transition Before a Ste A step and a transition can be inserted before a step or subchart step 1 Right click a step or subchart step and select Insert Step and Transition Above from the pop up menu Step Step Edit Step Name Step Type gt Step Timer b Add Action gt Show Action Blocks Add Transition and Step Add Transition Insert Step and Transition Above Insert Transition 4bove Add Divergence Add Simultaneous Sequence Convergence Connections b Open Subchart Definition Cut Copy Paste Delete Tidy Descendant SFC Elements Inserting a Transition and a Step Before a Ste A transition and a step can be inserted before a transition 1 Right click a transition and select Insert Transition and Step Above from the pop up menu Step1 Step1 Edit Transition Condition Add Step and Transition Add Step Insert Transition and Step Above Insert Step Above Add Convergence Add Simultaneous Sequence Divergence Connections gt Add Subchart Step gt Open Transition Definition Cut Cop
166. when resetting outputs Action Flag A Action_name A This flag is ON when the step is active and goes OFF when execution of the final scan is completed after the step is deactivated Use the Action Flag A as a set with the Action Flag Q when special processing must be performed for the final scan in a ladder or ST program The following diagram shows the operation of the action flags when the final scan function was enabled by selecting the Apply Final Scan Logic Option in the General Tab of the SFC program s Property Dialog Box Active status p I I ON Step OFF l i Action Qualifier N i i i i l ON Action flag Q Action_name Q OFF i 1 scan cycle Y ON l l Action flag A Action_name A OFF 3 y Normal End processing processing l Executed y Action Not executed The following diagram shows the operation of the action flags when the final scan function was disabled by clearing the Apply Final Scan Logic Option on the General Tab Page of the SFC program s Property Dialog Box 57 Elements of SFC Section 2 3 Active status gt ON Step OFF Action Qualifier N ON Action flag Q Action_name Q OFF ON Action flag A Action_name A OFF Executed Action Not executed Indicator Variable A variable name can be registered to represent an action Nothing will be executed however Procedures Adding an Ac
167. y Paste Delete Tidy Descendant SFC Elements 3 2 7 Creating a Divergence Convergence Creating a Divergence Adding 2 Transitions A divergence can be added after a step or subchart step 1 Right click a step or subchart step and select Add Divergence from the pop up menu 17 Editing the SFC Chart Section 3 2 Step1 Step1 Edit Step Name Step Type gt Step Timer dl E Add Action gt O Trans2 3 FALSE i era oO O Show Action Blocks Add Transition and Step Add Transition Insert Step and Transition Above Insert Transition Above Add Simultaneous Sequence Convergence Connections gt Open Subchart Definition Cut Copy E Paste Delete Tidy Descendant SFC Elements 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 1 Right click an existing divergence and select Add Divergent Transition Branch from the pop up menu Step1 Step1 g m Add Divergent Transition Branch Insert Step Above Insert Transition and Step Above Connections lt Use Default Transition Precedence Cut Copy Paste Delete Tidy Descendant SFC Elements A transition is added to the divergence When using a divergence add SFC elements so that each br

Download Pdf Manuals

image

Related Search

Related Contents

charger l`aide-m?moire pour Nokia N8  Relay Output - MORNSUN POWER  Clear and Simple Quick Start Guide  Gastroback Hand Mixer Digital Home Culture  Scarica l`allegato    Coby MP835  Mentor EMカタログ465KB  Sony 5.1 Home Theatre Package  Descargar el folleto  

Copyright © All rights reserved.
Failed to retrieve file