Home
QCPU(Q Mode) Programming Manual (MELSAP-L)
Contents
1. SO S1 S2 BL1 HTa S2 S2 x1 Using BL1 instead of block t2 27 START END bit as contact the same operation can be performed AIF HO Related Instructions 1 SFC control instructions e Block START instruction sBLm block END instruction EDU ak aia wed Saeed da tin aetna ind See Section 4 4 6 2 SFC diagram symbols Block START step BME Gr See Sections 4 2 8 and 4 2 9 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 5 2 Step transition bit The step transition bit is designed to check whether the transition condition of the step in execution has been satisfied or not 1 After the operation output at each step is completed the step transition bit automatically switches ON when the transition condition for transition to the next step is satisfied 2 A transition bit which is ON will automatically switch OFF when processing of the block in question occurs again Example Step transition bit M1 ge N IT Rm OFF dh SO Transition condition 0 Step 2 Step 1 Transition condition 2 unsatisfied Z Step 1 Transition condition 1 satisfied Step 0 Transition condition 1 unsatisfied Transition condition 0 satisfied S1 Transition condition 1 S2 Transition condition 2 Other program executed Other program executed Other program executed S3 AHHH 3 If a continuous transition is designated continuous transit
2. 3 When a forced OFF is executed by the block START END bit and the block in question becomes inactive processing will occur as follows a Execution of the block in question will stop together with all outputs from the step which was being executed Devices switched ON by the SET instruction will not switch OFF b If another block is being started by the block START step in the corresponding block the corresponding block stops However the start destination block remains active and continues processing To also end the start destination block simultaneously the block START END bit of the start destination must also be turned OFF 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 A block which has been forcibly deactivated is restarted as shown below Relevant Block Restart Status When the START condition of block 0 is Operation is restarted from the initial Auto START ON in the SFC setting of the giao following END step processing PLC parameter dialog box When the START condition of block 0 is The block is deactivated after END Auto START OFF in the SFC setting of the step processing and processing is PLC parameter dialog box restarted from the initial step when another START request occurs for that block Block 0 Other than block 0 Program Example Use the contact of the block START END bit when a transition occurs after block 1 ends Block 0 Block 1 Block 2 soj soj to to bMo Se SI SCH ti e
3. 3 In a selection transition a coupling can be omitted by a jump transition or end transition When transition condition b is satisfied at the step n operation output processing will epn fe te tae as proceed in order through steps n 1 n 2 Transition Transition and n 3 When transition condition d is BR a b GC e E satisfied processing will jump to step n For Ln n 4 details on jump transitions see Section T 4 3 4 Step Step n 2 n 5 Step n 3 Transition T condition d n POINTS In a selective transition the number of branches and the number of couplings may be different However a selection branch and parallel coupling or a parallel branch and selection coupling cannot be combined 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 Selection transition operation flowchart a Initial step Operation status L Transition condition a Operation output of initial step 0 is executed sto Transition _ Transition _ Transition S transition condition condition b condition e condition h a satisfied Step 2 step 4 Jste 6 Transition _ Transition Operation output of initial condition c condition f step 0 is deactivated as 3 Step 5 _ _ Transition _ _ Transition _ Transition Operation output of initial
4. see When any one of the transition destination steps of the parallel branch is active a transition is executed and the previous step becomes inactive a Transition condition satisfied L WW CS a gw E Fc Transition L IT d L E C Li When the transition destination steps are all inactive normal transition processing is performed and all the transition destination steps become active POINTS 1 The operation mode for transition to active step at step double START applies to a transition to be executed when a transition condition is satisfied or to a forced transition set using the transition control instruction SET TRn of the SFC control instructions When the step control instruction SET Sn of the SFC control instructions is used to issue a START request to the step that is already active the request is ignored and the processing continues 2 In the Basic model QCPU the transition to active step at step double START cannot be set The transition to active step at step double START in the Basic model QCPU is executed in the TRANSFER mode 5 SFC PROGRAM PROCESSING SEQUENCE MELSEC Q 5 SFC PROGRAM PROCESSING SEQUENCE 5 1 Whole Program Processing of Basic Model QOPU This section explains the program processing of the Basic model QCPU Since this manual describes o
5. 1 10 2 SYSTEM CONFIGURATION MELSEC Q 2 SYSTEM CONFIGURATION 1 Applicable CPUs MELSAP L SFC program runs on the following CPU modules CPU Type Model Name Product whose first five digits of serial No Basic model QCPU QOOJCPU QO0CPU Q01CPU are 04122 or later is compatible High Performance model QCPU _ QO2CPU QO2HCPU QO6HCPU Q12HCPU Q25HCPU Process CPU Q12PHCPU Q25PHCPU 2 Peripheral devices for SFC program The following peripheral devices can be used to create edit and monitor SFC programs Compatible CPU Software Package Model Name High Performance for Personal Computer Basic model QCPU Process CPU model QCPU SSS A e SW4D5C GPPW or later GX Developer Version 7 10L SW7D5C GPPW or later GX Developer Version 8 CS SW8D5C GPPW or later Usable x Unusable 2 SYSTEM CONFIGURATION S MELSEC Q MEMO 3 SPECIFICATIONS MELSEC Q 3 SPECIFICATIONS This chapter explains the performance specifications of SFC programs 3 1 Performance Specifications Related to SFC Programs 3 1 1 Performance specifications of Basic model QCPU 1 Table 3 1 indicates the performance specifications related to an SFC program Table 3 1 Performance Specifications Related to SFC Program Item Number of branches Max 32 Max 1024 steps for all blocks Max 128 steps for one block including HOLD steps Max 2k steps for all blocks steps 512 steps per step steps 512
6. 4 58 4 58 4 SFC PROGRAM CONFIGURATION MELSEC Q 2 Step END instruction r a A specified step at a specified block is forcibly deactivated Coil HOLD and operation HOLD steps are subject to this instruction b When the number of active steps in the corresponding block reaches 0 due to the execution of this instruction END step processing is performed and the block becomes inactive When the bock START END bit of the SFC information devices has been set the corresponding bit device changes from ON to OFF c If the RST instruction is executed at a step located in a parallel branch the parallel coupling condition will remain unsatisfied d If a specified step is already inactive when this instruction is executed the instruction will be ignored equivalent to the NOP instruction e When the operation output is used to end the step do not specify the current step as the specified step number If the current step is designated as the specified step number normal operation will not be performed of E 2 f Specify the step as described below 1 In the case of SFC program e Use Sn when specifying the step in the current block e Use BLm Sn when specifying the step in another block 2 In the case of sequence program e Use BLm Sn when executing the step END instruction in the sequence program e When the block number is not specified specify the block number with the BRSET
7. Block END by SFC control instruction ES et Convenient for executing a forced STOP at emergency stops etc without regard to the mis the block No operation status Block processing is also ended when the rBLmOSn instruction is used to deactivate all the active steps of the corresponding block e The processing of the corresponding block is ended to deactivate it by forcibly turning OFF the block START END bit which was set to each block as the SFC information device in the program or peripheral device POINTS 1 A forced end to block processing is possible using a method which is different from that used to start the block Example 1 A block started by an SFC diagram symbol BmH Bm can be ended by an SFC control instruction nBLm 2 A block started by an SFC control instruction sBLm can be ended by forcibly turning OFF the block START END bit of the SFC information devices e Convenient for debugging and test operations because block processing can be ended from a peripheral device without requiring a program Block END by SFC information device 2 After block END processing is completed the block can be restarted as shown below e After block processing is ended processing is started automatically from the initial step When the Start conditions is e After block processing is ended the designated as Do not autostart block remains inactive until a block 0 START reque
8. completed The SFC program performs a sequence of operations beginning from the initial step proceeding to each subsequent step as the transition conditions are satisfied and ending at the END step 1 When the SFC program is started the initial step is executed first 2 Execution of the initial step continues until transition condition 0 is satisfied When this transition condition is satisfied execution of the initial step is stopped and processing proceeds to the step which follows the initial step Processing of the SFC program continues from step to step in this manner until the END step has been executed 1 3 1 GENERAL DESCRIPTION MELSEC Q 1 2 SFC MELSAP L Features 1 Easy to design and maintain systems It is possible to correspond the controls of the entire facility mechanical devices of each station and all machines to the blocks and steps of the SFC program on a one to one basis Because of this capability systems can be designed and maintained with ease even by those with relatively little knowledge of sequence programs Moreover programs designed by other programmers using this format are much easier to decode than sequence programs Station 1 Station 2 Station 3 control unit control unit control unit Step transition control unit for overall processi e P Transfer machine Overall system SFC program Step transition control Station 1 S
9. inactive a block forced START is made n is the step No from the specified step e When there are initial steps in multiple Condition blocks a selection START is made sBLm Sn Step START by SFC control instruction I xm is the block No n is the step No 6 SFC PROGRAM EXECUTION MELSEC Q 6 4 2 Step END deactivate methods Steps can be ended deactivated by the methods shown below END Method e The step is automatically ended by the system when the transition condition associated with the e Basic operation of SFC program corresponding step is satisfied e When the step attribute has been specified Ended when condition is satisfied operation is performed according to the T attribute ransition condition END by SFC diagram f Set the step to a reset step as the step attribute e Convenient for ending the HOLD step when symbol and specify the step number to be ended the machine operation condition is satisfied during SFC program execution when a transition to the error processing step is performed by selection branch for example e The step number to be ended can be specified Step No to be ended in only the same block e The specified step is forcibly ended by the SFC control instruction at the step operation output of the SFC program or in another sequence program Condition e The steps in different blocks can also be ended G a ei SEC Control ran e The block is ended when all steps of
10. 4 3 3 Parallel transition MELSEC Q Parallel transition is the transition format in which several steps linked in parallel are processed simultaneously when the relevant transition condition is satisfied Step n operation output A Transition condition b a Step n 1 Step n 3 operation operation output B output D Transition condition c Transition condition d Step n 2 Step n 4 operation operation output ICH output E Step n operation output A Transition condition b Step n 1 operation output B Transition condition c Waiting step Waiting step Transition condition d Step n 2 operation output C e From step n processing will proceed simultaneously to steps n 1 and n 3 when transition condition b is satisfied e Processing will proceed to step n 4 when transition condition c is satisfied and to step n 4 when transition condition d is satisfied e When transition conditions b and c are satisfied at step n and step n 1 execution steps n and n 1 will be deactivated and processing will proceed to the waiting steps e Waiting steps are used to synchronize parallel processing operations Parallel processing steps always proceed to a waiting step When condition d is sati
11. Bm6 Lol 4 Only step relay S can be used EEN k4sn EE BLm K4Sn nis a step No m is a block No and n is a step No Function 1 A batch readout designated number of words of step operation statuses is executed at the specified block 2 The readout results are stored at the D device as shown below b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 bi bd on on 0 1 0 1 0 1 0 1 on on on on 0 1 0 1 0 1 on on on A EEN gt Step designated at Sn Step S n 15 Step S n 1 0 Step in question is inactive 1 Step in question is active OR 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 A S n A x16 15 Step S n A x 16 3 The bit corresponding to the unassigned step No nonexistent step No in the read data turns to DOT 4 51 4 51 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 If the read data range exceeds the maximum step No in the block the data of the next block No are read When there are no blocks in and after the block to be read 0 is stored into the remaining bits Example When BMOV BL1 S2 DO K2 is executed in the following case e Block 1 The maximum step No is 10 S10 and step 5 S5 and step 8 S8 do not exist e Block 2 The maximum step No is 12 S12 and step 3 S3 does not exist e Block 3 and
12. Instructions not supported by the Basic model QCPU 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 3 Transition A transition is the basic unit for comprising a block and is used by specifying a transition condition A transition condition is a condition for execution to proceed to the next step and execution proceeds to the next step when the condition is satisfied Table 4 2 Transition Condition Type List Type Function Outline Serial transition e When the transition condition is satisfied execution proceeds from the current step to the subsequent step Selection transition e A single step branches out into multiple transition conditions oranch coupling e Among those multiple transition conditions execution proceeds to only the step in the line where the transition condition is satisfied first Parallel transition e Execution simultaneously proceeds to all multiple steps that branch from a single step oranch coupling e When all steps immediately before a coupling are activated execution proceeds to the next step when the common transition condition is satisfied Jump transition e When the transition condition is satisfied execution proceeds to the specified step in the same block 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 3 1 Serial transition Serial transition is the transition format in which processing proceeds to the step immediately below the current step when the transition condition is satisfied
13. Operation results converted to trailing edge pulse memory O Usable X Unusable 4 SFC PROGRAM CONFIGURATION MELSEC Q CPU Module Type High Instruction f e s Performance Instruction expression Function Basic model QCPU Model QCPU Process CPU QnACPU L lt gt gt gt lt lt O Usable x Unusable 5 Serial and parallel connections being mixed When serial and parallel connections exist in the same transition condition a serial connection amp has priority Use to give a parallel connection higher priority Example aX0 aMO amp aX1 aX0 aM0 amp aX1 aX0 A aX1 aM0 amp aM1 aX0 amp aX1 aM0 amp aM1 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 4 Controlling SFC Programs by Instructions SFC Control Instructions SFC control instructions can be used to check a block or step operation status active inactive or to execute a forced START or END etc Using the SFC control instructions with an SFC program created with SFC program symbols the SFC program can be controlled easily The types and functions of the SFC control instructions will be explained CPU Module Type High Instruction Expression Function Basic model Performance QCPU Model QCPU Process CPU QnACPU a amp a la h d L e EAA Sn 1 e Checks a specified step in a specified pl
14. RE is SFC Type Block Step me La TRn Program Condition Bit Word BLm TRn Kis Transition l P Condition Device name When step in current block is specified When step in another block is specified When step is specified in sequence program When expressed in a circuit When expressed in a circuit E TRn BLm TRn arm aBLm TRn T aBLm TRn H BLm TRn FF oTRn BLM TRn T bBLm TRn a C xk BLm TRn JF amp aTRn SC amp ablmlDn CA o 8 aBLm TRn L SCH aas bTRn amp bBLM TRN CA amp BBLm TRn t x BLm TRn aBLm TRn F aTRn LA aBLm TRn f BLm TRn x K bBLm TRn x k bTRn x bBLm TRn BLm Sn m is a block No nis a transition condition No and is a contact Function 1 Checks whether or not the specified transition condition of the specified block is specified for forced transition by the forced transition EXECUTE instruction SET BLm TRn 2 The contact status changes as described below depending on whether the specified transition condition is specified for a forced transition or not Contact of N O Contact Contact of N C Contact Instruction Instruction When specified for forced FF transition When not specified for forced transition 4 SFC PROGRAM CONFIGURATION MELSEC Q 3 Specify the transition as described below a In the case of SFC program 1 Use Sn when specifying the step in the current block 2 U
15. c When an SFC control instruction rBLm Sn rSn designates a reset at the block in question d When a reset occurs at the device designated as the SFC information register s block START END device e When a reset step for resetting the step in question becomes active f When S999 is designated at the reset step in the same block g When the SFC START STOP command SM321 is switched OFF 4 Block STOP processing Make a block STOP using the STOP RESTART bit of the SFC information devices or the block STOP instruction of the SFC control instructions The processing of the active step in the block where a block STOP was made is as described below a When the block STOP time operation output flag SM325 is OFF coil output OFF The step becomes inactive when the processing of the corresponding block is performed first after a block STOP request e All coil outputs turn OFF e However the coils turned ON by the SET instruction remain ON b When the block STOP time operation output flag SM325 is ON coil output held The coil outputs remain ON during a block STOP and after a block RESTART 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 2 7 Reset step R A reset step is a step which designates a forced deactivation of another specified step operation output The reset step deactivates the designated step in the current block before execution of the operation output every scan Except the deactivation of the
16. ceseseeeceeteeeeeeeeeeteeees See Section 4 4 4 4 SFC PROGRAM CONFIGURATION MELSEC Q QCPU PoC CPUS ELC CPU Process CPU Basic High Performance Aar aes EE ee l x First five SE of serial No are 04122 or later 4 4 6 Block START amp END instructions s r Usable Devices Programs Using Instructions Execution Site Internal Device i i Mi i Data SFC Program Ve System User i roy pT Other Sequence Ju eo Type iti Program p naan Condition bees BLm Device name s BLm n rQ BLm t m is a block No E m is a block No Function 1 Block START instruction sBLm a A specified block is forcibly activated independently and is executed from its initial step When there are multiple initial steps all initial steps become active When the bock START END bit of the SFC information devices has been set the corresponding bit device changes from OFF to ON b If the specified block is already active when this instruction is executed the instruction will be ignored equivalent to the NOP instruction and processing will continue 2 Block END instruction rBLm a A specified block is forcibly deactivated independently When there are active steps all are deactivated and the coil outputs are turned OFF When the bock START END bit of the SFC information devices has been set the corresponding bit device changes from ON to OFF b If the specified block is already inactive when this instruction is exec
17. e 4 Program error location e The following codes are stored into the common information classification code e 0 None e 1 Empty e 2 File name drive name e 3 Time set value e 4 Program error location e 5 Parameter No e 6 Annunciator F No APPENDICES MELSEC Q Compatible CPU Setting Side Name Content Description Setting Timing e The common information corresponding to the error code SDO is stored There are the following four different stored information types 1 Module No SD6 Meaning Slot No Base No 1 2 Basic model QCPU High Performance model QCPU Process CPU V O No 3 Vacant 1 In the case of a multiple PLC system the slot No or PLC No is stored depending on the error that occurred Slot 0 in the multiple PLC system indicates the slot on the right of the right end CPU module Error For which is stored refer to the corresponding error SD10 A d common common code informati informati PLC No 1 1 PLC No 2 2 PLC No 3 3 at error When 255 is stored into SD5 it indicates that an occurrence SD11 instruction or like was executed for the module after the last mountable slot When OFFFFH is stored into SD6 I O No it indicates that the I O number cannot be identified e g I O No overlapping in the I O assignment parameter Therefore identify the error location using SD5 SD13 2 File name drive name Example Number Mearin
18. emergency stop Carring ADVANCE 0 X13 un X16 Fi step 5 SEET dE vu gt Carring ADVANCE endpoint roo aX13 Interlock such as emergency stop Clamp DOWN um o xo d step 6 RE Meas ase a Late Y22 4 Clamp DOWN endpoint aX17 Interlock such as emergency stop Headstock ADVANCE M2 X12 S step 7 SEET EE L vao gt v v SFC program Sequence program 1 GENERAL DESCRIPTION MELSEC Q 3 Ease of division editing of blocks and steps according to control object e A total of 320 blocks 1 can be created in a whole SFC program e Up to 512 steps 2 can be created in a single block e Up to 2k sequence steps of operation outputs transition conditions can be created in all blocks By dividing blocks and steps as shown below tact time can be shortened and debugging test operation can be performed easily e Blocks are divided properly according to the operation units of machines e Steps in each block are divided properly 320 blocks Block 0 Block 1 Block 319 Initial Operation output transition nei Initial step condition program step step J aX AE Step 1 oY20 oTO K20 Step 1 Step 1 2 or aTO 512 steps Step 2 f oY21 Step 2 Step 2 arr ee Val Operation output transition condition 2k sequence steps in all blocks 1 128 blocks for the Basic model QCPU 2 128 steps for the Basic model QCPU 1 GENERAL DESCRIPTION MELSEC Q 4 Creation of multiple initial steps
19. output of the made the coil output of the operation operation output is output is turned OFF and the block is turned OFF and the stopped block is stopped e The status remains active e The status becomes inactive e Immediately after a STOP request is made the block is stopped with the coil output of the operation output being held e The status remains active The held step indicates the step whose attribute has been set to the HOLD step SC SE ST and which is being held with the transition condition satisfied POINTS SM325 is turned ON OFF by the system according to the output mode setting at parameter block STOP when the CPU module switches from STOP to RUN Output Mode Setting at Parameter Block STOP SM325 However by turning ON OFF SM325 in the user program the output mode at block STOP can be changed independently of the parameter setting 4 SFC PROGRAM CONFIGURATION MELSEC Q Related Instructions 1 SFC information device e Block STOP RESTART bn See Section 4 5 3 2 SFC control instruction e Block STOP instruction PAUSE Bil mi See Section 4 4 7 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 5 5 Continuous transition bit The continuous transition bit specifies whether the operation output of the next step will be executed in the same scan or not when the transition condition is satisfied 1 There are two types of SFC program transition processing with continuous transitio
20. program lt More than one program can be set Initial execution SFC program cannot be set type program More than one program can be set Es Two SFC programs normal and program execution management can be set f Scan execution type program program Standby type Mia inaa aas Ces EO ONG E More than one program can be set More than one SFC program can be set for both normal and program execution management programs lt More than one program can be set SFC program cannot be set Low speed execution type program Fixed cycle execution type program The maximum number of program files changes depending on the CPU module type For details refer to the user s manual function explanation program fundamentals of the used CPU module Use the PSCAN or POFF instruction to switch the execution type of the program For details of the PSCAN and POFF instructions refer to the QCPU Q mode QnACPU Programming Manual Common Instructions 3 SPECIFICATIONS MELSEC Q 3 2 Device List 3 2 1 Device list of Basic model QCPU Table 3 3 indicates the devices that can be used for the transition conditions and operation outputs of an SFC program Table 3 3 Device List User Special relay SMO to SM1023 Internal system Fixed Special register SDO to SD1023 XO to XO7FF MO to M8191 LO to L2047 FO to F1023 Edge triggered Decimal Link relay BO to BO7FF 5
21. the previous transition condition being satisfied e After transition the operation of the operation output is continued put in HOLD status e When the transition condition is satisfied again transition is executed and the next step is reactivated e The operation of the operation output is executed at the reactivated next step and when the transition condition is satisfied transition occurs and the step is deactivated 1 GENERAL DESCRIPTION e Reset step Sn R Ext L sn R activated a designated step will become inactive E the reset step is MELSEC Q e When a HOLD status becomes unnecessary for machine control or on selective branching to a manual ladder occurs after an error detection etc a reset request can be designated for the HOLD step deactivating the step in question e Types of block START steps and their operations 1 Block START step with END check Bm H m 2 Block START step Without END check Bm Bm Bm E aX0 Transition condition is satisfied m to 0 e In the same manner as for a subroutine CALL RET a START source block transition will not occur until the end of the START destination block is reached e Convenient for starting the same block several times or to use several blocks together etc e A convenient way to return to the START source block and proceed to the next process block when a gi
22. thereby fixing the designation destination When block switching is executed by this BRSET instruction a word device can be used for indirect designation index modification etc 3 The effective operation range when block switching occurs by BRSET instruction varies according to the program being run at the time as shown below 1 When this instruction is executed in a sequence program target block switching is valid from instruction execution to SFC execution At the next scan the target block is block 0 as the default until the instruction is executed again 4 SFC PROGRAM CONFIGURATION MELSEC Q 2 If the BRSET instruction is executed at an SFC program block switching will be effective only for the step currently being executed Even if the step in question is the same step the BRSET instruction must be executed at each block where the Sn and TRn instructions are used Moreover within a single step block switching will be effective from the point where the BRSET instruction is executed to that step s processing END point When processing is repeated at the next scan following the processing END for that step the block in question will be designated as the current block until the point when the BRSET instruction is executed again Repeated Sequence program Sequence program SFC program A END O B END Block n Block n 1 Execution i i T T t Program Ss Se E SC Ss S3
23. 1 DK 2670 Greve Phone 40 0 21 201 1146 Phone 45 0 43 95 95 95 Fax 40 0 21 201 1148 Fax 45 0 43 95 9591 e mail sirius siriustrading ro e mail Ipia lpmail com ACP Autocomp a s SLOVAKIA UTU Elektrotehnika AS P rnu mnt 160i EE 10621 Tallinn Phone 372 0 6 51 72 80 Fax 372 0 6 51 72 88 e mail utu utu ee ESTONIA UTU POWEL OY Box 236 FIN 28101 Pori Phone 358 0 2 550 800 Fax 358 0 2 550 8841 e mail tehoelektroniikka urhotuominen fi FINLAND UTECO A B E E GREECE 5 Mavrogenous Str GR 18542 Piraeus Phone 302 0 10 42 10 050 Fax 302 0 10 42 12 033 e mail uteco uteco gr Meltrade Automatika Kft 55 Harmat St HU 1105 Budapest Phone 36 0 1 2605 602 Fax 36 0 1 2605 602 e mail office meltrade hu HUNGARY SIA POWEL Lienes iela 28 LV 1009 Riga Phone 371 784 2280 Fax 371 784 2281 e mail utu utu lv LATVIA Chalupkova 7 SK 81109 Bratislava Phone 421 02 5292 2254 Fax 421 02 5292 2248 e mail info acp autocomp sk Krasnij Prospekt 220 1 Office 312 RU 630049 Novosibirsk Phone 7 3832 10 66 18 Fax 7 3832 10 66 26 e mail elo elektrostyle ru ICOS RUSSIA Ryazanskij Prospekt 8A Office 100 RU 109428 Moscow Phone 7 095 232 0207 Fax 7 095 232 0327 e mail mail icos ru SMENA Polzunova 7 RU 630051 Novosibirsk Phone 7 095 416 4321 Fax 7 095 416 4321 e mail smena
24. 13 4 SFC PROGRAM CONFIGURATION 4 1 to 4 89 4 1 List of SFC Diagram Symbols cccceccecceseeeeeeeceeeeeeeaecaeceeeeaesaecaeseeeaeeaecaeseeesaesaeseeseaesaesaeseetaesaeseneeateaes 4 2 EE 4 4 4 2 1 Step _ without step attribute cc cscscscsssssseseseseescsescscscscscscscscscscscscscecscecececscseeseseseseseseaeaeess 4 4 E le pa lat ct te cel ct i tg cc cn AR ct th Nr cd 4 7 AD STUY Sty EE 4 8 4 24 Col HOLD stp SC E 4 8 4 2 5 Operation HOLD step without transition check SE 4 10 4 2 6 Operation HOLD step with transition check Ier 4 12 APT PRES EU STS Flake eae A E cut cme EE 4 14 4 2 8 Block START step with END check Eug cen Site OWN eae Rene OSG eae 4 15 4 2 9 Block START step without END check Ea engel dtseaticnetadtdescanecnediuaduentadaatewnn 4 17 GR EE EE 4 19 4 2 11 Instructions that cannot be used with operation outputs 0 eee eee eeeeeeeeeeeeeeeeeeaeeeaeeeeeeaeeeaeeeas 4 21 Ne ET le 4 22 43T Seral fansi Oeae aa a ae r eT rar aa aaa aa a aa ae aa aa E A taae Sa Ea Taaa ea AKTER E utana 4 23 Ce ein EE Te EE 4 25 Aso Parel transition x gege Ee eo een ee en eal ae en ae ee 4 28 4 3 4 Jump ranson seaca erani ieina a Teana Are Eken Eada ar A a aa NAA CEARA AA CNEA AEA RARA AN AAAA AENEAN O EURER TARASA 4 32 4 3 5 Precautions for creating operation output step transition condition programs s s 4 33 4 4 Controlling SFC Programs by Instructions SFC Control Instructions cecceceeseeeeeee
25. 24 instructions can be described for one operation output e The timer continues measurement while the step is active e The instruction which requires execution conditions cannot be created between FOR and NEXT instructions 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 Transition condition program a Transition condition program expression Transition condition programs can be used only for contact or contact equivalent instructions The transition condition program is expressed as the following ladder circuit ye TRAN is a dummy output Condition b Instructions used Instructions which can be used in a transition condition program are listed below CPU Module Type High instruction Instruction expression Function Basic model Pertormance Code P Model QCPU QEPY Process CPU Operation START N O contact Serial connection N O contact Parallel connection N O contact Operation START N C contact Serial connection N C contact Parallel connection N C contact Leading edge pulse operation START Leading edge pulse serial connection Leading edge pulse parallel connection Trailing edge pulse operation START Trailing edge pulse serial connection Trailing edge pulse parallel connection Operation results converted to leading MEP amp MEP edge pulse step memory Coupling MEF amp MEF Operation results converted to trailing edge pulse step memory Operation results converted to leading edge pulse memory
26. A coil output HOLD step cannot be restarted after being stopped as it becomes deactivated at that time b Depending on the ON OFF status of the block STOP time operation output flag SM325 the operations of the PLS instruction and D instruction after block STOP cancellation change e When SM325 is ON coil output held Not executed e When SM325 is OFF coil output OFF Executed again c When the block STOP RESTART bit of the SFC information devices has been set the block STOP RESTART bit also turns OFF Operation Error e Error No 4621 occurs when the specified block does not exist or when the SFC program is in the standby status Program Examples 1 Block 1 is stopped when X1 switches ON and is restarted when X2 switches ON axl ax2 a PAUSE BL1 ei PSTART BL1 Related Instructions 1 SFC information device e Block STOP RESTART Dit cece cess eens See Section 4 5 3 4 SFC PROGRAM CONFIGURATION MELSEC Q QCPU pe OCP PLC CPU Process CPU Basic High Performance SO SS x First five digits of serial No are 04122 or later 4 4 8 Step START and END instructions s r Internal Device i Data SFC Program System User CO Dier Type Sequence SS Sn Program Transition Itl Bi W Ste at won ele Device name Only step relay S can be used J s n m Du t n is a step No t nis a step No Usable Devices Programs Using Instruction
27. Max 252k steps u Number of files Scannable SFC program 2 files 1 normal SFC program and 1 program execution management SFC program 1 Number of blocks Max 320 blocks 0 to 319 Number of SFC steps Max 8192 steps for all blocks max 512 steps for one block Number of branches Max 32 Number of concurrently Max 1280 steps for all blocks 8 Max 256 steps for one block including HOLD steps Number of operation output Max 2k steps for all blocks sequence steps No restriction on one step Number of transition Maximum 2k steps in all blocks condition sequence steps 512 steps per transition condition Step transition watchdog timer function Provided 10 timers x1 Refer to Section 5 2 3 for the program execution management SFC program The STEP RUN operation and step trace functions are not available 3 SPECIFICATIONS MELSEC Q 2 Precautions for creating SFC program a The SFC programs that can be created are scan execution type program and standby type program b Two SFC programs one normal SFC program and one program execution management SFC program can be set as a scan execution type program c More than one SFC program can be set as a standby type program d The standby type SFC program is executed in the following procedure e The currently executed scan execution type program is switched to the standby type program e The standby type program to be executed is switched to the scan execution type
28. N BL constant o o e When a device name is indicated in the constant expansion SFC or the other column only that device may be used Example If K H is indicated in the constant column only a decimal K or hexadecimal H constant may be used Real number constants E and character string constants may not be used 3 The data type for the designated device is indicated here io Ti a EEA ETEA ATT Indicates a bit data operation SBIN TOi osonni Indicates 16 bit binary value processing 1 word used e BINDD aani Indicates 16 bit binary value processing 2 words used e Character string Indicates character Variable string processing number of words e Device Indicates device name and Variable first device processing number of words 4 The type of program which can be used with the instruction in question is indicated here 5 The request destination for the instruction in question is indicated here 4 SFC PROGRAM CONFIGURATION MELSEC Q QCPU PEG SPU Process CPU Basic High Performance LAr a ee a ee First five digits of serial No are 04122 or later 4 4 1 Step operation status check instructions a b amp a amp b la Ib Usable Devices Programs Using Instructions Execution Site F MELSECNET Internal Device J Special System User File pee SE Function Ind Constant E H LAL SE Se SFC Program BLm Sn g eer Condition Expansion SFC
29. Normal operation is performed until the transition condition is satisfied e When the transition condition is satisfied the end processing of the corresponding step is performed At the same time the transition destination step becomes active and the block stops immediately e Immediately after a STOP request is made the coil e Immediately after a STOP request is output of the made the coil output of the operation operation output is output is turned OFF and the block is turned OFF and the stopped block is stopped e The status remains active e The status becomes inactive e Immediately after a STOP request is made the block is stopped with the coil output of the operation output being held e The status remains active coil output held ON STOP after transition The held step indicates the step whose attribute has been set to the HOLD step SC SE ST and which is being held with the transition condition satisfied SM325 is turned ON OFF by the system according to the parameter setting when the CPU module switches from STOP to RUN Parameter Setting SM325 Turns OFF coil output OFF Remain ON coil output held By turning ON OFF SM325 in the user program the output mode at block STOP can be changed independently of the parameter setting 4 SFC PROGRAM CONFIGURATION MELSEC Q 3 The execution of the corresponding block is restarted from the step where it had stopped when the block STOP REST
30. below Continuous SM323 o ti eration Transition Bit E When the transition condition is satisfied the operation Without continuous ues a output of the transition destination step is executed in the transition next scan When the transition condition is satisfied the operation No settin output of the transition destination step is executed within 2 r the same scan With continuous Ss S Zug E When the transition conditions of the steps are satisfied continuously the operation outputs are executed within the same scan until the transition condition is not satisfied or the end step is reached S g When the transition condition is satisfied the operation Without continuous a SE S ON OFF output of the transition destination step is executed in the transition next scan When the transition condition is satisfied the operation output of the transition destination step is executed within gt the same scan With continuous ai D C ON OFF i iti When the transition conditions of the steps are satisfied ransition continuously the operation outputs are executed within the same scan until the transition condition is not satisfied or the end step is reached The tact time can be shortened by setting with continuous transition This resolves the problem of waiting time from when the transition condition is satisfied until the operation output of the transition destination step is executed However when with continu
31. cleared Make latch setting to hold the SFC information devices 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 7 2 Block 0 START condition The block 0 START condition is designed to set whether block 0 will be automatically activated or not at SFC program START when SM321 turns from OFF to ON Use the block 0 START condition when it is desired to specify the START block at SFC program START according to the product type etc Auto START ON is useful when block 0 is used as described below e Used as a control block e Used as a preprocessing block e Used as an always watched block 1 Settings and corresponding operations Set block 0 to Auto START ON or Auto START OFF At SFC program START and END step execution operations are performed as described below Settin Operation g At SFC Program START At end step execution in block 0 Autostart block 0 e Block 0 is automatically activated and is When the end step is reached the initial step default executed from its initial step is automatically activated again e Block 0 is activated by a START request resulting from an SFC control block START instruction or a block START step in the same manner as other blocks When the end step is reached block 0 is deactivated and waits for another START request to be issued again Do not autostart block 0 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 7 3 Output mode at block STOP The output mode at block STOP
32. devices whose statuses must be held in making a resume start e The held coil HOLD step becomes inactive and is not kept held In the Basic model QCPU the held coil HOLD step restarts in the held status However the output is not held To hold the output make latch setting for the devices desired to be held 3 Depending on the timing a resume start is disabled and an initial start may be made When it is desired to make a resume start securely turn SM321 from ON to OFF or switch the CPU module form RUN to STOP and then power the PLC OFF then ON The Basic model QCPU always makes an initial start 4 SFC PROGRAM CONFIGURATION MELSEC Q x4 A resume start may be made depending on the SFC program change If a resume start is made as is a start is made from the old step number leading to a malfunction of the mechanical system When any SFC program change SFC diagram correction such as step addition and deletion has been made make an initial start once and then return it to a resume start The Basic model QCPU always makes an initial start 1 When the PLC is powered OFF or the CPU module is reset the intelligent function module special function module is initialized When making a resume start create an initial program for the intelligent function module special function module in the block that is always active or in the sequence program 2 When the PLC is powered OFF or the CPU module is reset the devices not latched are
33. e A CPU module operation error BLOCK EXE ERROR e A block range can be occurs and CPU module operation is stopped designated for the STOP e All Y outputs switch OFF setting e CPU module operation continues and a WAIT status is established when the transition condition is satisfied The WAIT status continues until the START destination block is deactivated WAIT default e A step transition occurs when the START destination block is deactivated and that block is then reactivated e If a transition WAIT occurs the previous step is deactivated the output is switched OFF and the operation output will not be executed Block m E started by E START step HOLD step with transition check Transition to step Condition where block START satisfied is being made 1 When a START request is issued to the block that is already active by execution of the following the START request is ignored and the processing of the SFC program is continued as is e Block START instruction SET BLm of SFC control instructions e ON of Block START END bit of SFC information devices 2 In the Basic model QCPU the operation mode at block double START cannot be set The operation mode at block double START in the Basic model QCPU is the default WAIT mode 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 7 6 Operation mode at transition to active step double step START This mode setting designates the operation mode which
34. e Transition conditions a A j 3 6 not satisfied Presence Transition 2 7 Steps 2 6 APS Sonal conditions 2 3 5 6 steps 2 5 2 jiii Ne Steps 2 6 T Steps 2 6 e Transition conditions atep conditions 2 5 i 2 3 5 6 satisfied 6 6 4 Presence Transition 2to4 Steps 2 3 6 7 epee ee conditions 2 to 7 SE 3 SPECIFICATIONS MELSEC Q 3 4 Calculating the SFC Program Capacity In order to express the SFC diagram using instructions the memory capacity shown below is required The method for calculating the SFC program capacity and the number of steps when the SFC diagram is expressed by SFC dedicated instructions is described in this section 1 Method for calculating the SFC program capacity block 0 capacity block 1 capacity block n capacity Number of blocks being used block No 1 SFC program capacity 2 E ee Glealed SFC file header capacity SFC program START SFCP and END SFCPEND instructions HE operation output total for all steps Capacity of blocks 2 l exparessed by SFC dedicated instructions total number of transition conditions x As shown below Block START BLOCK BLm and END BEND instructions Number of steps where SFC diagram is expressed by SFC dedicated instructions Step LLH EB 3 sequence steps for step START STEP Sn and END SEND instructions e Transition conditions 1 For serial transition or selective b
35. e When transition condition b becomes satisfied at step n Step n operation output A operation output A execution operation output A will Transition condition b be deactivated and processing will proceed to step n 1 operation output B Step n 1 operation output B 1 A maximum of 512 1 serial transition steps TTT L can be described in each block Therefore a maximum of 512 serial transitions can be described However there is a restriction on the number of lines as indicated below depending on the SFC display column setting 1 128 for the Basic model QCPU When SFC display column When SFC display setting is 1 or 2 column setting is n Max of Max of ma _ 1536 lines 512 serial a5 L SIE Number transitions of lines Y Examples of the permissible number of lines E corresponding to a few SFC display column setting values are shown below The SFC dis 7 play column setting value can be designated on So freely within a 1 to 32 range Number of columns max of 32 SFC Display Col Number of Lines umn setting Possible EE 1336 EE SFC display column setting value n 384 192 138 108 96 4 SFC PROGRAM CONFIGURATION MELSEC Q 2 Serial transition operation flowchart Operation status Initial step L EE Initial step operation
36. in this manual This manual uses the following generic terms and abbreviations unless otherwise described Generic term abbreviation Description of generic term abbreviation QCPU Abbreviation of Basic model QCPU High Performance model QCPU process CPU QnCPU Abbreviation of Q02CPU QnHCPU Abbreviation of QQ2HCPU QO6HCPU Q12HCPU Q25HCPU QnPHCPU Abbreviation of Q12PHCPU Q25PHCPU oo EE Generic term of Q02CPU Q02HCPU QO6HCPU Q12HCPU Q25HCPU Process CPU Generic term of Q12PHCPU Q25PHCPU Basic model QCPU Generic term of QOOJCPU QOO0CPU Q01CPU 1 GENERAL DESCRIPTION MELSEC Q 1 GENERAL DESCRIPTION SFC an abbreviation for Sequential Function Chart is a control specification description format in which a sequence of control operations is split into a series of steps to enable a clear expression of the program execution sequence and execution conditions This manual describes the specifications functions instructions programming procedures etc used to perform programming with an SFC program using MELSAP L MELSAP L can be used with the following CPU modules e Basic model QCPU first five digits of serial No are 04122 or later e High Performance model QCPU e Process CPU e QnACPU MELSAP L conforms to the IEC Standard for SFC In this manual MELSAP LL is referred to as SFC program diagram 1 The following functions cannot be executed if a parameter that sets the high speed interru
37. instruction However the BRSET instruction cannot be used for the Basic model QCPU Block 0 is set when the block number is not specified for the Basic model QCPU Operation Error e When no specified step is present or the SFC program is in standby mode Error No 4631 4 SFC PROGRAM CONFIGURATION MELSEC Q Program Examples 1 When X1 switches ON the following program will select and start step 2 of block 1 which contains multiple initial steps Block 1 When step is designated by operation sol sO o output of block 1 S3 sa s me 5 2 a When step is designated by operation output of other than block 3 ax1 sBL1 S2 When step is designated by sequence program x1 RST pes 8 2 The following program deactivates held step 5 when step 10 is activated el SI s sio Je 4 SFC PROGRAM CONFIGURATION MELSEC Q QCPU PoC CPUC PEC GRU Process CPU ee High Performance 4 4 9 Forced transition EXECUTE amp CANCEL ee er Usable Devices Programs c Instructions Execution Site Internal Device i i i Expansion Data SFC E 7 System User i en eae Other Sequence Transition tated D I SFC Type Block Step La 4 TRn Program Condition Word planation Condition Device name C rO TRn n is the transition condition No n is the transition condition No sO Lm TRn r BLm TRn m is the block No t m is the b
38. memory Scan execution is enabled for two SFC programs one SFC program for program execution management and one normal SFC program Multiple programs are executed in the order of the program setting in the PLC parameter dialog box The execution status of multiple programs is shown below under the following conditions Condition 1 Program setting in PLC parameter dialog box 1 ABC sequence lt scan gt 2 DEF SFC lt scan gt 3 XYZ sequence lt low speed gt 2 Low speed program time setting in parameter 5ms 3 SFC program Set to Auto START ON Program execution STOP RUN Power ON gt RUN H t t t END eg i T processing i 1 1 1 1 H 1 1 i H i i to oA as Program 0 Scan END i N Scan END 0 Scan END i o Scan ABC i i Kn i F E A pice Se Scan i i i Scan 1 i Scan i i i Program 1 f 1 1 f 1 DEF SFC program i i SFC program r SFC program K d execution iLow execution Low execution vei E 1 H D Li 1 1 speed speed Speed Program E KEE yspeed XYZ 1 Li L Scan time Refer to Section 6 1 for the SFC program start stop method 5 SFC PROGRAM PROCESSING SEQUENCE MELSEC Q 5 3 2 Block execution sequence 1 In the SFC program the step in the active block is executed every scan 2 When there are multiple blocks the blocks are processed in order of lower to higher block numbers a In the active block the active step in that block is executed b The inactive blo
39. mode bit Jas r Number of active steps register oo c Continuous transition bit M 4 Cancel POINTS The following cannot be specified for the SFC information devices e Indirect designation e Digit designation K e Index qualification Z e Word device bit designation 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 5 1 Block START END bit The block START END bit is used to confirm the active status of the specified block by a sequence program or the test operation of the peripheral device It can also be used as a device to forcibly start or forcibly end the specified block 1 Operation of block START END bit a The block START END bit turns ON when the corresponding block starts The block START END bit remains ON while the corresponding block is active b The block START END bit turns OFF when the corresponding block becomes inactive The block START END bit remains OFF while the corresponding block is inactive Block 0 Block 1 SO S0 Block START END bit of block 1 MO to T to 1 S1 l S1 1 2 D ti S2 B1 S2 Dr 2 t2 2 When the corresponding block is inactive it can be started independently by forcibly turning ON the block START END bit While the corresponding block is active the processing of the corresponding block can be forcibly ended by forcibly turning OFF the block START END bit The block START END bit can also be turned ON OFF in the test mode of the peripheral device
40. only during preset time e Programs such as a subroutine program and interrupt Max 124 programs program changes depending on the e Started by the program START instruction for execution _ CPU module type Stand by type program waiting Fixed cycle execution type program e Program executed in a fixed cycle Fixed cycle x Cannot be set 1 When the SFC program set as a standby type program is to be started the SFC program in execution must be switched to a standby type program before it is started Refer to Section 5 2 2 for the method of switching between the scan execution type program and standby type program 2 Specify the execution type of each program file in Program setting of the PLC parameter dialog box 5 SFC PROGRAM PROCESSING SEQUENCE MELSEC Q 5 2 2 Execution type designation by instructions The execution designation by instruction function enables the execution type set in the program setting of the PLC parameter dialog box to be changed by the instruction Execution designation by instruction will be explained 1 Instructions and corresponding operations SFC oe Compatibility PSTOP e Switches the program of the specified file name to a standby status beginning in the next scan e Executes the end processing of all blocks in the next scan in the SFC program of the POFF specified file name and switches the program to a standby status in the second scan after execution of the instr
41. program execution b Turn ON SM321 to start the SFC program 3 Start and stop using the PSCAN POFF instruction except the Basic model QCPU SM321 turns ON when an Auto START is made using the PLC parameter a When the POFF instruction is executed the SFC program in execution turns off the output and then stops The execution type changes to the standby type b When the PSCAN instruction is executed the standby type SFC program can be started However when the SFC program has not been set to the scan execution type SM321 is OFF in the program setting of the PLC parameter dialog box the SFC program is started by turning ON Sm321 The execution type changes to the scan execution type 6 SFC PROGRAM EXECUTION MELSEC Q 6 1 1 SFC program resumptive START procedure The SFC program START format can be designated as initial START or resumptive START The resumptive START setting procedure as well as some precautions regarding the resumptive START format are described below 1 Resumptive START setting procedure Make the resume START setting of the SFC program in the SFC program start mode of the SFC setting in the PLC parameter dialog box 2 Block operation status resulting from SFC program START mode setting At an SFC program start whether an initial start or resume start will be made is determined by the combination of the setting of the SFC program start mode in the PLC parameter
42. steps 256 steps Process CPU 4 Couplings must be provided when the parallel transition format is used Program creation is impossible without couplings Example Program without couplings Cannot be designated Jump END step Each column ends a at the END step Jump transition see Section 4 3 4 occurs without coupling 4 SFC PROGRAM CONFIGURATION MELSEC Q 5 As arule a waiting step must be created prior to the coupling However in cases such as the example below where each of the parallel transition columns consist of only 1 step program without a transition condition between the parallel transition branch and the coupling a waiting step is not required 4 SFC PROGRAM CONFIGURATION 6 Parallel transition operation flowchart Jinta step Transition condition a K Step 1 Transition T condition b Step 2 TI Transition T condition o Waiting step Step 3 _ _ Transition T condition a Waiting step Step 4 TI Transition Waiting step Transition aa _ Transition Step 5 condition f condition g Parallel processing Operation status Initial step operation output executed Transition condition isfied YES T condition e y iti Initial step operation output deactivated Kal Step 1 operation output executed
43. steps per transition condition x1 SFC program for program management Section 5 2 3 cannot be created REMARK The step transition watchdog timer STEP RUN operation and step trace functions are not available Number of concurrently active steps 3 SPECIFICATIONS MELSEC Q 2 Precautions for creating SFC program a Only one SFC program can be created The created SFC program is a scan execution type program b The Basic model QCPU allows creation of a total of two program files one SFC program and one sequence program Two sequence programs or two SFC programs cannot be created Scan execution type program Sequence program MAIN QPG SFC program MAIN SFC QPG c The created sequence program and SFC program have the following file names The file names cannot be changed e Sequence program MAIN QPG e SFC program MAIN SFC QPG d The SFC program and sequence program are processed in order of sequence program and SFC program The processing order of the SFC program and sequence program cannot be changed 3 SPECIFICATIONS MELSEC Q 3 1 2 Performance specifications of High Performance model QCPU and Process CPU 1 Table 3 2 indicates the performance specifications related to SFC programs Table 3 2 Performance Specifications Related to SFC Programs Q02CPU QO2HCPU QO6HCPU Q12HCPU Q25HCPU OOO o Ft PHOPU Q25PHCPU a Max 28k steps Max 60k steps Max 124k steps
44. still occur but the START destination block will remain active and processing will continue To stop the START destination block at the same time the START destination s block STOP RESTART bit must also be switched OFF 2 When a block is stopped by switching the block STOP RESTART bit ON the STOP timing will be as shown below Operation Setting of Operation Status of Held step M Output Mode at Output at STOP time Active step other than held step Operation HOLD Operation HOLD Coil HOLD step SC step without step with transition transition check SE check ST Block Stop in Block Stop Mode Bit including HOLD step whose transition condition PLC Parameter SM325 is not satisfied OFF or mo e Immediately after a STOP request is made setting the coil output of the operation output is turned immediate OFF and the block is stopped e Turns OFF e The status remains active coil output e Normal operation is performed until the OFF transition condition is satisfied e Remains ON e When the transition condition is satisfied the coil output STOP after end processing of the corresponding step is held transition performed At the same time the transition destination step becomes active and the block stops immediately OFF or mo e Immediately after a STOP request is made setting the block is stopped with the coil output of the immediate operation output being held stop e The status remains active e
45. stop is cleared The operation after a start is performed according to the setting of block 0 START condition b Resume start The program is started with the active status at a previous stop ON to OFF of SM321 or RUN to STOP of CPU module held The SFC program start mode changes depending on the combination of the setting of the SFC program start mode in the PLC parameter dialog box and the ON OFF status of the special relay for setting SFC program start status SM322 as indicated below SFC Program Start Mode SM322 ON SM322 OFF SM322 ON ee When changed by Initial status 1 When changed by user user PEE Gone sane ese is turned from OFF to ON Resume nei IPLC power is switched OFF thenON power is switched OFF then ON Resume Initial x3 mitia PLC power is switched OFF then ON R 2 R zk Reset operation io Dt Reset operation to RUN after SM321 ON R x zk STOP to RUN Resume STOP to program write to RUN Initial Resume 4 Initial Initial start Resume Resume start 1 SM322 is turned ON OFF by the system according to the setting of the SFC program start mode in the PLC parameter dialog box when the CPU module switches from STOP to RUN e At initial start setting OFF e At resume start setting ON x2 Operation at resume start At a resume start the SFC program stop position is held but the status of each device used for the operation output is not held Therefore make latch setting for the
46. stored Specified device D 1 1 7 Number of steps 2 The number of active steps applies to the following steps e Normal active steps e Coil HOLD steps e Operation HOLD steps without transition check e Operation HOLD steps with transition check e Stopping steps e Step double START waiting steps 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 6 Step Transition Watch dog Timer The step transition watch dog timers are timers that measure the time from the point when the relevant step is placed in the execution status until the point when a transition to the next step occurs If a transition from the relevant step to the next step fails to occur within the designated time period the preset annunciator F will be turned ON 1 When using the step transition watchdog timer set the set time and the device number of annunciator F that will turn ON at time out to the special register for step transition watchdog timer setting SD90 to SD99 The step transition watchdog timer starts timing when the special relay for step transition watchdog timer start SM90 to SM99 is turned ON in the operation output of the step that performs a time check When any corresponding one of SM90 to SM99 is turned OFF during timing the step transition watchdog timer stops timing and is reset 2 There are 10 step transition watchdog timers watchdog timer 1 to watchdog timer 10 in the whole SFC program The special relay for step transition w
47. the OFF condition in above 3 is satisfied c Counter If the count input condition turns ON OFF after a transition to the next step the counter does not start counting d Timer When a step transition occurs after the transition condition is satisfied with the coil of the timer ON the timer stops timing and holds the then present value 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 2 5 Operation HOLD step without transition check An operation HOLD step without transition check is a step where the operation output processing of the corresponding step continues after a transition to the next step However transition processing to the next step is not executed if the transition condition is satisfied again at the corresponding step 1 During normal SFC program operation the coil ON status switched ON by OUT instruction when transition condition is satisfied is automatically switched OFF before proceeding to the next step When an operation output step is designated as an operation HOLD step without transition check the corresponding step will remain active after a transition to the next step and operation output processing will continue After a transition therefore the timer continues timing 2 The transition conditions have been satisfied so no transition condition check is performed after the next step becomes active Therefore no step transition subsequent transition will occur even if the transition conditions f
48. the SFC program is in a wait state Sdt edd d Error No 4631 Program Examples 1 When X1 switches ON the following program executes a forced transition at transition condition 1 of block 1 The forced transition setting is canceled when X2 switches ON When step is designated by operation When step is designated by operation output of block 1 output of other than block 1 EK rBL1 TR1 axi ax2 axi STR1 TR1 sBL1 TR1 When step is designated by sequence program set Tam E x2 klj per Benn 4 SFC PROGRAM CONFIGURATION MELSEC Q QCPU Po CPU geg High Performance 4 4 10 Active step change instruction SCHG Usable Devices Programs Fe Instructions Execution Site Internal Devi i ternal Device j l Data SFC E A System User k a a Expansion Sequence Transition PAINEA r Constant Other Type Block Step S hd SFC Program Condition Bit Word wer p EE s Condition O ee et Function 1 Deactivates the step that executed an instruction and forcibly activates the specified step set with the device designated by in the same block 2 When the destination step is already active the step that executed the SCHG instruction is deactivated and the destination step continues processing as is 3 The step where this instruction is executed is deactivated when processing proceeds to the transition condition status check following the completi
49. the block stops immediately e Immediately after a STOP request is made OFF the block is stopped with f 4 No setting the coil output of the coil output coil output immediate operation output being held held held stop e The status remains active e Normal operation is performed until the transition condition is the block is stopped with the coil output of satisfied the operation output being held e When the transition i Seed SE e The status remains active ON condition is satisfied the end processing of the STOP after corresponding step is transition performed At the same time the transition destination step becomes active and the block stops immediately zs The held step indicates the step whose attribute has been set to the HOLD step SC SE ST and which is being held with the transition condition satisfied e Immediately after a STOP request is made 6 7 6 7 6 SFC PROGRAM EXECUTION MELSEC Q SM325 is turned ON OFF by the system according to the parameter setting when the CPU module switches from STOP to RUN Parameter Setting SM325 Turns OFF coil output OFF OFF Remains ON coil output held By turning ON OFF SM325 in the user program the output mode at block STOP can be changed independently of the parameter setting 6 SFC PROGRAM EXECUTION MELSEC Q 6 3 2 Restarting a stopped block The methods for restarting a block which has been temporarily stopped during S
50. timer starts timing b If transition condition a is not satisfied within the set time 10s after SM90 has turned ON annunciator F1 turns ON However the SFC program continues operation c When transition condition a is satisfied within the set time and SM90 turns OFF the step transition watchdog timer stops timing and is reset 5 If the annunciators FO to F255 turn ON the number of detected annunciators that turned ON and the annunciator numbers are not stored into SD62 SD63 and SD64 SD79 6 The step transition watchdog timers of the same number can be used at different steps if they do not become active simultaneously Example t4 S5 Watchdog timer 1 As there is no chance that steps 5 and 6 will be S concurrently active the same watch dog timer can be S6 Watchdog timer 2 used at both steps 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 7 SFC Operation Mode Setting The SFC operation mode setting is used to designate SFC program START conditions or to designate the processing method at a double START Some settings can be made in SFC setting of PLC parameter dialog box in the system common setting and the others can be made in block parameter of the SFC program The SFC operation mode setting items and the resulting operations are shown below Default High Performance Item Description Setting Range Model QCPU Value Process CPU e Designates an Initial start or Initial Resume start when the SFC
51. turn SM321 from ON OFF or switch the CPU module from RUN STOP and then power the PLC OFF then ON Note that the Basic model QCPU always makes an initial start SM321 is turned from OFF Resume ON PLC power is switched OFF K then ON Resume lnitial 3 wn PLC power is switched OFF then ON after SM321 ON Initial Initial Resume 2 Resume 2 OFF or RUN STOP 6 SFC PROGRAM EXECUTION MELSEC Q 4 A resume start may be made depending on the SFC program change If a resume start is made as is a start is made from the old step number leading to a malfunction of the mechanical system When any SFC program change SFC diagram correction such as step addition and deletion has been made make an initial start once and then return it to a resume start Note that the Basic model QCPU always makes an initial start POINTS 1 When the PLC is powered OFF or the CPU module is reset the intelligent function module special function module is initialized When making a resume start create an initial program for the intelligent function module special function module in the block that is always active or in the sequence program 2 When the PLC is powered OFF or the CPU module is reset the devices not latched are cleared Make latch setting to hold the SFC information devices 6 SFC PROGRAM EXECUTION MELSEC Q 6 2 Block START and END 6 2 1 Block START methods The block S
52. with the step immediately after coupling being active can be selected between STOP WAIT and TRANSFER in the Operation mode at transition to active step double step START refer to Section 4 7 6 in the block parameter setting of the SFC setting dialog box in the Tools menu The Basic model QCPU does not allow the operation mode to be selected It operates in the default TRANSFER mode 3 The operation of the initial steps with step attributes is the same as that of the other steps Refer to Section 4 2 4 to Section 4 2 7 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 2 3 Dummy step X A dummy step is a waiting step etc which contains no operation output program 1 The transition condition following the corresponding step is always checked during execution of a dummy step and execution proceeds to the next step when the transition condition is satisfied 2 The dummy step changes to a step without step attribute indication Th when an operation output program is created 4 2 4 Coil HOLD step A coil HOLD step is a step where the coil output status is maintained in the transition to the next step The coil output is switched ON by the OUT instruction when the transition condition is satisfied 1 During normal SFC program operation the coil ON status switched ON by OUT instruction when transition condition is satisfied is automatically switched OFF before proceeding to th
53. 38 to E 3 40282 38 ae Character strin aciz SE constant 3 SPECIFICATIONS MELSEC Q 3 3 Processing Time for SFC Program The time required to process the SFC program is discussed below 1 Method for calculating the SFC program processing time Calculate the SFC program processing time with the following expression SFC program processing time A B C a A Processing time of operation outputs in all blocks Indicates the total sum of the processing times of the instructions used for the operation outputs of all steps that are active For the processing times of the instructions refer to the QCPU Q mode QnACPU Programming Manual Common Instructions b B Processing time of all transition conditions Indicates the total sum of the processing times of the instructions used for the transition conditions associated with all steps that are active For the processing times of the instructions refer to the QCPU Q mode QnACPU Programming Manual Common Instructions c C SFC system processing time Calculate the SFC system processing time with the following expression SFC system processing time a b c d e f g Calculation of Processing Time Unit us Te block Active block processing time active block processing time coefficient lt number of active blocks processing e Active block processing time System processing time required to execute active blocks time e N
54. 4621 will occur during SFC program execution and the CPU module will stop the execution 2 Execution procedure The program is started automatically when registered as a scan execution type program At end step processing the initial step is reactivated and processing is repeated 1 Use the peripheral device to select between the SFC program for program execution management and the normal SFC program For details regarding the setting procedure refer to the GX Developer Operating Manual MELSAP L 2 Periodic execution block settings see Section 4 7 4 cannot be defined the SFC programs for program execution control If a SFC program for program execution control is set in a periodic execution block the execution of the SFC program will not be performed 3 The Basic mode QCPU cannot use the SFC program for program execution management 5 SFC PROGRAM PROCESSING SEQUENCE MELSEC Q 3 Example of program execution management SFC programs In the following example SFC program ABC is executed when condition 1 is satisfied and SFC program XYZ is executed when condition 2 is satisfied tO Condition 1 When condition 1 is satisfied execution proceeds to S1 t1 Condition 2 When condition 2 is satisfied execution proceeds to S2 S1 POFF XYZ SFC program XYZ is changed into a standby type program S2 POFF ABC SFC program ABC is changed into a standby type program t2 PCHK XYZ am
55. 6 SFC PROGRAM EXECUTION MELSEC Q 2 Block STOP timing and coil output status when STOP occurs The STOP timing in response to a block STOP request and the coil output status during the STOP are as shown below Operation Setting of Output Operation Active step other than held Held step Mode at Block Output at Status of STOP step Operation Operation StopinPLC Block Stop me Mode Bit including HOLD step Got HOLD step GE HOLD step Parameter SM325 whose transition condition SC ci with transition check ST is not satisfied e Immediately after a STOP request is made OFF the coil output of the e No setting operation output is immediate turned OFF and the e Immediately stop block is stopped after a STOP e The status remains request is active SE made the coil f e Turns OFF e Normal operation is KE e Immediately after a STOP output of the coil output performed until the y request is made the coil OFF OFF transition condition is operation coil output satisfied output is Pemas ON OFF e When the transition turned OFF coil output condition is satisfied the and the block j l held e ON end processing of the EE e The status remains active STOP after corresponding step is transition performed ine stalls At the same time the output of the operation output is turned OFF and the block is stopped becomes transition destination inactive step becomes active and
56. 7 S6 S5 S4 S3 S2 S1 S0 S12 S11 S10 S9 S8 S7 Information of block 4 Information of block 3 6 In the activation step batch read instruction do not specify a nonexistent block step An error will not occur if a nonexistent block step is specified However the read data are undefined Operation Error e When the step relay S range is evceeced Error No 4101 4 SFC PROGRAM CONFIGURATION MELSEC Q Program Examples 1 The following program reads the active step status of 48 steps 3 words starting from step 0 of block 3 to DO D2 when XO turns ON When step is designated by operation output of block 3 aX0 BMOVP K4S0 DO K3 When step is designated by operation output of other than block 3 aX0 BMOVP BL3 SO DO K3 When step is designated by sequence program puovp BLa so Do K3 b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 bi b0 DO S15 S14 S13 S12 S11 S10 S9 S8 S7 S6 S5 S4 S3 S2 S1 SO D1 Step Nos S31 S30 S29 S28 S27 S26 S25 S24 S23 S22 S21 S20 S19 S18 S17 S16 D2 S47 S46 S45 S44 S43 S42 S41 S40 S39 S38 S37 S36 S35 S34 S33 S32 Related Instructions 1 SFC control instructions e Block switching instruction DPRGET See Section 4 4 11 e Step operation status check instruction a b amp a amp b la Di See Section 4 4 1 e Active step batch readout instruction MOV DMOV
57. 948 e mail industrial sp mee com MITSUBISHI ELECTRIC UK EUROPE B V UK Branch Travellers Lane GB Hatfield Herts AL10 8 XB Phone 44 0 1707 27 61 00 Fax 44 0 1707 27 86 95 e mail automation meuk mee com MITSUBISHI ELECTRIC JAPAN CORPORATION Office Tower Z 14 F 8 12 1 chome Harumi Chuo Ku Tokyo 104 6212 Phone 81 3 622 160 60 Fax 81 3 622 160 75 MITSUBISHI ELECTRIC USA AUTOMATION 500 Corporate Woods Parkway Vernon Hills IL 60061 Phone 1 847 478 21 00 Fax 1 847 478 22 83 GEVA AUSTRIA UAB UTU POWEL LITHUANIA CSC Automation UKRAINE Wiener Stra e 89 Savanoriu Pr 187 15 M Raskova St FI 10 Off 1010 AT 2500 Baden LT 2053 Vilnius UA 02002 Kiev Phone 43 0 2252 85 55 20 Phone 370 0 52323 101 Phone 380 0 44 238 83 16 Fax 43 0 2252 488 60 Fax 370 0 52322 980 Fax 380 0 44 238 83 17 e mail office geva at e mail powel utu lt e mail csc a csc a kiev ua TEHNIKON BELARUS Intehsis Srl MOLDOVA Oktjabrskaya 16 5 Ap 704 Cuza Voda 36 1 81 BY 220030 Minsk MD 2061 Chisinau EURASIAN REPRESENTATIVE Phone 375 0 17 2104626 Phone 373 0 2 562 263 Fax 375 0 17 2275830 Fax 373 0 2 562 263 CONSYS RUSSIA e mail tehnikon belsonet net e mail intehsis mdl net Promyshlennaya St 42 Getronics b v BELGIUM Getronics b v NETHERLANDS RU 198099 St Petersburg Control Systems Control Systems Phone 7 812 325 36 53 Pontbeekl
58. ART bit is turned OFF in the sequence program SFC program or peripheral device An operation HOLD status step with transition check or without transition check which has been stopped will be restarted with the operation HOLD status in effect A coil output HOLD step cannot be restarted after being stopped as it is deactivated at that time 4 When a block STOP is canceled the PLS or P instruction is executed When the special relay for operation output selection at block STOP SM325 is turned ON the PLS or P instruction is not executed if a block STOP is canceled 5 When the SFC control block STOP instruction PAUSE BLm is executed the block in question is stopped and the block STOP RESTART bit switches ON When the block RESTART instruction RSTART BLm is executed while the block is stopped the block in question is restarted and the block STOP RESTART bit switches OFF POINTS 1 Stopping of program processing by a block STOP RESTART bit being switched ON or by a block STOP instruction applies only to the specified block 2 Even if a block stop is executed for the START destination block the START source block will not be stopped 3 Even if a block stop is executed for the START source block the START destination block will not be stopped Related Instructions 1 SFC information device e Block STOP mode bn See Section 4 5 4 2 SFC control instructions e Block STOP instruction PAUS
59. Active S2 Is Active b When multiple initial steps exist an initial step selection START will occur when a given step is specified and activated c When designating a step located in a parallel branch all the parallel steps should be activated An inactive parallel branch ladder at such a time will prevent the parallel coupling condition from being satisfied d If a specified step is already active when this instruction is executed the instruction will be ignored equivalent to the NOP instruction and processing will continue To hold a specified step with the HOLD step see Transition to HOLD step by double START in Section 4 7 6 e When the operation output is used to start the step do not specify the current step number as the specified step number If the current step is designated as the specified step number normal operation will not be performed soll cX S2 f Specify the step as described below 1 In the case of SFC program e Use Sn when specifying the step in the current block e Use BLm Sn when specifying the step in another block 2 In the case of sequence program e Use BLm Sn when executing the step START instruction in the sequence program e When the block number is not specified specify the block number with the BRSET instruction However the BRSET instruction cannot be used for the Basic model QCPU Block 0 is set when the block number is not specified for the Basic model QCPU
60. Art no 160271 01 03 2003 SH NA 080076 Version D A MITSUBISHI ELECTRIC MELSEC System Q Programmable Logic Controllers Programming Manual MELSAP L QCPU A MITSUBISHI ELECTRIC INDUSTRIAL AUTOMATION e SAFETY CAUTIONS e You must read these cautions before using the product When using the Mitsubishi Programmable Controller MELSEC Q Series thoroughly read the manual associated with the product and the related manuals introduced in the associated manual Also pay due attention to safety and handle the module properly Store carefully the manual associated with the product in a place where it is accessible for reference whenever necessary and forward a copy of the manual to the end user REVISIONS The manual number is given on the bottom left of the back cover May 2001 SH NA 080076 B Barial correction Chapter 1 Section 3 1 Section 5 1 1 Section 5 2 4 Appendix 1 2 Appendix 2 Apr 2002 SH NA 080076 C Barial correction Chapter 1 Chapter 2 Section 3 1 Section 5 1 Section 5 1 2 Section 5 2 4 Appendix 1 2 Mar 2003 SH NA 080076 D Addition of use of MELSAP L to Basic model QCPU first five digits of serial No are 04122 or later Overall reexamination Japanese Manual Version SH 080072 E This manual confers no industrial property rights or any rights of any other kind nor does it confer any patent licenses Mitsubishi Electric Corporation cannot be held responsible for any
61. C diagram as SFC dedicated instructions Ladder Expression Number of Steps Description Required Number of Steps SFCP START Indicates the SFC program instruction SFGF START 1 per program SFCP END instruction SFCPEND 1 de ihe SEC program 1 per program GE BLOCK BLm 1 Indicates the block START 1 per block instruction Block END instruction BEND 1 Indicates the block END 1 per block Indicates the step START tep START STEP Si 2 DI 1 varies according to fe per step instruction i step attribute Indicates the transition Mansion START RANT iR Be STARTE vanas 1 per transition condition instruction according to the step attribute Coupling check TAND Si 2 Coupling completed check Number of parallel couplings 1 instruction occurs at parallel coupling per parallel coupling For serial transitions and selection AS e S transitions 1 per transition condition Transition designation TSET Si 2 Designates the transition for parallel branching transitions the instruction Step END instruction SEND destination step Indicates the step transition number of steps is the same as the number of parallel couplings 1 per step END 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 SFC PROGRAM CONFIGURATION This chapter explains the SFC program symbols SFC control instructions and SFC information devices that comprise an SFC program 1 A
62. E BLm and block RESTART instruction RSTART BLM riain ananin See Section 4 4 7 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 5 4 Block STOP mode bit The block STOP mode bit setting determines when the specified block is stopped after the block STOP RESTART bit switches ON or after a stop designation by the block STOP instruction PAUSE BLm 1 The stop timing for a block where a STOP request has occurred varies according to the ON OFF setting of the block STOP mode bit as shown below e The block is stopped immediately when the block STOP RESTART bit switches from OFF to ON or when a block STOP instruction is executed However if the block STOP RESTART bit is switched ON within the current block the STOP will occur when that block is processed at the next scan or when the instruction is executed e The block is stopped at the step transition which occurs when the transition condition for the current step active step is satisfied However the operation output will not be executed for the step following the transition e When multiple steps are active in a parallel branch the STOP will occur sequentially at each of the steps as their transition conditions are satisfied However the held step stops immediately after a STOP request independently of the block STOP mode 2 When the corresponding block is stopped the stop timing is as described below Setting of Operation Operation Output Mode at Output at SE s Active
63. ER SR 33 E9 END processing 2 END processing E9 28 der BS not performed E NOt performed oO EH Sn TRn destination gt gt bei block Block specified Block specified Block specified Block specified Block 0 by instruction by instruction Current block hy instruction Current block by instruction D 1 scan The block No m designated by BLm Sn or BLm TRn becomes valid regardless of whether this instruction is executed or not A y x When multiple steps are active at parallel branch etc only the step where the instruction was executed will be valid When it is desired to designate blocks at multiple steps the instruction must be executed at each step Operation Error e Error No 4621 occurs when the specified block does not exist or when the SFC program is in the standby status Program Examples 1 When X1 switches ON the following program switches the Sn or TRn block number to the block number stored at the DO data register MOV Kn DO axi BRSET DO 2 When X2 switches ON the following program switches the Sn or TRn block number according to the constant at the Z1 index register aX2 BRSET K0Z1 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 5 SFC Information Devices This section explains the SFC information devices set in each block Table 4 2 indicates the SFC information device types and usable devices Table 4 3 SFC Information Device List CPU Module Type SFC I
64. FC program processing are described below 1 Restarting block processing The methods for restarting a block which has been temporarily stopped are shown below Restart Method Operation Description e Processing of the specified block is restarted by an SFC control instruction at a step operation output or sequence program outside the e Convenient for returning to automatic operation stopped block when the manual control END signal is output Condition RSTART BLm Restart by SFC control instruction at the temporary STOP x m is the block No e The execution of the corresponding block is e Convenient for confirming operation by step restarted by forcibly turning ON the block control at debugging and test operations RESTART by SFC STOP RESTART bit which was set to each because block processing can be restarted information device block as the SFC information device in the from a peripheral device without requiring a program or peripheral device program 2 Active step when restart occurs The step which is active when a block is restarted varies according to the status which existed when the STOP occurred as shown below Operation Output at Block RESTART Active step other than Held step held step including HOLD step Operation HOLD step Operation HOLD step whose transition Coil HOLD step SC without transition with transition check condition is not check SE ST satisfied Output Mo
65. L127 Decimal J1 to J239 J254 QOOJCPU UO to UOF QOOCPU Q01CPU Hexadecimal EE CN to U03F Decimal constant constant K K 2147483648 to K2147483647 CY to K2147483647 Hexadecimal HO to HEFFFFFFF constant Real number E 1 17550 38 to E 3 40282 38 constant Character strin e SS constant 1 Can be used for the QOOCPU and QO1CPU only 3 SPECIFICATIONS MELSEC Q 3 2 2 Device list of High Performance model QCPU and Process CPU Table 3 4 indicates the devices that can be used for the transition conditions and operation outputs of SFC programs Table 3 4 Device List User Classification Device Type Expression Assignment Remarks Special relay SMO to SM2047 Decimal Internal system Fixed Special register SDO to SD2047 Decimal e Direct processing at DX Direct processing at DY Internal relay d I in ay Edge triggered elay Hexadecimal Hexadecimal lt x lt O O lt Pa CH CH 0 0 T T T T MO to M8191 Decimal Decimal Decimal Decimal Hexadecimal Variable t i Link relay Pare ag DO to D12287 Word Link register WO to WO1FFF TO to T2047 Retentive timer Bit STO to ST2047 word Special link relay SBO to SBO7FF Special link register SWO to SWO7FF Decimal within a total of 28 75k words Internal user Hexadecimal e Set retentive timers ST in parameter Decimal e Contact and coil are bit devices d e C
66. PU module is reset b SM325 1 SM325 is turned ON OFF by the system according to the parameter setting when the CPU module switches from STOP to RUN Parameter Setting SM325 Turns OFF coil output OFF Remain ON coil output held 2 By turning ON OFF SM325 during SFC program operation the setting of the output mode at block STOP can be changed During SFC program operation the output mode at block STOP in the PLC parameter dialog box is ignored 4 84 4 84 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 7 4 Periodic execution block setting The periodic execution block setting designates the execution of a given block at specified time intervals rather than at each scan 1 Setting items Designate the first block number and the time of execution for the periodic execution blocks When these settings are designated the first block and all subsequent blocks will become periodic execution blocks The execution time interval setting can be designated in 1 ms units within a 1 to 65535 ms range 2 Periodic execution block operation method Periodic execution block operation occurs as shown below 1 scan 1 scan 1 scan Execution interval Execution interval 2 3 END processing 4 Periodic execution blocks 1 Until the specified time interval elapses only the sequence programs and blocks designated for execution at each scan will be executed 2 When the specified time interval elapses th
67. Program Kee Sequence 9 Block Ste Transition H Condition amp Only step relay S can be used When step in current block is specified When step in another block is specified When step is specified in sequence program When expressed in a circuit When expressed in a circuit Sn BLm Sn Re aBLm Sn Stee tH H BLm Sn bBLm Sn F bBLm Sn BLm Sn amp aBLm Sn ER amp aBLm Sn rid BLm Sn CA k amp bSn amp bBLmisn 36 bBLm Sn k k amp aSn aBLm Sn F aBLm sn BLm Sn bBLm Sn m is a block No nis a step No and is a contact bBLm Sn Functions 1 Checks a specified step in a specified block to determine if the step is active or inactive 2 The contact status changes as described below depending on whether the specified step is inactive or active 4 SFC PROGRAM CONFIGURATION MELSEC Q 3 Specify the step as described below a In the case of SFC program 1 Use Sn when specifying the step in the current block 2 Use BLm Sn when specifying the step in another block in the SFC program b In the case of sequence program 1 Use BLm Sn when executing the step activation check instruction 2 When the block number is not specified specify the block number with the BRSET instruction However the BRSET instruction cannot be used for the Basic model QCPU Block 0 is set when the block number is not s
68. SFC s active steps and CPU module s END processing time The number of active steps the number of transition conditions and the number of steps with satisfied transition conditions varies according to the conditions shown below e When transition condition is unsatisfied e When transition condition is satisfied without continuous transition e When transition condition is satisfied with continuous transition The method for determining the number of the above items is illustrated in the SFC diagram below Step 1 Transition _ _ condition 1 Step 2 Step 6 Transition _ _ Transition condition 2 condition 5 Step 3 Step 7 Transition _ _ Transition condition 3 condition 6 Step 4 Step 8 Transition _ _ Transition condition 4 condition 7 Step 5 Step 9 Transition condition 8 Step 10 3 SPECIFICATIONS MELSEC Q The following table indicates the number of active steps number of active transitions and number of transition condition satisfied steps when Step 2 and Step 6 are active Number of Number of Active Number of Active Transition Steps Transitions Condition Satisfied Steps 2 e Transition conditions 2 Transition isfi 2 not satisfied Steps 2 6 Sonditions 2 5 2 S 2 e Transition conditions Absence Transition 2 6 e Steps 2 6 2 5 satisfied Pee conditions 2 5 Gees Whether Transition Presence Absence Conditions Are of Continuous Satisfied or Not Transition
69. T condition d condition g condition i step 1 is executed Step 7 H Is transition condition _ Transition b satisfied T condition j NO a Is transition condition e satisfied NO Is transition condition h satisfied YES Vv Operation output of initial step 1 is deactivated Operation output of initial step 1 is deactivated Operation output of initial step 1 is deactivated beg y Operation output of initial step 6 is executed Operation output of initial step 2 is executed Operation output of initial step 4 is executed Is transition condition f satisfied Is transition condition c satisfied Operation output of initial step 2 is deactivated Operation output of initial step 4 is deactivated Operation output of initial step 5 is executed ls transition condition g Satisfied Operation output of initial step 3 is executed NO s transition condition i satisfied Is transition condition d satisfied YES Operation output of initial Operation output of initial step 5 is deactivated step 6 is deactivated Operation output of initial step 3 is deactivated Operation output of initial step 7 is executed Is transition condition j satisfied Operation output of initial step 7 is deactivated Block is ended since end step is reached 4 SFC PROGRAM CONFIGURATION
70. TART methods during SFC program execution are described below As shown below there are several block START methods Choose the method which is most suitable for the purpose at hand her th Auto START using PLC parameter Block START by SFC diagram symbol Block START by SFC control instruction Block START by SFC information device By setting the start condition to block 0 Auto START in the SFC setting of the PLC parameter dialog box block 0 is automatically started at an SFC program start and processing is executed from the initial step e Another block is started by the block START steps Gr BmE at each of the SFC program blocks m Transition condition satisfied t n Bm 0 Block m is started ee No to be started e Using an SFC control instruction a specified block is forcibly started from an SFC program step operation output or from another sequence program 1 When specified block is executed from its initial step Condition sBLm m is the block No 2 When specified block is executed from specified step Condition __ sBLm sn xm is the block No n is the step No e The corresponding block is activated by forcibly turning ON the block START END bit which was set to each block as the SFC information device in the program or peripheral device information register e Convenient when block 0 is used as a
71. Transition condition b satisfied YES Step 1 operation output deactivated x1 Step 2 operation output executed Transition condition NO c satisfied d sai YES 1 Step 2 operation output Step 3 oper deactivated deacti Step 3 operation output executed Transition condition Step 4 operation output executed Transition condition NO isfied e satisfied YES ation output Step 4 operation output vated deactivated MELSEC Q All waiting steps executed YES Transition condition NO f satisfied YES Step 5 operation output executed Transition condition g satisfied 1 Step 5 operation output deactivated END step executed operation completed x1 For steps with attribute designations processing occurs in accordance with the attributes 4 31 4 31 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 3 4 Jump transition A jump transition is a jump to a specified step within the same block which occurs when the transition condition is satisfied When condition b is satisfied at step n GET Step n execution step n operation output A is operation output A Step m deactivated and processing proceeds to step Transition condition b operation output B m 1 There are no restrictions regarding the number of jump transitions w
72. Variable Data register DO to D11135 fa Link register WO to WO7FF Hexadecimal total of 16k To to T511 words Set retentive timers ST in parameter Retentive timer Bit STO to ST511 Decimal e Contact and coil are word bit devices e Contact and coil are counter CO to C511 Decimal i 8 bit devices Special link relay SBO to SBO3FF Hexadecimal Special link register SWO to SWO3FF S0 to 8127 1 block total of 2048 points for all Decimal e Direct processing at DX e Direct processing at DY Input Hexadecimal Internal relay Latch relay e Exclusively for SFC program 3 SPECIFICATIONS MELSEC Q exist in each link Link direct module MELSECNET H Link vee relay JO SBO to J O SBO1FF Hexadecimal O indicates the Kean EE lee eg Link Link special register register to 209 Ani 2 e Exist in each intelligent function module Fixed SE e indicates the I O depending No 16 and on Word J O GO to J O G65535 Decimal changes depending intelligent f on the model as function ne indicated below QOOJCPU 0 to OF QOOCPU Q01CPU 0 to 03F module Index register index register ae to Z9 Decimal pe i e When block Romare to R32767 Decimal Ranta switching is used File register File register 1 Word Fixed e When serial No is ZRO to ZR65535 Decimal used Pointer Foie Poto P299 e Exclusively for SFC program BLO to B
73. When expressed in a circuit When expressed in a circuit BLm zk k aBLm C BLm H aBLm bBLm H Ka kk k kA aBLm m p C EE BLm ae bBLm H k k amp bBLm H H BLm m is a block No and xis a contact Function 1 Checks whether the specified block is active or inactive 2 The contact status changes as described below depending on whether the specified block is active or inactive Contact of N O Contact Contact of N C Contact Block Status Instruction Instruction 3 The contact is always OFF if the block that does not exist in the SFC program is specified As the BLm device is treated as a virtual device the contact on the monitor of a peripheral device does not turn ON OFF If the internal device is ON the coil instruction is switched ON for operations 4 SFC PROGRAM CONFIGURATION MELSEC Q Program Examples 1 The following program turns ON Y20 when block 3 is active aBL3 oY20 Related Instructions a SFC control instructions e Block START instruction sBLm and block END instruction r mi See Section 4 4 6 b SFC diagram symbols e Block START step Bm HI Bm E See Sections 4 2 8 and 4 2 9 c SFC information device e Block GTARTIEND bn See Section 4 5 1 4 SFC PROGRAM CONFIGURATION MELSEC Q QCPU PEG Gey Process CPU Basic High Performance EC RE E SE EES x First five digits of seri
74. When the transition condition is satisfied execution proceeds to the next step without waiting for the START destination block to end ee When transition condition is satisfied Block m Bm H 2 A simultaneous start cannot be made for a single block The block that has already started cannot be started either If either of the above starts is made the following processing is performed depending on the setting of the operation mode at block double START 1 Refer to Section 4 7 5 for details of the operation at block double START a When the setting of the operation mode at block double START is STOP A BLOCK EXE ERROR error code 4620 occurs and the CPU module stops processing b When the setting of the operation mode at block double START is the default setting of WAIT Processing is not performed and waits until the START destination block ends its execution POINTS 1 The Basic model QCPU does not allow the setting of the operation mode at block double START For the Basic model QCPU the operation mode at block double START is WAIT only 3 A block START request can start multiple blocks simultaneously by performing a parallel transition refer to Section 4 3 3 The steps in the simultaneously started blocks are processed in parallel 4 The number of steps that can be executed simultaneously is a total of up to 1280 steps 1 for all blocks The number of steps that can be executed s
75. X 1 1 SM Special Relays Setting Side Name Content Description Setting Timing e Switches ON when a diagnosis result error occurs Including the error detected by System annunciator ON or CHK at error instruction occurrence e Remains ON if condition returns to normal thereafter Compatible CPU model QCPU Process CPU QnACPU Q O E bd E bt a lt 2 lt D Q Q O Kei Si E 2 Ka ba a OFF normal no error Diagnosis error g ON abnormal error Step transition watch dog timer START corresponds to SD90 Step transition watch dog timer START corresponds to SD91 Step transition watch dog timer START corresponds to SD92 Step transition watch OFF Not started dog timer START Watch dog timer Switched ON to begin the step corresponds to SD93 reset transition watch dog timer count e E User x OJOJO Step transition watch ON Started Watch dog timer is reset when dog timer START Watch dog timer switched OFF corresponds to SD94 start Step transition watch dog timer START corresponds to SD95 Step transition watch dog timer START corresponds to SD96 Step transition watch dog timer START corresponds to SD97 APP 1 APP 1 APPENDICES BEER OFF Not started Watch dog timer reset ON Started Watch dog timer start Step transition watch SM98 dog timer START corresponds to SD98 Step transition watch SM99 dog time
76. _ Initial start Resume start start program is started Start e Designates whether block 0 is to Autostart block 0 Do not _ Autostart conditions be started automatically autostart block 0 block 0 e Designates the coil output mode at a block STOP Designates the first block No of 0to319 the periodic execution blocks No i x setting Turn OFF Keep ON e Designates the time interval for execution of the periodic 1 to 65535 ms execution blocks lock e Designates the operation which a Bee s occurs when a START request 9 Waiting oa can be designated is made for a block which is blocks for the stop blocks already active setting Waiting blocks stop blocks a step range can be designated for the stop blocks or Waiting blocks setting e Designates the operation which occurs when a transition follow up is executed to a step which is already active or when an active step is started multi activated Can be set xX Cannot be set 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 7 1 SFC program start mode The SFC program start mode setting determines whether an SFC program START SM321 OFF ON is executed by an Initial start or by a Resume start from the preceding execution status 1 Settings and corresponding operations Set whether initial start or resume start will be selected for the SFC program a Initial start The program is started after the active status at a previous
77. aan 43 Donauweg 2 B Fax 7 812 325 36 53 BE 1731 Asse Zellik NL 1043 J Amsterdam e mail consys consys spb ru Phone 32 0 2 467 17 51 Phone 31 0 20 587 6700 ELEKTROSTYLE RUSSIA Fax 32 0 2 467 17 45 Fax 31 0 20 587 6839 ul Garschina 11 e mail infoautomation getronics com e mail info gia getronics com RU 140070 Moscow Oblast TELECON CO BULGARIA Motion Control NETHERLANDS Phone 7 095 557 9756 4 A Ljapchev Blvd Automation b v Fax 7 095 746 8880 BG 1756 Sofia Markenweg 5 e mail mjuly elektrostyle ru Phone 359 0 2 97 44 058 NL 7051 HS Varsseveld ELEKTROSTYLE RUSSIA Fax 359 0 2 97 44 061 Phone 31 0 315 257 260 e mail Fax 31 0 315 257 269 INEA CR doo CROATIA mail Losinjska 4 a Beijer Electronics AS NORWAY HR 10000 Zagreb Teglverksveien 1 Phone 385 0 1 36 940 01 NO 3002 Drammen Fax 385 0 1 36 940 03 Phone 47 0 32 24 30 00 e mail inea inea hr Fax 47 0 32 84 85 77 AutoCont CZECHREPUBLIC Mail info beijer no Control Systems s r o MPL Technology Sp zo o POLAND Nemocnicni 12 ul Sliczna 36 CZ 70200 Ostrava 2 PL 31 444 Krak w Phone 420 59 6152 111 Phone 48 0 12 632 28 85 Fax 420 59 6152 562 Fax 48 0 12 632 47 82 e mail consys autocont cz e mail krakow mpl pl louis poulsen DENMARK Sirius Trading amp Services srl ROMANIA industri amp automation Str Biharia Nr 67 77 Geminivej 32 RO 013981 Bucuresti
78. aeseeesaesaeeaeseaseaesaeseeseaeeaees 5 12 6 SFC PROGRAM EXECUTION 6 1 to 6 15 6 1 SFG Program START And STOP gett saeta pannen aa aa eaea ae eaaa Taaa aaa Nat Le 6 1 6 1 1 SFC program resumptive START Drocedure 6 2 6 2 Block START and END iieiaei a aiaa a a aa a a a ae 6 4 E RE ee ER Hu ele E 6 4 GEI d2lgflulE le EE 6 5 6 3 Block Temporary Stop and Restart MethodS s sseseseessenesesneresesrstesnsistnsrsrnsrstusisnunnstnnnnnnnnnnnnnnnnnnnannnna 6 6 6 3 1 Block STOP methods is ee Nas a td fare a a tenet a eel ning epee een Mena i hs 6 6 6 3 2 Restarting a stopped DIOCK s csaciscccssecstectesinenescecseecsancacecaaecaaecaaetacecaaecdaecage tacecageiaticusutestcusattuceteeessecase 6 9 6 4 Step START Activate and END Deactivate Methods A 6 10 6 4 1 Step START activate Methods A 6 10 6 4 2 Step END deactivate Methods ccccecceccecceseeeeceeceeeeeeeaecaeceeeaesaeeeeeaesaesaeseeesaesaeseeseaesaesaeseeseeeaees 6 11 6 4 3 Changing an active step status Cannot be used for Basic model QCPU ccccseeseeteeteeees 6 12 6 5 Operation Methods for Continuous Transition 00 cece eee eseeeeeeenesaeeeeeeeesaeaesaeseseesesaesaeeeseesaesaneasees 6 13 6 6 Operation at Program Change cccccccccssessesseceeeceseeeeeseeeceeeceeesceeceeeseseseaeseaeseaeseaeseaeseaeseaeseaseaessaeesaeeags 6 14 APPENDIX 1 SPECIAL RELAY AND SPECIAL REGISTER UET APP 1 re APP 1 12 SD ee EIN EC APP 5 APPENDIX 2 Restrictions on Basi
79. al No are 04122 or later 4 4 4 Active step batch readout instructions MOV DMOV Usable Devices Internal Device MEE CNET Special i 10 H Direct SECH Expansion Data SFC E S System User i roo Function Index Constant Sequence Transition be Se SFC Other Type Block Step ki ta j Program Condition TAA eee EE EN sl oO Bmw Bm Only step relay S can be used BLm Sn When step in current block is specified When step in another block is specified When step is specified in sequence program Twovp usage C_ move BLm K4sn E nis a step No 8 m is a block No and n is a step No C_ pmowP kssn L_ pMowP BLm Kssn Function 1 Executes a batch readout of the operation statuses active inactive of steps in a specified block 2 The readout results are stored at the device as shown below b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 bi PEE II E TOETA T a E S gt SE designated at Sn Step S n 15 Step S n 1 0 Step in question is inactive 1 Step in question is active 3 The bit corresponding to the unassigned step No nonexistent step No in the read data turns to 0 When step 5 and step 8 do not exist in the read block b5 and b8 turn to 0 b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 bi bO p Ion fot 01 01 fot fost jot o Jot oni o 10 1 Von ot on on els S15 S14 S13 S12 S11 S10 S9 Non
80. arted the active steps change depending on the starting method as described below e When the block START step makes a start using BMH gt All initial steps become BmE active e When a start is made using the block START instruction sBLm of the SFC control instructions e When a forced start is made using the block START END bit of the SFC information devices e When any of the initial steps is specified using the step T Only the specified step control instruction sBLm Sn sSn of the SFC control becomes active instructions 2 Transition processing performed when multiple initial steps become active sf sl J sC ssl t t0 t2 t3 sa el se sri Hi t5 mi 7 el If steps are selectively coupled in the block that has more than one active initial steps the step immediately after the coupling becomes active if any of the transition conditions immediately before the coupling is satisfied In the above program example step 8 S8 becomes active when any of transition conditions t4 to t7 is satisfied When after the step immediately after the coupling S8 in the above program example becomes active another transition condition immediately before the coupling any of t4 to t7 in the above program example is satisfied reactivation processing is performed as a follow up function The processing which will be performed when another transition condition is satisfied
81. atchdog timer start and the special register for step transition watchdog timer setting are assigned to each watchdog timer as indicated below Watch dog Watch dog Watch dog Watch dog Watch dog Watch dog Watch dog Watch dog Watch dog Watch dog Timer 1 Timer 2 Timer 3 Timer 4 Timer 5 Timer 6 Timer 7 Timer 8 Timer 9 Timer 10 SE SM90 SM91 SM92 SM93 SM94 SM95 SM96 SM97 SM98 SM99 3 The method of setting to SD90 SD99 is as shown below bsn bb by n M bo E Time setting 1 to 255 setting value x1 s Annunciator F ON when time over status occurs device No setting 0 to 255 1 When the parameter where the high speed interrupt fixed cycle interval has been set is written to the High Performance model QCPU whose first five digits of serial No azre 04012 or later the step transition watchdog timers cannot be used No processing is performed if the step transition watchdog timers are executed 2 The step transition watchdog timers cannot be used in the Basic model QCPU 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 The method for using a step transition watch dog timer is shown below Step Where INE MOVP H010A SD60 oSM90 Time setting 10 x 1s 10s EE performed a Annunciator F No F1 ransition condition a HO10A L 10 s F1 annunciator a When SM90 is turned ON in the operation output of the step that performs a time check as shown below the step transition watchdog
82. c Model QCPU and Replacement Methode AA APP 10 2 1 Step Transition Watchdog Timer Replacement Method APP 11 2 2 Fixed Cycle Execution Block Replacement Method AAA APP 12 2 3 Forced Transition Bit TRn Replacement Method APP 13 2 4 Active Step Change Instruction GCHG Replacement Method APP 14 About the Generic Terms and Abbreviations Related Manuals Model Code GX Developer Version 8 Operating Manual SFC Describes how to create SFC programs using the software package for creating SFC Option Basic model QCPU User s Manual Function Explanation Programming Fundamentals Describes the functions programming procedures devices etc necessary to create programs using the Basic mode QCPU Option High Performance Model QCPU Q Mode User s Manual Function Explains Programming Fundamentals SH 080038 Describes the functions programming procedures and devices necessary to create the 13JL98 programs using High Performance Model QCPU Q mode Option QCPU Q Mode QnACPU Programming Manual Common instruction SH 080374E 13JU42 SH 080188 13JR44 SH 080039 13JF58 Describes how to use sequence instructions basic instructions and application instructions Option Process CPU User s Manual Function Explains Programming Fundamentals Describes the functions programming procedures and devices necessary to create the programs using process CPU Option SH 080315E 13JR56 Generic terms and abbreviations used
83. ck is checked for a START request and if there is a START request the block is activated and the step in that block is executed 1 BlockO 3 Block 5 Block2 6 r so C sol 4 so C to to t0 S1 S1 ei BLT1 BLT2 t1 ti t1 S2 S2 S2 2 t2 t2 t2 Active step Inactive step The SFC program is executed in order of 1 to 6 1 Whether block 0 is active or inactive is checked 2 Since block 0 is active the active step S2 is executed 3 Whether block 1 is active or inactive is checked 4 Since block 1 is active the active step SO is executed 5 Whether block 2 is active or inactive is checked 6 Since block 2 is inactive whether the next block is active or inactive is checked 5 SFC PROGRAM PROCESSING SEQUENCE MELSEC Q 5 3 3 Step execution sequence 1 In the SFC program the operation outputs of all active steps are processed within one scan Block 0 Active steps in corresponding block are executed within 1 scan is Active step IT Inactive step 2 At the end of the operation output execution at each step whether the transition condition to the next step is satisfied or not is checked a When the transition condition is not yet satisfied the operation output of the same step is also executed in the next scan b When the transition condition is satisfied the outputs turned ON by the OUT inst
84. control block a preprocessing block or a constant monitoring block for example Convenient when the sequence control is clear as in automatic operation There are 2 types of block START The START source step remains active until the START destination block is ended The START source transition occurs without waiting for the START destination block to be ended SFC diagram symbol BmB Convenient when starting an error reset processing block at error detection etc and for executing interrupt processing for example Convenient for debugging and test operations in 1 block units because the block can be started from a peripheral device without requiring a program Usable x Unusable 6 SFC PROGRAM EXECUTION MELSEC Q 6 2 2 Block END methods The methods for ending block operations are described below As shown below there are several block END methods Choose the method which is most suitable for the purpose at hand END Method Operation Description e Block processing is ended and the block is deactivated when the block s END step is executed e Convenient for cycle stops at automatic operations etc e Multiple END steps are possible within a single Block END by SFC diagram symbol Se lt END step block e Using an SFC control instruction a specified block is forcibly ended and deactivated from an SFC program step operation output or from another sequence program Condition
85. de Seiting at Block STOP e Restart disabled e Restarts the operation Since the step is e Restarts the execution output ina HOLD deactivated at a block of the operation output status STOP in a HOLD status e Also checks the transition condition x The held step indicates the step whose attribute has been set to the HOLD step SC SE ST and which is being held with the transition condition satisfied At coil output OFF e Returns to normal operation SM325 is turned ON OFF by the system according to the parameter setting when the CPU module switches from STOP to RUN Parameter Setting SM325 Turns OFF coil output OFF Remains ON coil output held By turning ON OFF SM325 in the user program the output mode at block STOP can be changed independently of the parameter setting 6 SFC PROGRAM EXECUTION MELSEC Q 6 4 Step START Activate and END Deactivate Methods 6 4 1 Step START activate methods There are the following step START activation methods Step START 3 R k e The corresponding step is automatically started when the preceding transition condition is satisfied EE Een e Basic operation of SFC program Started when condition is satisfied e The specified step is forcibly started by the SFC control instruction at the step operation output of the SFC program or in another sequence program Condition e Jump to other blocks can be made V 2 e When the block of the destination step is son
86. de at occurrence of a diagnosis error is stored in BIN code Diagnosis error ed Hf 1L 4 for errors originating at a SFC code program e This data is the same as the latest information in the fault history e The year last 2 digits of year and month when the SDO data was updated are stored in 2 digit BCD code Diagnosis error at error occurrence Example October 1995 H9510 e The day and hour when the SDO data was Diagnosis error Diagnosis error updated are stored in 2 digit BCD code occurrence Example at error time occurrence time bis to be B7 to b p 10 p m on 25th occurrence H2510 The clock data when an SDO update occurs is stored b15 to b8 b7 to bO Year 0 to 99 Month 1 to 12 Day 1 to 31 Hour 0 to 23 Example 35 min 48 sec past the hour H3548 The classification codes for judgment of what error information is stored in the common information SD5 to SD15 and individual information SD16 to SD26 are stored b15 to b8 b7 to bO Individual information Common information category codes category codes b15 to b8 b7 to bo Minutes 0 to 59 Seconds 0 to 59 e The following codes are stored into the common information classification code e 0 None Error Error information 1 Module No PLC No base No information classification e 2 File name drive name at error classification code 3 Time set value occurrence
87. destination block is deactivated after its execution has ended only the transition condition check is performed d When the transition condition is satisfied a transition to the next step occurs Block m 2 A simultaneous start cannot be made for a single block The block that has already started cannot be started either If either of the above starts is made the following processing is performed depending on the setting of the operation mode at block double START 1 Refer to Section 4 7 5 for details of the operation at block double START a When the setting of the operation mode at block double START is STOP A BLOCK EXE ERROR error code 4620 occurs and the CPU module stops processing b When the setting of the operation mode at block double START is the default setting of WAIT Processing is not performed and waits until the START destination block ends its execution POINTS 1 The Basic model QCPU does not allow the setting of the operation mode at block double START For the Basic model QCPU the operation mode at block double START is WAIT only 3 A block START request can start multiple blocks simultaneously by performing a parallel transition refer to Section 4 3 3 The steps in the simultaneously started blocks are processed in parallel 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 The following table indicates the number of steps that can be executed simultaneously in all blocks and
88. dialog box and the ON OFF status of the special relay for setting SFC program start status SM322 SFC Program Start Mode g Initial Start Resume Start SM322 ON SM322 OFF SM922 OFF When changed by Se When changed by Initial status Initial status Operation user user Reset operation to RUN Reset operation to RUN after SM321 ON OFF or RUN gt Resume 2 Resume 2 STOP STOP RUN Pe Beame i i sS S iSY STOP program write gt RUN Initial Resume 4 Initial Initial start Resume Resume start 1 SM322 is turned ON OFF by the system according to the setting of the SFC program start mode in the PLC parameter dialog box when the CPU module switches from STOP gt RUN e At initial start setting OFF e At resume start setting ON 2 Operation at resume start At aresume start the SFC program stop position is held but the status of each device used for the operation output is not held e Therefore make latch setting for the devices whose statuses must be held in making a resume start The held coil HOLD step SC becomes inactive and is not kept held In the Basic model QCPU the held coil HOLD step SC restarts in the held status However the output is not held To hold the output make latch setting for the devices desired to be held 3 Depending on the timing a resume start is disabled and an initial start may be made When it is desired to make a resume start securely
89. e next step By designating an operation output step as a coil HOLD step the coil ON status will remain in effect when proceeding to the next step When designated as a coil HOLD step When not designated as a coil HOLD step 0Y10 ON Transition ON ON Transition OFF condition FE condition EZ satisfied satisfied e At a designated coil HOLD step Y10 e At steps not designated as coil HOLD steps switched ON by OUT instruction will remain Y10 switched ON by OUT instruction is ON even when the transition condition is automatically switched OFF when the satisfied transition condition is satisfied 2 No ladder processing occurs following a transition to the next step 4 SFC PROGRAM CONFIGURATION MELSEC Q 3 When a coil ON status at coil HOLD step has been maintained to the next step the coil will be switched OFF at any of the following times a When the end step of the corresponding block is executed Except when SM327 is ON b When an SFC control instruction rBLm designates a forced END at the block in question c When an SFC control instruction rBLm Sn rSn designates a reset at the block in question d When a reset occurs at the device designated as the SFC information register s block START END device e When a reset step for resetting the step in question becomes active f When the SFC START STOP command SM321 is switched OFF g When the coil in question is reset by th
90. e S7 S6 None S4 S3 S2 Si SO 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 When the block is not specified specify the step number with which the read data range does not exceed the maximum step No in the block a If the maximum number of steps is exceeded data will be undefined For example when the last step of the block to be read is step 10 S10 data in b11 to 15 will be undefined b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 bi b0 D 0 1 0 1 O 1 O 1 O 1 O 1 O 1 O 1 0 4 O 1 O 1 O 1 O 1 O 1 0 4 0 4 GE S3 S2 Si SO li S9 S8 S7 S6 S5 S4 S3 S2 SI Undefined data SO Information of corresponding block b When the block has been specified 0 is stored into the remaining bits When block 1 is specified 0 is stored into B11 15 if the last step of block 1 is step 10 S10 b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 P b4 b3 b2 bi b D O 1 O 1 0 1 O 1 0 1 O 1 O 1 04 0 1 0 4 ot ort ot o1 ot on Corresponding S10 S9 S8 S7 S6 S5 S4 3 S2 Si step No 0 is stored into all bits SO Information of block 1 5 In the activation step batch read instruction do not specify a nonexistent block step An error will not occur if a nonexistent block step is specified However the read data are undefined Operation Error e No error occurs 4 SFC PROGRAM CONFIGURATION MELSEC Q Pro
91. e active step other than the one held in the block can be continued when the end step is reached 1 The block is not ended if the end step is executed However when there is only the held step left in the block at arrival at the end step the held step is deactivated and the block ends if SM328 is ON When there is normal active step left When there is HOLD step whose When there is held active step left transition condition is not satisfied which is not held left SE SE Irene Irene EEN When SM328 is turned ON When SM328 is turned ON Block is ended independently processing of active step is processing of HOLD step is continued of whether SM328 is ON or OFF continued 1 SM328 that continues the execution of the active step other than the one held in the block can be used with the Basic model QCPU only 4 SFC PROGRAM CONFIGURATION MELSEC Q POINTS The following gives the precautions to be taken when SM328 is turned ON 1 When there is only the held step left at arrival at the end step that held step is deactivated if SM328 is ON When the user does not want to turn OFF the coil output of the held step suddenly it can be prevented by turning ON SM327 2 If a block is started at the block START step when SM328 is ON execution returns to the source as soon as there are no non held active steps in the block 3 Do not describe an always satisfied transition condition immediately after the op
92. e com www mitsubishi automation com
93. e periodic execution blocks will be executed following execution of blocks designated for execution at each scan If the specified time interval is shorter than the scan time the periodic execution blocks will be executed at each scan in the same manner as the other blocks 3 The specified time interval countdown is executed in a continuous manner 1 When the parameter where the high speed interrupt fixed cycle interval has been set is written to the High Performance model QCPU whose first five digits of serial No are 04012 or later the fixed cycle execution block setting cannot be used If the fixed cycle execution block setting is made no processing is performed and the block remains unchanged from the every scan execution block 2 To execute the periodic execution block the block to be executed periodically must be activated 3 The fixed cycle execution block setting cannot be used in the Basic model QCPU 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 7 5 Operation mode at double block START This mode setting designates the operation mode which is to be effective when a block START request occurs by block START step Hm Ent for a block which is already started 1 Settings and corresponding operations Set the operation mode at block double START to either STOP or WAIT in the block parameter of the SFC setting dialog box in the Tools menu The operations resulting from these settings are shown below Setting
94. e program h When the STOP instruction is executed with the stop time output mode OFF i When S999 is designated at the reset step in the corresponding block 4 Block STOP processing Make a block STOP using the STOP RESTART bit of the SFC information devices or the block STOP instruction of the SFC control instructions The processing of the active step in the block where a block STOP was made is as described below a When the block STOP time operation output flag SM325 is OFF coil output OFF e The step becomes inactive when the processing of the corresponding block is performed first after a block STOP request e All coil outputs turn OFF However the coils turned ON by the SET instruction remain ON b When the block STOP time operation output flag SM325 is ON coil output held The coil outputs remain ON during a block STOP and after a block RESTART 5 Precautions when designating coil HOLD steps a PLS instruction When the execution condition of the PLS instruction is satisfied and the transition condition is satisfied at the same scan where the PLS instruction was executed the device turned ON by the PLS instruction remains ON until the OFF condition in above 3 is satisfied b PLF instruction When the execution condition of the PLF instruction is satisfied and the transition condition is satisfied at the same scan where the PLF instruction was executed the device turned ON by the PLF instruction remains ON until
95. eeceeseeeeeeeeeeeeaeeseesaeeaeeaensassaseaeeaasaesaeeaesseseaseaeeaeesaseesaeneateaneaes 4 80 4 7 1 SFC program start mode cecceceececeeceeeeeeceeceeeneceeeeeeeaecaeceeseaesaecaeseeeeaeeaesaeseaesaesaesaeseaesaataeseeeeateaes 4 81 4 7 2 Block O START Gongdton isiin iaai a a a ai a i aaa aaa aaan aiaa 4 83 4 7 3 Output Mode at block GTOP 4 84 4 7 4 Periodic execution block setting AAA 4 85 4 7 5 Operation mode at double block GTART 4 86 4 7 6 Operation mode at transition to active step double step GTART 4 87 5 1 Whole Program Processing of Basic Model OCH 5 1 5 1 1 Whole program processing Seene 5 1 5 2 Whole Program Processing of High Performance Model QCPU Process CDU 5 2 5 2 1 Whole program processing Seene 5 2 5 2 2 Execution type designation by instructions ecceceeeceeeceeeeeeeeeeeeeeeeeseeeseeeseseeeseeseeeseeeteeeteeetenenaes 5 4 5 2 3 SFC program for program execution management 5 6 5 3 SFC Program Processing Sequence esseseseseseersserseesnststnetstntnstntnstatusennntnnntnnnnnstnnnsnntnsnnnnsna nnan nen 5 8 5 3 1 SFC program execution ccecceececcecceseeeceeceeeeecaeceeeeaecaeceesaesaecaeceeseaesaesaeseeseaesaeseeseaeeaeeaesaeseeseaeeats 5 8 5 3 2 BIOCK EXECUTION seguence eeeeeeeeeeceeeeeeeeeteeeeeeeeaeeeseesaeeeaeesaeesaeesaaesaeesaeeseeeseeeseeeseeeseeeeesenseaeseeeteaes 5 10 ERR KE EE 5 11 5 3 4 Continuous transition ON OFF operation cccccecceccesesseceeceeeeseeeeceeseeeaec
96. eeeteeeeeeeeeeaes 4 37 4 4 1 Step operation status check instructions a b amp a amp D la Di 4 41 4 4 2 Forced transition check instruction a b amp a Ab la Di 4 44 4 4 3 Block operation status check instruction a b amp a Ab la Di 4 46 4 4 4 Active step batch readout instructions MOV DMON 4 48 4 4 5 Active step batch readout BMOV ccsccecceceeceeseeeeceeeeseeaecaeeeeeaecaecaesaesaesaeseeseaesaesaeseeeeaeeanseseateaes 4 51 4 4 6 Block START amp END instructions e 4 54 4 4 7 Block STOP and RESTART instructions PAUSE DGTART 4 55 4 4 8 Step START and END instructions e g 4 57 4 4 9 Forced transition EXECUTE A CANCEL instructions e g 4 61 4 4 10 Active step change instruction GCHOG 4 63 4 4 11 Block switching instruction BPRGET 4 64 4 5 SEG Information Devices TEE 4 66 4 5 1 Block START ENDIDIt vitesse seth n e an aaae a Le ergi dE itched bien aaa aas haana Eott Eia 4 67 4 5 2 otep transition TEE 4 69 4 5 3 Block STOP RESTART bits secs esivinu took ered at edad aren awit ee cheers 4 71 4 54 Block STOP m de Dit riarena aadatan naai aS ara aia aeaa anani EETA aG aara daha Poa a aaia aia edia 4 73 4 5 5 Continuous transition bit arieni iia a n i i a a e 4 75 4 5 6 Number of active steps reQiSter ee eeceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeaeeeaeeeaeeeaeeeaeeeaeeeaeeeaeeeeaeeaeeeaeeeas 4 77 4 6 Step Transition Watch dog Ter 4 78 4 7 SFC Operation Mode Setting eeeccecssccss
97. elow Control Method Function SFC Diagram PrO Geer SFC Information Devices Instructions Block START Block START Block END Block START END bit OFF Block STOP C PAUSE BLm Bock PAUSE RESTART bit ON Restart stopped block ooa RSTART BLm Block PAUSE RESTART bit OFF Forced step Son activation SONG KN rSn 1 In cases where the same function can be executed by a number of methods the first control method which has been designated by the request output to the block or step in question will be the effective control method 2 Functions controlled by a given control method can be canceled by another control method Example For block START The active block started by the SFC diagram Bm H can be forcibly ended by executing the SFC control instruction rBLm before the END step L or by turning OFF the block START END bit of the SFC information devices 7 The automatic scroll function helps the easy location of the spot where a mechanical problem occurs The execution of an active execution block an active execution step an operation output transition condition can be monitored with the automatic scroll function from peripheral devices Moreover the transition watchdog function enables the detection of the step where transition does not occur after the designated time elapses These monitoring functions allow you to track down the spot where a problem occurs without a broad knowledge about sequence programs
98. epropel sion status SR block to determine if the step is active or check instruction 0 a amp a la L b amp b lb BLm Sn inactive a amp a la e Checks a specified step in a specified L b amp b Ib TRA 1 block to determine if the transition ee condition by transition control instruction C a amp a la BLn TRn instruction for that step was satisfied b amp b lb forcibly or not Active steps batch e Active steps in a specified block are read readout instruction to a specified device as bit information Block START g instruction d A specified block is forcibly ended e A specified block is forcibly started activated independently and is executed from an initial step Block STOP instruction PAUSE e A specified block is temporarily stopped BLm r BLm BLm e The temporary stop status at a specified Block restart instruction RSTART Bim block is canceled with operation resuming from the STOP step A specified block is forcibly started activated independently and is s BLm Sn executed from a specified step e d e A specified step in a specified block is Step control Instruction r BLm Sn forcibly ended deactivated TRn n e The instruction execution step is SCHG 2 deactivated and a specified step is x activated e A specified transition condition at a EJ Transition control s BLm TRn specified block is forcibly satisfied instruction e The forced transition at a specified transition condit
99. equest is received from another block SFC setting of the PLC when the block START step is activated parameter dialog box 2 When the block START instruction of the SFC control instructions is executed All blocks other than block 0 3 When the block START END bit of the block information devices is forcibly turned ON 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 2 11 Instructions that cannot be used with operation outputs Table 4 1 indicates the instructions that cannot be used with operation outputs Table 4 1 Unusable Instruction List Instruction Symbol Mc MCNEJNo 1_D Mastercontroiset MCR MCR NL Master control reset FEND FEND Main routine programend EnD JEND Sequence programera Jump to E ND Label cannot be Program control REI IRET Return from interrupt program used either Structuring f RET RET Return from subroutines Ost 1 Jones CHK instruction stat Debugging Or n Specitictormaterorcheck troubleshooting CHKCIR 1 CHKCIR_ Check pattern changestat 1 CHKEND 1 _ CHKEND_ reg pattern changeena er rop SFC program stat SFCPEND SFOPEND SFC programend o Z BLock __ BLOCK SFC block stat o ooo N D SC SE ST R C G J SFC step start ID ISC ISE IST IR TRAN L O OA OC OCA A C S SFC transition start CA CO COC Master control SFC coupling check FC transition destination designation S SFC step end 1
100. eration HOLD step with transition check Block n ie Block m 1 Since the transition condition is always S T satisfied step m 1 remains an active Step n x Step m ST step non held active status 1 3 A T aSM400 2 If MO turns ON and the transition Step n 1 Step mai condition is satisfied block m cannot T be ended 3 Since block m is not ended execution cannot proceed to step n 1 2 aMo a When the transition condition immediately after the operation HOLD step with transition check is always satisfied the next step is kept in a non held active status Therefore the block cannot be ended when SM328 is ON Further if this block has been started at the block START step with END check processing cannot be returned to the START source step b When it is desired to describe an always satisfied transition condition immediately after the operation HOLD step with transition check make provision so that the block can be forcibly ended from outside 3 After end step execution a restart is performed as described below START condition of block 0 is set to Auto START ON in the je Execution automatically returns to the initial step again and SFC setting of the PLC processing is executed repeatedly parameter dialog box START condition of block Ois A restart is made when any of the following is executed set to Auto START OFF in the 1 When another START r
101. essing of the High Performance model QCPU and Process CPU Since this manual describes only the outline refer to the user s manual of the used CPU module for details 5 2 1 Whole program processing sequence The High Performance model QCPU and Process CPU can store multiple programs in the program memory as files and execute multiple files concurrently or only the specified file The whole operation image is as shown below CPU module RUN J Initial execution type program Started only when necessary __ Scan execution Standby type type program program Low speed Execution time Fixed cycle execution monitoring execution type type program program Performance model QCPU or Can be executed by High Process CPU 5 SFC PROGRAM PROCESSING SEQUENCE MELSEC Q Execution Type SFC Compatibilit Initial execution type e Executed only in one scan when the PLC is powered ON or the CPU module is switched from STOP to RUN e After that switches to a standby program Max 124 programs changes depending on the CPU module type e SFC program Max 2 programs e Normal SFC program 1 program e SFC program for program execution management 1 program Scan execution type 2 program e Program executed every scan scan execution Low speed execution type program low speed execution e Program executed in the extra time of the constant scan time or program executed
102. essing will proceed from step to step in the selected column until another parallel coupling selection occurs Transition condition b Transition condition c Branch Step n 1 Step n 2 operation output B operation output ICH Step n Step n 1 operation output A operation output B Transition condition b Transition condition c e When the transition condition b or c at the Coupli executed branch is satisfied the executed step oupiing A or B will be deactivated and processing Step n 2 operation output ICH will proceed to step n 2 1 Up to 32 steps can be available for selection in the selection transition format Step n Step Step Step Steps iaut Step LJ Dn KS n 2 n 3 E n 4 E n 32 e Max of 32 steps 2 When two or more selection step transition conditions are satisfied simultaneously the left most condition will take precedence Example If transition conditions c Step n and d are satisfied simultaneously the step TI Transition Transition Transition _ Transition y x i condition b condition c condition d condition e n 2 operation output will Step Step Step Step eee na SS Re be executed za 4 SFC PROGRAM CONFIGURATION MELSEC Q
103. f the maximum number of steps in one block The step numbers are used for monitoring the executed step and for making a forced start or end with the SFC control instruction 4 2 1 Step _ without step attribute During processing of steps without attributes the next transition condition is constantly monitored with transition to the next step occurring when the condition is satisfied 1 The operation output status of each step n varies after a transition to the next step n 1 depending on the instruction used a When the OUT instruction is used excluding OUT C When atransition to the next step occurs and the corresponding step becomes inactive the output turned ON by the OUT instruction turns OFF automatically The timer also turns OFF its coil and contact and also clears its present value When transition condition n becomes satisfied at the Example l step n operation output where YO is ON in Stepan Se op accordance with the OUT instruction YO is HE cal automatically switched OFF condition n Step n 1 E b When the SET basic or application instruction is used If a transition to to the next step occurs and the corresponding step becomes inactive the device remains ON or the data stored in the device is held To turn OFF the ON device or clear the data stored in the device use the RST instruction etc at another step When transition condition n becomes satisfied a
104. fter end processing of the corresponding step is held transition performed At the same time the transition destination step becomes active and the block stops immediately OFF or mo e Immediately after a STOP request is made setting the block is stopped with the coil output of the immediate operation output being held e The status remains active e Normal operation is performed until the coil output transition condition is satisfied a held e When the transition condition is satisfied the STOP after end processing of the corresponding step is transition perform d At the same time the transition destination step becomes active and the block stops immediately e Immediately after a STOP request is made the coil e Immediately after a STOP request is output of the made the coil output of the operation operation outputis output is turned OFF and the block is turned OFF and the stopped block is stopped e The status remains active e The status becomes inactive e Immediately after a STOP request is made the block is stopped with the coil output of the operation output being held e The status remains active The held step indicates the step whose attribute has been set to the HOLD step SC SE ST and which is being held with the transition condition satisfied a Output mode at block STOP in PLC parameter dialog box Set the initial status of the output mode at block STOP when the PLC is powered ON or the C
105. g ented SD5 Drive b15 to b8 b7 to b0 SD6 41H A 4DH M SD14 SD7 File name 4EH N 49H I SD8 ASCII code 8 characters 20H SP 20H SP SD9 20H SP 20H SP SD10 Extension 4 2EH 51H Q 2EH SD11 ASCII code 3 characters 47H G 50H P SD12 SD13 SD1 5 Spi4 Vacant SD15 For the extension refer to REMARKS on the next page APP 6 APP 6 APPENDICES MELSEC Q Compatible CPU D A o Setting Side 8_ gt Name Content Description Setting S ES Ola so bei vj oO Timing Blea 9 ES ojs ojs 21S aiis ke 3 Time set value Number Meaning SD5 Time 1 us units 0 to 999 us SD6 Time 1 ms units 0 to 65535 ms SD6 SD7 SD8 SD9 SD7 SD10 SD11 Vacant SD12 SD13 SD8 SD14 SD15 SD9 Program error location Error Error Number Meaning System SD10 common common SD5 at error informati informati oe GE Ge ene GEI code 6 Characters on on Spa occurrence SD11 SD9 Extension 4 2EH SD10 ASCII code 3 characters SD11 Pattern 5 SD12 Block No SD12 SD13 Step No transition No SD14 Sequence step No L SD15 Sequence step No H SD13 W 5 Pattern data definitions 1514 to 4 3 2 1 0 Bit number ojo to ol o gt k 2k LEE Not used D SFC block specified 1 not specified 0 SFC step specified 1 no
106. gram Examples 1 The following program reads 32 active steps starting from step 0 of block 3 to DO and Di when XO turns ON When step is designated by operation output of block 3 aX0 DMOVP K8S0 DO When step is designated by operation output of other than block 3 aX0 DMOVP BL3 K8S0 DO When step is designated by sequence program DMOVP BL3 Ksso DO b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 bi b0 DO S15 14 S13 S12 S11 S10 S9 S8 S7 S6 S5 S4 S3 S2 GI SO nl TTT RES gt 31 S30 S29 S28 S27 S26 S25 S24 S23 S22 S21 S20 S19 S18 S17 S16 Related Instructions 1 SFC control instructions e Block switching instruction DPRGET See Section 4 4 11 e Step operation status check instruction a b amp a amp b la Di See Section 4 4 1 e Active step batch readout Instruction BMC See Section 4 4 5 4 SFC PROGRAM CONFIGURATION MELSEC Q QCPU PLCCPU PLO CPU Process CPU Basic High Performance RS Fe a FO a O First five digits of serial No are 04122 or later 4 4 5 Active step batch readout BMOV Usable Devices Data Type Internal Device ME SECRET Special l i 10 H Direct E i nen Program System User Function Index Constant SPS SIEN Other Sequence 9 Transition Module Zi KH SrO Sn Program SERGE Condition A aa S BLm Sn g p enon ee a Condition ee oes
107. grams other than the SFC program and their processings 5 SFC PROGRAM PROCESSING SEQUENCE MELSEC Q 2 Transition processing for continuous transition ON setting The SFC program processing procedure with continuous transition will be explained 1 Active step n instruction operation m Ca 4 2 Transition condition satisfied unsatisfied check axo n 1 oY11 Y When transition condition When transition condition is unsatisfied is satisfied v 3 END processing 3 The active step n is deactivated and the coil If other blocks exist subsequent the block where the OUT instruction is ON is switched OFF fr question END processing will be executed after those blocks have been processed 4 Step n 1 is activated and its instruction operation is executed Vv 4 Instruction operation for the same step n as that at the previous scan tt dr DES p 5 Transition condition satisfied unsatisfied check 6 Subsequent processing is executed in a continuous manner up to a step with an unsatisfied transition condition S END processing If other blocks exist subsequent the block in question END processing will be executed after those blocks have been processed 8 Instruction operation is executed for the step activated by the unsatisfied transition condition at the previous scan END processing is performed after all the program files set to the scan execution type i
108. he scanning time is extended by the amount of the processing time this will not result in a watch dog timer error detection No system processing time is required when switching from a scan status to a WAIT status Switching time number of created programs x Km number of created steps x Kn SFC program capacity x Kp High Performance Model QCPU Process CPU QO2CPU QnHCPU QnPHCPU 451 9us 194 7uUs 194 Zus Em 5 SFC PROGRAM PROCESSING SEQUENCE MELSEC Q 5 2 3 SFC program for program execution management This SFC program can be used to manage the program execution sequence when multiple program file switching is required In addition to a normal SFC program only one block can be created and executed for a single file of an SFC program for program execution management 1 How to create SFC program for program execution management a Number of files and blocks In addition to a normal SFC program only one file of an SFC program for program execution management can be created as a scan execution type program Only one block of the SFC program for program execution management can be created b Usable instructions The SFC diagram symbols except the block START steps BmH BmE and steps that can be used in an SFC program and the sequence instructions that can be used in transition conditions can all be used POINT If block start steps Bm BH are described a BLOCK EXE ERROR error error No
109. hen not during continuous transition e Always ON during operation in the without continuous transition mode gt Setting Side 5 8 fe Olsa S Setting 5 ES Ola Timing SES 9 El EI ols 2 S oie Ko MELSEC Q Compatible CPU A System initial value System initial value User System initial value User O JOJO O APP User System for instruction execution APP 2 AP PENDICES MELSEC O Basic model QCPU High Performance model QCPU Process CPU Compatible CPU Setting Side Name Content Description Setting Timing Select whether the coil output of the active step will be held or not at a block STOP e As the default value OFF when coil output OFF is selected for System SM325 Operation output at OFF Coil output OFF the output mode at parameter initial block STOP ON Coil output ON block STOP and ON when coil value output held is selected User When this relay is OFF the coil outputs are all turned OFF When this relay is ON the coil outputs are held Select the device status when SM326 Jett device clear mode OFF Clear device the CPU is switched from STOP ON Preserves device to program write to RUN All devices except the step relay When this relay is OFF the SC OFF HOLD step SE or ST step that was held SM327 Output mode at end output OFF when a transition condition had step execution ON HOLD step been satisfied turns OFF
110. imultaneously in a single block is a maximum of 256 steps 2 including those of the HOLD steps 1 Up to 1024 steps for the Basic model QCPU 2 Up to 128 steps for the Basic model QCPU 4 SFC PROGRAM CONFIGURATION MELSEC Q The execution status of each block can be checked at another block using the block START END bit refer to Section 4 5 1 or the block activation check instruction refer to Section 4 4 3 of the SFC control instructions 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 2 10 End step An end step indicates that a series of processings in the corresponding block is all ended 1 When the end step is reached the following processing is performed to end the block a All steps in the block are deactivated The held step are also deactivated b The coil outputs turned ON by the OUT instruction are all turned OFF When the special relay for output mode at end step execution SM327 is ON however the coil outputs of the held steps all remain ON POINTS 1 SM327 is valid only when the end step is reached When a forced end is made by the block END instruction etc the coil outputs of all steps are turned OFF 2 SM327 is valid for only the HOLD steps being held The outputs of the HOLD steps that are not held as the transition conditions are not satisfied are all turned OFF 2 When the special relay for clear processing mode at arrival at end step SM328 is turned ON the execution of th
111. ing satisfied 2 Operation HOLD step no transition check SE Transition condition is satisfied SE Leen Operation is continued A Timer continues counting tr axi ee Step which is active due to transition condition being satisfied A a e After transition the operation of the operation output is continued put in HOLD status and the coil output status when the transition condition is satisfied is maintained e Transition will not occur if the transition condition is satisfied again Convenient for maintaining an output until the corresponding block is completed hydraulic motor output pass confirmation signal etc e When the output mode at block stop is OFF it remains OFF after a block restart e After transition the operation of the operation output is continued put in HOLD status e Transition will not occur if the transition condition is satisfied again e When the output mode at block stop is OFF the operation is continued after a block restart and therefore the output is provided as a result of the operation that has been performed 3 Operation HOLD step with transition check Transition Transition condition condition is again is satisfied satisfied ST oY10 Operation is continued Timer continues counting pX1 Step which is active due to transition condition being satisfied Step which is active due
112. ion condition M11 uH TRAN H i l l l 1 eg l l 2 Forced transition bit replacement method Describe any bit device in the transition condition where it is desired to cause a forced transition under the OR condition and turn ON the bit device described under the OR condition to cause a forced transition SFC program SO User set transition to Condition S1 User set transition ti Condition APP 13 APP 13 APPENDICES MELSEC Q APPENDIX 2 4 Active Step Change Instruction SCHG Replacement Method 1 Operation of active step change instruction The active step change instruction deactivates the instruction executed step and forcibly activates the specified step in the same block T axi T el SCHGK6 se ax2 Activates step 6 when X1 turns ON 2 Active step change instruction replacement method Using a jump transition and selection branching create a program that will cause a jump to the specified step when the transition condition is established S5 S6 o Jump transition destination step t6 4 ax2 18 i a s ep Causes jump to step 6 when X1 turns ON t7 APP 14 APP 14 WARRANTY Please confirm the following product warranty details before starting use 1 Gratis Warranty Term and Gratis Warranty Range If any faults or defects hereinafter failure found to be the responsibility of Mitsubishi occurs during use of the product within the gratis warra
113. ion e Step START instruction e Step END instruction 5 The following instructions are described as follows when used in the format other than the MELSAP L eg GET er RST 4 SFC PROGRAM CONFIGURATION MELSEC Q Beginning from Section 4 4 1 of this manual the following table is used in the explanations of the various instructions The table contents are explained below Programs Using Instructions Execution Site MELSECNET Internal Device ial File 10 Direct Specia Expansion SFC Program System User mye ore Sequence Register EE roa Program geg i BLm Sn g Ste Transition P Condition BIN16 BIN32 N BIN16 BIN32 A X 2 3 4 5 Usable Devices Transition Block Dep Condition l u Destination Source Instruction code Destination cccceeeeeeteeeeees Data destination following the operation Ee tte Where data is stored prior to the operation 2 Usable devices are indicated at this area e Devices indicated by a circle mark O can be used with the instruction in question The device application classifications are shown below 4 SFC PROGRAM CONFIGURATION MELSEC Q MELSECNET 10 H Special Devi Internal File Functi Ind E f evice unction Index Expansion System User Register Ae e Constant Other Nes Module td SFC i PNG i a ia Psi Decimal hexadecimal J U real number DX Usable i constant DY devices character string
114. ion bit ON the transition bit will remain ON during the next step s operation output after the transition condition is satisfied It will also remain ON following the execution of multiple steps even if the transition condition is unsatisfied In these cases the transition bit will switch OFF when block execution occurs at the next scan Example Step transition bit M1 Am ON a OFF bk l Step 1 Step 1 Step 0 Transition condition 1 unsatisfied 5 Transition condition 0 satisfied Other program executed 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 At active parallel branch steps the transition bit will switch ON when any of the transition conditions are satisfied sn S n 2 Transition ee ee L Transition Transition ae condition condition condition M1 Hehe oe le he unsatisfied satisfied unsatisfied E Step Step n Transition condition unsatisfie Step n 2 Step n 1 Transition condition unsatisfie Transition condition satisfie Other program executed 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 5 3 Block STOP RESTART bit The block STOP RESTART bit is used to temporarily stop processing while the corresponding block is active 1 When the designated block STOP RESTART bit is switched ON by the sequence program or peripheral device processing will be stopped at the current step of the block in question If a START status is in effect at another block the STOP will
115. ion check which occur when the double START condition is satisfied These transitions occur without regard to the settings described at item 1 above Setting e The TRANSFER setting applies to all operations regardless of the setting e At coil HOLD steps The operation output is restarted and a transition condition check begins The PLS instruction for which the input conditions have already been established is non executable until the input conditions are turned on again e Following the double e At operation HOLD steps without transition check START execution of all A transition condition check begins subsequent steps where e At operation HOLD steps with transition check transition conditions are Operation continues as is satisfied will occur according Active step Inactive to the step attributes STOP WAIT TRANSFER Transition condition satisfied Coil HOLD step or gt operation output Step ee condition without transition check is checked No transition condition check 4 SFC PROGRAM CONFIGURATION MELSEC Q 3 Operation at double START a When transition destination is serial transition 1 When setting is STOP ee If the transition destination is active an error occurs and the processing of the CPU module stops Wa C Transition destination C 2 When setting is WAIT G vi Execution waits until the transition destination step becomes inactive When the transition desti
116. ion in a specified block is r BLm TRn canceled x O Block switching e Blocks subject to the 1 SFC control BRSET instruction are designated e Usable x Unusable 4 37 4 37 4 SFC PROGRAM CONFIGURATION MELSEC Q x1 In a Sequence program block 0 is the instruction execution target block In an SFC program the current block is the instruction execution target block The instruction execution target block can be changed with the block switching instruction BRSET However the Basic model QCPU cannot execute it 2 Can be used at the step of an SFC program An error occurs if it is executed in a sequence program other than an SFC program POINTS 1 Either of the following errors occurs if the SFC control instruction is executed from the sequence program when the special relay for SFC program start stop SM321 is OFF e Instruction that specifies a block BLOCK EXE ERROR error No 4621 e Instruction that specifies a step STEP EXE ERROR error No 4631 2 The SFC block BL and step relay S cannot be index qualified 3 Do not use the SFC control instructions in an interrupt program or fixed cycle execution type program If they are used in an interrupt program or fixed cycle execution type program operation of the SFC program cannot be guaranteed 4 The step relay S can be used in only the following instructions e Step activation check instruction e Active step batch read instruct
117. ircraft medical applications railways incineration and fuel devices manned transport devices equipment for recreation and amusement and safety devices in which human life or assets could be greatly affected and for which a particularly high reliability is required fin terms of safety and control system please consult with Mitsubishi and discuss the required specifications A MITSUBISHI ELECTRIC HEADQUARTERS EUROPEAN REPRESENTATIVES EUROPEAN REPRESENTATIVES EUROPEAN REPRESENTATIVES MITSUBISHI ELECTRIC EUROPE B V German Branch Gothaer StraBe 8 D 40880 Ratingen Phone 49 0 2102 486 0 Fax 49 0 2102 486 1120 e mail megfamail meg mee com EUROPE MITSUBISHI ELECTRIC FRANCE EUROPE B V French Branch 25 Boulevard des Bouvets F 92741 Nanterre Cedex Phone 33 1 55 68 55 68 Fax 33 155 68 56 85 e mail factoryautomation framee com MITSUBISHI ELECTRIC IRELAND EUROPE B V Irish Branch Westgate Business Park Ballymount IRL Dublin 24 Phone 353 0 1 419 88 00 Fax 353 0 1 419 88 90 e mail sales info meir mee com MITSUBISHI ELECTRIC ITALY EUROPE B V Italian Branch Via Paracelso 12 I 20041 Agrate Brianza Ml Phone 39 039 60 53 1 Fax 39 039 60 53 312 e mail factory automation it mee com MITSUBISHI ELECTRIC SPAIN EUROPE B V Spanish Branch Carretera de Rubi 76 80 E 08190 Sant Cugat del Vall s Phone 34 9 3 565 3131 Fax 34 9 3 589 2
118. is designed to set whether the coil outputs turned ON by the OUT instruction will be held at the time of a stop coil output held or all coil outputs will be forcibly turned OFF coil output OFF when the corresponding block is stopped temporarily Stop the corresponding block temporarily using the stop RESTART bit of the SFC information devices or the block STOP instruction PAUSE BLm of the SFC control instructions 1 Settings and corresponding operations Set the output mode at block STOP in the output mode at block STOP in PLC parameter dialog box or the special register for setting operation output at block STOP SM325 The operation of the SFC program changes depending on the combination of the output mode at block STOP in PLC parameter dialog box setting and the SM325 setting Gren ane at SE SE Active step other than held step Coil HOLD step SC step without step with transition transition check SE check ST Block Stop in Block Stop Mode Bit including HOLD step SC SE ST whose PLC Paramete SM325 transition condition is not satisfied OFF or mo e Immediately after a STOP request is made setting the coil output of the operation output is turned immediate OFF and the block is stopped e Turns OFF e The status remains active coil output e Normal operation is performed until the OFF transition condition is satisfied e Remains ON e When the transition condition is satisfied the coil output STOP a
119. is executed after all OFF Turned ON OFF by the system f devices have been cleared SFC program is executed with all devices ON Turned ON OFF by the system held The setting of SM326 is valid only when an SFC program exists after write to PLC When sequence program and or parameter write is performed the setting of SM326 is also valid The setting of SM326 is ignored when only the data other than the SFC program sequence program and parameters are written b When program was written with CPU module in RUN status 1 Program start after write to PLC An initial start is performed independently of the SFC start mode setting initial start resume start Refer to Section 4 7 1 for details of the SFC program start mode 2 Device status at program start The SFC program is executed with all devices held 2 Program change by online change a Program start after write to PLC When program change is made by online change a resume start is performed independently of the SFC start mode setting b Device status at program start The SFC program is executed with all devices held APPENDICES MELSEC Q APPENDICES APPENDIX 1 SPECIAL RELAY AND SPECIAL REGISTER LIST The special relays and special registers which can be used in SFC programs are shown below For information regarding other special relays and special registers not used at SFC program refer to the QCPU Q mode QnACPU Programming Manual Common Instructions APPENDI
120. is possible Multiple processes can easily be executed and combined Initial steps are linked using a selection coupling format When multiple initial steps SO to S3 are active the step where the transition condition t4 to t7 immediately prior to the selected coupling is satisfied becomes inactive and a transition to the next step occurs Moreover when the transition condition immediately prior to an active step is satisfied the next step is executed in accordance with the parameter settings The Basic model QCPU cannot be selected in the parameter It operates in the default Transfer mode e Want Transition to the next step occurs after waiting for the next step to become inactive e Transfer Transition to the next step occurs even if the next step is active Default e Pause An error occurs if the next step is active Linked steps can also be changed at each initial step 1 GENERAL DESCRIPTION MELSEC Q 5 Program design is easy due to a wealth of step attributes A variety of step attributes can be assigned to each step Used singly for a given control operation or in combination these attributes greatly simplify program design procedures e Types of HOLD steps and their operations 1 Coil HOLD step sc Transition condition is satisfied m Coil output is maintained i Timer maintains the count Step which is active due to transition condition be
121. is to be effective when a follow up function such as an operation HOLD step with transition check is used to execute a transition to a step which is already active 1 Settings and corresponding operations For a transition to an active step set any of STOP WAIT and TRANSFER in the block parameter of the FC setting dialog box in the Tools menu The operations resulting from these settings are shown below Setting e A CPU module operation error BLOCK EXE ERROR e A step range can be occurs and CPU module operation is stopped designated for the STOP e All Y outputs switch OFF setting e CPU module operation continues and a WAIT status is established when the transition condition is satisfied The WAIT status continues until the START destination step is A step range can be deactivated designated for the WAIT sl a transition WAIT occurs the previous step is setting deactivated the output is switched OFF and the operation output will not be executed e CPU module operation continues the transition occurs and the previous step is deactivated and absorbed by the transition destination step TRANSFER default Active step Inactive Condition satisfied Active step gt Active Condition satisfied 2 Transition to HOLD step by double START The following table shows the transition procedure for transitions to coil HOLD steps operation HOLD steps with transition check and operation HOLD steps without transit
122. ithin a single block 2 In the parallel transition format only jumps in the vertical direction are possible at each of the branches Example 1 Jump transition program in vertical direction from branch to coupling A program of a jump transition to another vertically branched ladder a jump transition for exiting from a parallel branch or a jump transition to a parallel branch from outside a parallel branch cannot be created Example 2 Program for exiting from parallel branch cannot be designated 4 Parallel transition LJ x Ld Jump transition 3 Do not specify a jump transition to the current step when the transition condition is satisfied as shown below Normal operation is not performed when a jump transition to the current step is designated 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 3 5 Precautions for creating operation output step transition condition programs This section explains the precautions for creating operation output step and transition condition programs 1 Step program a Step program expression method Since a step program cannot use contacts and instructions equivalent to contacts the operation output of an active step is executed when the transition condition is satisfied Also a step attribute is used to hold the output or continue operation when the step is activated A step program is expressed as a ladder circ
123. itsubishi products damages and secondary damages caused from special reasons regardless of Mitsubishi s expectations compensation for accidents and compensation for damages to products other than Mitsubishi products and other duties 5 Changes in product specifications The specifications given in the catalogs manuals or technical documents are subject to change without prior notice 6 Product application 1 In using the Mitsubishi MELSEC programmable logic controller the usage conditions shall be that the application will not lead to a major accident even if any problem or fault should occur in the programmable logic controller device and that backup and fail safe functions are systematically provided outside of the device for any problem or fault 2 The Mitsubishi general purpose programmable logic controller has been designed and manufactured for applications in general industries etc Thus applications in which the public could be affected such as in nuclear power plants and other power plants operated by respective power companies and applications in which a special quality assurance system is required such as for each Japan Railways company or the Department of Defense shall be excluded from the programmable logic controller applications Note that even with these applications if the user approves that the application is to be limited and a special quality is not required application shall be possible When considering use in a
124. later Do not exist data are stored as shown below b15 b14 b13 b12 bi1 b b9 b8 b7 b6 b5 b4 b3 b2 bi bO po on O 1 O 1 0 1 0 4 O 1 0 4 0 1 O 1 0 1 0 4 O 1 O 1 O 1 O 1 0 1 step No Information of block 2 Information of block 1 Corresponding ep S5 S4 None S2 Si SO S9 None S7 None S5 S4 S3 S2 b15 b14 b13 b12 bi b10 b9 b8 b7 b6 D b4 b3 b2 bi b0 o Le Le Le 1e Le Te Le Te forero S12 S11 S10 S9 S8 S7 Corresponding step No All turn to Os since blocks do not exist Information of block 2 5 If there is a nonexistent block in the data to be read the nonexistent block is omitted and the data of the next existing block are read Example When BMOV BL1 S2 DO K2 is executed in the following case e Block 1 The maximum step No is 10 S10 e Block 2 Nonexistent e Block 3 The maximum step No is 12 S12 e Block 4 The maximum step No is 15 S15 data are stored as shown below b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 bi bO po on O 1 O 1 0 4 0 4 0 1 0 4 0 1 O 1 0 1 0 4 0 4 O 1 O 1 0 1 OM step No Information of block 3 Information of block 1 Corresponding ee S5 S4 S3 S2 Si S0 S10 S9 S6 S7 S4 S5 S4 S3 2 b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 bi bO o or Le Ton Lor Jon Jor Lon Tor Jor Tor Jor Tor Jor Tor Ter SE S9 S8 S
125. lock No Function 1 Forced transition EXECUTE instruction s a A specified transition condition in a specified block is forcibly satisfied and an unconditional transition is executed at the step which precedes the condition User setting Continuous transition prevention Transition condition amp aSM324 Always ON Condition image by instruction execution b After execution of the instruction the forced transition status remains effective until a reset instruction is executed 2 Forced transition CANCEL instruction r a Cancels the forced transition setting designated by SET instruction at a transition condition and restores the transition condition ladder created by the user 3 Specify the transition condition as described below a In the case of SFC program e Use TRn when specifying the transition condition in the current block e Use BLm TRn when specifying the transition condition in another block b In the case of sequence program e Use BLm TRn when executing the forced transition EXECUTE CANCEL instruction in the sequence program e When the block number is not specified specify the block number with the BRSET instruction However the BRSET instruction cannot be used for the Basic model QCPU Block 0 is set when the block nomber is not specified for the Basic model QCPU 4 SFC PROGRAM CONFIGURATION MELSEC Q Operation Error e When the specified transition condition does not exist or
126. mer time limit 7 2 SD94 Corresponding lte Star 0 to 255 setting to SM94 1 to 255 sec System SD95 Corresponding ee S SE S 1 second units at error to SM95 Mee e The timer starts when any of SM90 to SM99 occurence SD96 Corresponding is turned ON during an active step and the to SM96 set annunciator F turns ON if the transition Corresponding condition following the corresponding step is SD97 ae rjc i LE to SM97 not satisfied within the timer time limit Corresponding ore to SM98 Corresponding Se to SM99 APP 9 APP 9 APPENDICES MELSEC Q APPENDIX 2 Restrictions on Basic Model QCPU and Replacement Methods This section explains the restrictions on use of a SFC program with the Basic model QCPU 1 Function comparison High Performance Model QCPU Item Basic Mode QCPU Process CPU QnACPU Replacement Method Step transition watchdog timer Not provided Appendix 2 1 Operation mode at block Not provided f S Provided double START Fixed to WAIT SFC Operation mode for f 8 Not provided operation transition to active step J f Fixed to TRANSFER mode setting at step double START Fixed cycle execution Not provided Provided Appendix 2 2 block setting Not provided Provided i D i p TRn rTRn Provided SCHG D Not provided Appendix 2 4 sBLm TRn f f kp Not provided Provided Appendix 2 3 SFC program for program execution Not provided Provided management N
127. n and without continuous transition The user specifies either of them by turning ON OFF the continuous transition bit e Continuous transition ON Continuous transition bit ON When the transition conditions at contiguous steps are satisfied all the steps transition conditions will be executed at once within a single scan e Continuous transition OFF Continuous transition bit OFF seraiciatartes Steps are executed in a 1 step per scan format Example Sample program processing aaa e Continuous transition ON E When the corresponding block becomes active the aSM400 Always ON processings of all steps are executed in the same scan and end step processing is performed to deactivate the block e Continuous transition OFF aSM400 Always ON When the corresponding block becomes active steps are executed in a 1 step per scan format and end step processing is performed in the third scan to deactivate the block aSM400 Always ON 2 A continuous transition can be designated for individual blocks by the continuous transition bit ON OFF setting or for all blocks using the batch setting special relay As indicated below whether a continuous transition is executed or not changes depending on the combination of the continuous transition bit and the special relay that sets whether continuous transition of all blocks is executed or not SM323 SM323 status Continuous Transition Bit Status SFC Program Operation e C
128. n the program setting of the PLC parameter dialog box have been executed Refer to the user s manual of the used CPU module for the detailed processing order of the programs other than the SFC program and their processings 6 SFC PROGRAM EXECUTION MELSEC Q 6 SFC PROGRAM EXECUTION 6 1 SFC Program START And STOP There are the following three types of SFC program start and stop methods e Auto START using PLC parameter e Start and stop using the special relay for SFC program start stop SM321 e Start and stop using the PSCAN POFF instruction except the Basic model QCPU e Start and stop using GX Developer 1 Auto START using PLC parameter Set the start condition in the SFC setting of the PLC parameter dialog box to Block 0 Auto START The SFC program is started when the CPU module switches from STOP to RUN When the SFC program starts block 0 also starts Qn H Parameter RB PLC name Pic system fe file fe RAS Device Program Boot fil SFC program start mode Initial start Resume start Start conditions Autostart block 0 C Do not autostart block 0 m Output mode when the block is stopped Tum OFF C Keep ON Acknowledge XY assignment Multiple CPU settings Default ierch End Cancel 2 Start and stop using the special relay for SFC program start stop SM321 SM321 turns ON when an Auto START is made using the PLC parameter a Turn OFF SM321 to stop the SFC
129. n the figure is executed d Every time the transition condition is satisfied in order the next step is executed and the block ends when the end step is executed 4 SFC PROGRAM CONFIGURATION 4 1 List of SFC Diagram Symbols The symbols used in the SFC program are listed below MELSEC Q Step Step Dummy step Coil HOLD step transition check Operation HOLD step without Operation HOLD step with transition check Reset step Block START step with END check Block START step without END check End step Steps other than initial step S ae Remarks Initial step oO Dummy initial step 0 E Coil HOLD initial step 0 PO Any of these steps in 1 block Operation HOLD step without When step No a Initial step at top left column 1 of ra mp 0 ISE Sup transition check initial step is O SFC diagram is fixed to No 0 Operation HOLD step with W n reset destination step No transition check initial step Reset initial step E Tel Initial step iQ Dummy initial step E i initi i Ed Soil HOLD Inia see When initial step Ei Up to 31 steps in 1 block Operation HOLD step without No is other than i se i step No 1 to 511 transition check initial step o n reset destination step No Operation HOLD step with i S transition check initial
130. n the output mode setting see Section 4 7 3 at the time of the block STOP designated in the SFC operation mode However an ON status will be maintained for coil outputs which were switched ON by the SET instruction POINTS 1 When the transition condition immediately before the corresponding step is satisfied or when the step is reactivated by a JUMP transition a transition will occur again when the transition condition is satisfied 2 Double STARTs do not apply to reactivated steps 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 2 6 Operation HOLD step with transition check An operation HOLD step with transition check is a step where the operation output processing of the corresponding step continues after a transition to the next step When the transition condition is satisfied again at the corresponding step transition processing to the next step reactivation is executed 1 During normal SFC program operation the coil ON status switched ON by OUT instruction when transition condition is satisfied is automatically switched OFF before proceeding to the next step When an operation output step is designated as an operation HOLD step with transition check the corresponding step will remain active after a transition to the next step and operation output processing will continue 2 The transition condition will be checked after the transition condition is satisfied and the next step is activated Hence when the
131. nation step becomes inactive a transition is executed and the transition destination step becomes active In a WAIT status the previous step is deactivated Active Inactive WAIT Inactive WAIT Inactive Transition Transition condition condition Transition satisfied WAIT Za a executed gt C Active 3 When setting is TRANSFER SE A transition is executed and the previous step becomes inactive Transition condition satisfied LJ LJ ed Transition 4 SFC PROGRAM CONFIGURATION MELSEC Q b When transition destination is parallel branch 1 When setting is STOP sie If any one of the transition destinations of the parallel branch is active an error occurs and the processing of the CPU module stops Transition destination gw O 2 When setting is WAIT See Execution waits until all the transition destination steps of the parallel branch become inactive When the transition destination steps all become inactive a transition is executed and all the first steps of the parallel branch become active In a WAIT status the previous step is deactivated Active Inactive Transition Inactive Inacti a er ge o iti i nactive Transition condition __ Transition conditions conditions L__ WAIT Transition satisfied WAIT status satisfied satisfied ae executed Aa E e Al active HD a ooo K Ss om g ge g 3 When setting is TRANSFER
132. nd 11 are used and blocks 10 and 11 are set as the fixed cycle execution blocks 1 scan 1 scan 1 scan 1 scan D D D D E E E E Ha Ra wn wn Blocks D Blocks Blocks amp Blocks D Blocks Blocks D 0 1 2 o 0 1 2 10 11 8 01 2 8 0 1 2 10 11 Q a a Q executed 5 executed executed 3 executed 5 executed executed 5 OI ui uw uw Execution interval d k Execution interval 2 Fixed cycle execution block replacement method When the execution interval measured by the timer in the sequence program reaches the set time the specified block is activated by the STOP RESTART bit When the set time is not reached the block is in a stop status To hold the output also when the block is in a stop status select Change OUT instruction in specified block to SET instruction or Coil output held for stop time output mode SM402 SM400 Set interval Tn Corresponding block STOP RESTART bit APP 12 APP 12 APPENDICES MELSEC Q APPENDIX 2 3 Forced Transition Bit TRn Replacement Method 1 Operation by forced transition bit The forced transition bit forcibly satisfies a transition condition When the forced transition bits are used the preset input conditions can be ignored and the transition conditions can be satisfied in due order Sequence program SFC program MO Jso User set transition _SETBLO TRO H condition M10 RS del Mi D User set transit
133. nditions xo AX Oe Soha EE X1 Ty 6 BEE 4 CU Ai aCO amp bX1 eset teers Er 4 MO CO aMO bT0 amp aCO SR TO Commands equivalent to contacts cannot be described in the step 1 GENERAL DESCRIPTION MELSEC Q 1 1 SFC Program Whole process The SFC program consists of steps that represent units of operations in a series of machine operations In each step the actual detailed control is programmed by using a ladder circuit Grouping steps into one block in process units allows to create an SFC program that is capable of tracking all the processes as well as structuring the operation flow in each process Process flow chart SFC diagram Operation output transition condition Workpiece Initial step detection T a START switch Workpiece detection Tanemon aX0 amp aX1 condition 0 Conveyor START step 1 oY20 1 operation unit Transition e Pallet detection conditioni Pallet clamp Workpiece step 2 oY21 1 operation unit loading _ e Transition re Clamp confirmation condition2 4 Drill rotation D Drilling step 3 oY22 PLS MO e operation unit operation J Transition condition 3 Du Drill DOWN D step 4 sY23 1 operation unit ei Drill DOWN endpoint a Transition D ax4 condition 4 Drill Down stop 7 step 5 rY23 oT0 K20 gt 1 operation unit TT J a Workpiece unloaded confirmation Transition SE aX7 condition n END step Machining
134. nformation Function Outline Usable High Performance Device Device model model QCPU Process CPU QnACPU e Device designed to forcibly start or forcibly end the specified block by a sequence program or the test operation of the peripheral device e Can also be used to confirm the active status of the specified block e Device that checks whether or not a step transition Step transition bit occurred in the corresponding scan in the specified block RESTART bit corresponding block that is active e Device used to specify whether all steps will be Block STOP mode immediately stopped or the block will be stopped after bit the transition of the corresponding step when the block is stopped temporarily e Device used to specify whether the operation output of the next step will be executed within the same scan or not when the transition condition is satisfied Number of active e Device that stores the number of steps currently active in D W steps register the specified block R ZR Usable When using the SFC information devices set them in Block information setting at the input editing of the SFC diagram When the SFC information devices are not used they need not be set Block START END bit Continuous transition bit Block information setting x Block No 0 Block title Operation start preparation blod a Block START END bit MO t Step transition bit M s Block PAUSE RESTART bit M2 m Pause
135. nly the outline refer to the user s manual of the used CPU module for details 5 1 1 Whole program processing sequence The Basic model QCPU can create and execute two programs Sequence program and SFC program in the program memory Two sequence programs or two SFC programs cannot be created A SFC program for program execution management cannot be created either CPU module RUN Sequence 5 program MAIN gt Executed every scan Execution order cannot be changed SFC program MAIN SFC a The execution types of the sequence program and SFC program are fixed to the scan execution type The execution types of the sequence program and SFC program are fixed b The Basic model QCPU executes the SFC program after execution of the sequence program The execution order of the sequence program and SFC program is fixed c The file name of the sequence program is fixed to MAIN Also the file name of the SFC program is fixed to MAIN SFC When both the sequence program and SFC program exist in the program memory both programs are executed Delete the programs which will not be executed from the program memory When ROM operation is performed delete the programs which will not be executed from the standard ROM 5 SFC PROGRAM PROCESSING SEQUENCE MELSEC Q 5 2 Whole Program Processing of High Performance Model QCPU Process CPU This section explains the whole program proc
136. nsition condition satisfied step processing time coefficient lt number of transition condition satisfied steps e Transition condition satisfied step processing time Time required to perform OFF execution of active processing steps time e Number of transition condition satisfied steps Number of steps where operation outputs are turned OFF since transition conditions were satisfied in all blocks SFC end processing time SFC end processing time processing e SFC end processing time System processing time required to perform the end processing of SFC time 3 SPECIFICATIONS MELSEC Q 2 System processing times for different CPU module models a When Basic model QCPU is used Active step processing time coefficient Active transition processing time coefficient Transition condition satisfied With HOLD step 216 0us 182 8 140 6us step processing time designation coefficient Normal step designation 262 bus 222 9us 171 5us Bes end processing time 66 8uUs 56 5us 43 5us b When High Performance model QCPU or Process CPU is used High Performance model QCPU Process CPU E Active step processing time coefficient 24 bus 10 6us 10 6us Active transition processing time coefficient Transition condition satisfied With HOLD step 130 4us 56 2us 56 2us step processing time designation coefficient Normal step designation 119 4uUs SFC end processing time 108 2us 46 6us 46 6us x HOLD steps include both coil HOLD
137. nsk yandex ru RUSSIA SSMP Rosgidromontazh Ltd RUSSIA 23 Lesoparkovaya Str RU 344041 Rostov On Don Phone 7 8632 36 00 22 Fax 7 8632 36 00 26 e mail STC Drive Technique Poslannikov per 9 str 1 RU 107005 Moscow Phone 7 095 786 21 00 RUSSIA INEA doo SLOVENIA Fax 7 095 786 21 01 Stegne 11 e mail info privod ru SI 1000 Ljubljana Phone 386 0 1 513 8100 Fax 386 0 1 513 8170 MIDDLE EAST REPRESENTATIVE e mail inea inea si Beijer Electronics AB SWEDEN SHERF Motion Techn Ltd ISRAEL Box 426 Rehov Hamerkava 19 S 20124 Malm IL 58851 Holon Phone 46 0 40 35 86 00 Phone 972 0 3 559 54 62 Fax 46 0 40 35 86 02 Fax 972 0 3 556 01 82 e mail info beijer de e mail ECONOTEC AG SWITZERLAND Postfach 282 CH 8309 N rensdorf AFRICAN REPRESENTATIVE Phone 41 0 1 838 48 11 Fax 41 0 1 838 48 12 CBI Ltd SOUTH AFRICA e mail info econotec ch GTS TURKEY Dar laceze Cad No 43A KAT 2 TR 80270 Okmeydani Istanbul Phone 90 0 212 320 1640 Fax 90 0 212 320 1649 e mail gts turk net Private Bag 2016 ZA 1600 Isando Phone 27 0 11 928 2000 Fax 27 0 11 392 2354 e mail cbi cbi co za A MITSUBISHI ELECTRIC INDUSTRIAL AUTOMATION Gothaer Strasse 8 D 40880 Ratingen Phone 49 2102 486 0 Hotline 49 1805 000 765 Fax 49 2102 486 7170 www mitsubishi automation de megfa mail meg me
138. nty term the product shall be repaired at no cost via the dealer or Mitsubishi Service Company Note that if repairs are required at a site overseas on a detached island or remote place expenses to dispatch an engineer shall be charged for Gratis Warranty Term The gratis warranty term of the product shall be for one year after the date of purchase or delivery to a designated place Note that after manufacture and shipment from Mitsubishi the maximum distribution period shall be six 6 months and the longest gratis warranty term after manufacturing shall be eighteen 18 months The gratis warranty term of repair parts shall not exceed the gratis warranty term before repairs Gratis Warranty Range 1 The range shall be limited to normal use within the usage state usage methods and usage environment etc which follow the conditions and precautions etc given in the instruction manual user s manual and caution labels on the product 2 Even within the gratis warranty term repairs shall be charged for in the following cases 1 failure occurring from inappropriate storage or handling carelessness or negligence by the user Failure caused by the user s hardware or software design 2 Failure caused by unapproved modifications etc to the product by the user 3 When the Mitsubishi product is assembled into a user s device failure that could have been avoided if functions or structures judged as necessary in the legal safety measu
139. occurrence SD19 SD20 Extension 4 2EH SD22 SD21 ASCII code 3 characters SD22 Pattern5 SD23 Block No SD24 Step No transition No SD25 Sequence step No L SD23 SD26 Sequence step No H 5 Pattern data definitions 1514 to 4 3 2 1 0 Bit number Din to ojojx x kl Not used ts SFC block specified 1 not specified 0 SFC step specified 1 not specified 0 SD24 SFC transition specified 1 not specified 0 4 Parameter No 5 Annunciator No 6 Intelligent function module parameter error Meaning Meaning Number Meaning Parameter No 6 No SD16 Parameter No 6 SD17 Error code for intelligent function module SD18 SD19 Vacant Vacant 020 SD21 SD25 SD22 Vacant SD23 SD24 SD25 SD26 Sp For details of the parameter No refer to the user s manual function explanation program fundamentals of the used CPU module APPENDICES MELSEC Q Compatible CPU Setting Side Name Content Description Setting Timing SD90 Corresponding Set the set time of the step transition watch to SM90 dog timer and the annunciator No F No Corresponding that will turn ON at time out of the watch dog SD91 l to SM91 timer b15 to b8 b7 to bO Basic model QCPU High Performance model QCPU Process CPU Corresponding to SM93 F number setting Ti
140. on of that step s program operation 4 This instruction can only be used at SFC program steps Operation Error e Error No 4631 occurs when the specified destination step does not exist e Error No 4001 occurs when this instruction is used at a Sequence program other than an SFC program error is activated on switching from STOP to RUN Program Examples 1 The following program causes a transition as is when X10 has turned ON before X1 turns ON and deactivates step 5 and activates step 6 when X1 has turned ON before X10 turns ON The program created with MELSAP3 is as shown below E Eas sH Here X10 Hi 4 SFC PROGRAM CONFIGURATION MELSEC Q QCPU PoC CPUS PEC CPU Process CPU ee High Performance 4 4 11 Block switching instruction BRSET Usable Devices Programs Fees Instructions Execution Site l Devi i nternal Device 7 f Data SFC E Vo System User i LA EH Expansion Sequence Transition Julia z Constant Other Type Block Step Se id SFC Program Condition Bit Word PAG p Benen rae Condition ae HE Function 1 Switches the target block number of the SFC control instruction that specifies only a step Sn and transition condition TRn to the number set for the device designated by 2 Although BLm Sn or BLm TRn may be used as the instruction device when designating the destination block number only a constant K H may be designated at the m of Dm
141. ontact and coil are Decimal bit devices Hexadecimal e Exclusively for SFC program Decimal D uZ EES SIS E 6 om lr Sls lo 3 o Jo rr n KR 8 12 m N IN T Hexadecimal H _ SO to S511 1 block total of Step relay Bit i ecimal 8192 points for all blocks 3 SPECIFICATIONS MELSEC Q User Link input JO X0 to JO XO1FFF Link output Mun JO YO1FFF SEN exist in each link Link direct Link relay JO BO to JO BOSFFF module MELSECNET 10 L ink special relay J O SBO to JO SBO7FF Hexadecimal O indicates the MELSECNET H i ink register Link Link register Bi O WO to J O WO3FFF network No any of Link ial Word gi e Exist in each special Fixed function depending module intelligent on Buffer register Word O GO to J O G65535_ Decimal intelligent function module g e O indicates the I O function No 16 any of 0 to module OFF Index register Index register Word Z0 to Z15 e When block RO to R382767 Decimal GERS i i switching is used File register File register Word Fixed e When serial No is ZRO to ZR1042431 Decimal d use PO to P8191 SFC block BLO to BL319 TRO to TR511 block e Exclusively for SFC Total of 8192 points for all Decimal program blocks Network No J1 to J239 J254 GE NO Wee o to UOFF Decimal constant constant K to K2147483647 ae SFC transition device wwen to HOFFFFFFFF ae ae number E 1 17550
142. ontinuous transition bit OFF e Operation occurs without continuous transition e No continuous transition bit setting sm 3 e Operation occurs with continuous transition e Continuous transition bit ON H e Continuous transition bit OFF f S i at 3 S e Operation occurs without continuous transition e No continuous transition bit setting e Continuous transition bit ON e Operation occurs with continuous transition The tact time can be shortened by setting with continuous transition This resolves the problem of waiting time from when the transition condition is satisfied until the operation output of the transition destination step is executed However when with continuous transition is set the operations of the other blocks and sequence program may become slower 4 SFC PROGRAM CONFIGURATION MELSEC Q 3 The continuous transition disable flag SM324 is always ON turned ON automatically by the system at SFC program execution normally but is OFF during continuous transition Use of SM324 under the AND condition in a transition condition disables a continuous transition Example SFC program el aM sl aM sl aM0 amp aSM324 S4 Operation 1 When MO is ON step 1 to step 4 are the targets of continuous transition 2 Since SM324 is added as the AND condition to the transition condition following step 3 the transition condition following step 3 is not satisfied after execution of s
143. or the relevant step are satisfied again SE K100 f Operation is continued after the transition condition is satisfied TO 1 to 100 Transition is not executed again to transition condition Step which is active due being satisfied 3 An operation HOLD step without transition check becomes inactive when any of the following occur a When the END step of the block in question is executed b When an SFC control instruction rBLm designates a forced END at the block in question c When the corresponding step is reset by the SFC control instruction rBLm Sn rSn Except when SM327 is ON d When the device designated as the block START END device of the SFC information devices is reset e When a reset step for resetting the step in question becomes active f When S999 is designated at the reset step in the same block g When the SFC START STOP command SM321 is switched OFF 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 Block STOP processing The following processing is performed when a block STOP request is issued to the corresponding block using the STOP RESTART bit of the SFC information devices or the block STOP instruction of the SFC control instructions e STOP status timing A STOP status is established after the block STOP request output occurs and processing returns to the beginning of the block in question e Coil output A coil output OFF or HOLD status will be established depending o
144. ot provided Program execution type setting i i Provided Fixed to scan execution type APP 10 APP 10 APPENDICES MELSEC Q APPENDIX 2 1 Step Transition Watchdog Timer Replacement Method 1 Operation of step transition watchdog timer The step watchdog timer measures the ON time of the special relay for step transition watchdog timer start SM90 to SM99 and when it exceeds the time set to the special register for step transition watchdog timer setting SD90 to SD99 the corresponding annunciator F set to any of SD90 to SD99 is turned ON The following figure shows a step transition watchdog timer program SO sl b15 b8 b7 bO sof oSM90 sD i i S3 L ON while active F CR Timer time limit setting Turns OFF when transition 0 to 255 0 to 255s condition is satisfied 1s unit 2 Step transition watchdog timer replacement method When performing the same operation as that of the step transition watchdog timer create the following program at the operation output S1 L oT0 Km m Watching time unit 10ms Ir aT0 t2 el Togo S3 D t4 APP 11 APP 11 APPENDICES MELSEC Q APPENDIX 2 2 Fixed Cycle Execution Block Replacement Method 1 Operation of fixed cycle execution block A fixed cycle execution block is executed in each scan where the specified execution interval has elapsed The following figure shows the operation performed when blocks 0 1 2 10 a
145. ous transition is set the operations of the other blocks and sequence program may become slower Refer to Section 4 5 5 for details of continuous transition 5 SFC PROGRAM PROCESSING SEQUENCE MELSEC Q 1 Transition processing for continuous transition OFF setting The SFC program processing procedure without continuous transition will be explained 1 Active step n instruction operation ro Cla Xo 2 Transition condition satisfied unsatisfied check a n 1 oY11 Y Ra GC transition condition When transition condition f is unsatisfied is satisfied v 3 END processing 3 The active step n is deactivated and the coil If other blocks exist subsequent the block where the OUT instruction is ON is switched OFF in question END processing will be executed l after those blocks have been processed 4 END processing If other blocks exist subsequent the block in question END processing will be executed Y after those blocks have been processed 4 Instruction operation for the same step n as that at the previous scan k 5 Instruction operation of the step n 1 next to the step which is deactivated at the previous scan END processing is performed after all the program files set to the scan execution type in the program setting of the PLC parameter dialog box have been executed Refer to the user s manual of the used CPU module for the detailed processing order of the pro
146. output executed Step 1 _ Transition condition b Transition condition a satisfied Step 2 a Transition condition c Step 3 Transition condition d END step Initial step operation output deactivated Step 1 operation output executed Transition condition b satisfied Step 1 operation output deactivated Step 2 operation output executed Transition condition c satisfied YES x1 Step 2 operation output deactivated Step 3 operation output executed Transition condition d satisfied YES 1 Step 3 operation output deactivated END step executed operation completed x1 For steps with attribute designations processing occurs in accordance with the attributes 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 3 2 Selection transition A selection transition is the transition format in which several steps are coupled in a parallel manner with processing occurring only at the step where the transition condition is satisfied first e From step n processing will proceed to either BR Step n step n 1 or step n 2 depending on which operation output A transition condition b or c is satisfied first e If both transition conditions are satisfied simultaneously the condition to the left will take precedence Step n will then be deactivated e Subsequent proc
147. output status setting designated by OUT instruction ree Peer Setting o peration Status of Held step DER SOP INS EH ERR p Coil HOLD step SC step without step with transition Mode Bit S Sen is not satisfied PEG Parameter Ee transition check SEI check ST OFForno e Immediately after a STOP request is made setting the coil output of the operation output is turned immediate OFF and the block is stopped e Turns OFF e The status remains active coil output e OFF e Normal operation is performed until the OFF coil transition condition is satisfied e Remains ON output e When the transition condition is satisfied the e output OFF STOP after end processing of the corresponding step is eld transition performed At the same time the transition destination step becomes active and the block is stopped before execution of the operation output OFF orno e Immediately after a STOP request is made setting the block is stopped with the coil output of the immediate operation output being held e The status remains active e ON e Normal operation is performed until the coil transition condition is satisfied output e When the transition condition is satisfied the held STOP after end processing of the corresponding step is transition perfonied e SH At the same time the transition destination step becomes active and the block is stopped before execution of the operation output e Immediately after a STOP req
148. ove methods Program Change by Write to PLC Program Change Change Type PAUSE STOP status RUN status 1 by Online Change SFC program addition SFC block addition deletion Step transition addition deletion SFC diagram Transition destination change change Step attribute change Operation output sequence program Change in change SFC diagram Transition condition sequence program change Block data change Possible x Impossible 1 Can be executed only when the following CPU module and GX Developer are used e CPU module High Performance model QCPU whose first five digits of serial No are 04122 or later e GX Developer Version 8 or later 6 SFC PROGRAM EXECUTION MELSEC Q 1 Operation at program change made by write to PLC a When program was written with CPU module in PAUSE STOP status 1 Program start after write to PLC An initial start is performed independently of the SFC start mode setting initial start resume start Depending on the SFC program change however an initial start is not made but a resume start may be made at the resume start setting Refer to Section 4 7 1 for details of the SFC program start mode 2 Device status at program start At a program start after write to PLC the CPU module devices operate as described in the following table depending on the setting of the SFC device clear mode setting flag SM326 Operation SM326 Other than step rela SFC program
149. p INV When SFC program XYZ is deactivated execution proceeds to S3 t3 PCHK ABC amp INV When SFC program ABC is deactivated execution proceeds to S4 S3 PSCAN ABC SFC program ABC is changed into a scan execution type program S4 PSCAN XYZ SFC program XYZ is changed into a scan execution type program t4 PCHK ABC When SFC program ABC is activated execution proceeds to the end step t5 PCHK XYZ When SFC program XYZ is activated execution proceeds to the end step 5 SFC PROGRAM PROCESSING SEQUENCE MELSEC Q 5 3 SFC Program Processing Sequence 5 3 1 SFC program execution The SFC program is executed once per scan 1 Basic model QCPU The Basic mode QCPU executes a sequence program and then executes a SFC program The program execution status is shown below under the following condition Condition 1 SFC program Set to Auto START ON Program execution STOP RUN Power ON RUN END m processing i i i Program 0 Scan END 1 A Scan END 1 D Scan END O Scan MAIN A aik E Program Y Scan 4 Y Scan Scan MAIN SFC i fae eed TY i SFC program i SFC program l SFC program execution r execution i execution i L Scan time gt 5 SFC PROGRAM PROCESSING SEQUENCE MELSEC Q 2 High Performance model QCPU Process CPU QnACPU The High Performance model QCPU Process CPU and QnACPU can execute multiple programs stored in the program
150. pecified for the Basic model QCPU 4 If the transition condition in question does not exist in the SFC program it will remain OFF Program Examples 1 The following program checks the status of step 5 in block 3 and turns ON Y20 when step 5 becomes active When step is designated by operation output of block 3 aS5 oY20 When step is designated by operation output of other than block 3 aBL3 S5 oY20 When step is designated by sequence program BL3 5 Y20 4 SFC PROGRAM CONFIGURATION MELSEC Q 2 The following program executes a step synchronously with another step of a parallel branch as a el s sel aal 1 aS20 amp ban s Related Instructions 1 SFC control instructions e Block switching instruction DPRGET See Section 4 4 11 e Step control instruction CHOCO See Section 4 4 10 e Active step batch readout instruction MOV P DMOV P BMOV P neseser See Section 4 4 4 Section 4 4 5 x Indicates that X0 is used as a user interlock condition 4 SFC PROGRAM CONFIGURATION MELSEC Q QCPU PECICPU Process CPU Basic High Performance pe 0 _ ff 6 4 4 2 Forced transition check instruction a b Aa amp b la Ib Usable Devices Programs Using Instructions Execution Site Internal Device MPESEONET Special 10 H Direct EE Expansion Data SFC Program el System User D d Other Sequence Transition
151. problems involving industrial property ights which may occur as a result of using the contents noted in this manual 2000 MITSUBISHI ELECTRIC CORPORATION INTRODUCTION Thank you for purchasing the Mitsubishi MELSEC Q QnA Series of General Purpose Programmable Controllers Before using the product please read this manual carefully to develop full familiarity with the functions and performance of the Programmable Controller Q QnA Series you have purchased so as to ensure correct use Please be sure to deliver this manual to the final user CONTENTS 1 GENERAL DESCRIPTION 1 1to1 9 Ved SG PEO OMA DEE 1 3 12 SFEC MELSAP L Fe atures chase eege ve AE e a A eine anita eee eee eae 1 4 2 SYSTEM CONFIGURATION 2 1to2 2 Ia SPECIFICATIONS 3 1to 3 14 3 1 Performance Specifications Related to SFC Programs ssssesssesesesisssrersnsrsrnsrsrrnsrsrsrusnsrnsnsrnrnsrnnnens 3 1 3 1 1 Performance specifications of Basic Model OCDE 3 1 3 1 2 Performance specifications of High Performance model QCPU and Process CDU 3 3 BIA DOViCS EE 3 5 3 2 1 Device list of Basic model OCH 3 5 3 2 2 Device list of High Performance model QCPU and Process CDU 3 7 3 3 Processing Time for SFC Program ceccesceeeeeeeeceeseesecaeceeeeaesaecaeseeeeaesaecaeeeeeeaesaeseeseaesaesaeseeeeaneeseeteateaes 3 9 3 4 Calculating the SFC Program Capacity cccceccesceseeseceeceeeeseeaeceeeeeeeaecaeceeseeeaeseeseaesaesaeseeseaseaesaeeeeseaeeaees 3
152. pt cyclic interval is loaded into a High Performance model QOPU of which the first 5 digits of the serial number are 04012 or later e Step transition watch dog timer see Section 4 6 e Periodic execution block setting see Section 4 7 4 2 The Qn H CPU A A mode cannot use MELSAP L explained in this manual 1 GENERAL DESCRIPTION MELSEC Q 1 When created with MELSAP L and ladders a MELSAP L side b Sequence programs side The flow of operation is easy to understand by The area can be developed into a product by creating the SFC program related to the interlock creating interlock conditions irrelevant to the flow of conditions operation Upper Emergency Can be created Step axo Ascent Descent limit stop Aseni Describe steps Start er tere Papar and complicated gt oM70___ 7 Ree E interlock conditions Ascent Lower Emergency i using a ladder axi Descent Ascent limit stop Descent Upper limit sl i oM80 7 Descent ax2 Lower limit 2 Description format with MELSAP L The description format in the step and transition MELSAP L display screen conditions with MELSAP L is shown b Example Bors Ai EEE St ep SEI K30 of k n TO fe 2 DMOV K10 WO DMmov K10 wo OMO secre eect eeees Mo Transition co
153. r START corresponds to SD99 SFC program presence absence SFC program SMe START STOP SM322 SFC program START status block i SM323 All bloc s continuous transition status OFF Without SFC program ON With SFC program OFF SFC program not executed stop ON SFC program executed start OFF Initial START ON Resumptive START OFF Continuous transition enabled Continuous transition disabled ON OFF After transition ON Before transition Continuous transition disable flag APP 2 Switched ON to begin the step transition watch dog timer count Watch dog timer is reset when switched OFF ON if an SFC program has been registered e OFF if an SFC program has not been registered The same value as in SM320 is set as the default value Automatically switches ON when the SFC program exists e When this relay is switched from ON to OFF the SFC program execution is stopped e When this relay is switched from OFF to ON the SFC program execution is restarted The SFC program start mode set in the SFC setting of the PLC parameter dialog box is set as the default value At initial start OFF At resume start ON e Set whether a continuous transition will be performed or not for the block where the continuous transition bit of the SFC information devices has not been set e OFF during operation in the with continuous transition mode or during continuous transition and ON w
154. ranching coupling 4 sequence steps for transition START instruction TRAN _ TRn and transition destination instruction TSET Sn 2 For parallel branching Total number of steps for the transition START instruction TRAN TRn and transition destination instructions TSET Sn for the number of parallel branches in question 3 For parallel coupling Total number of steps for the transition START instruction TRAN TRn and the transition destination instructions TSETSn and coupling check instructions TAND Sn for the number of parallel branchings in question 1 e Jump L end step Li Calculated as step 0 because it is included in the previous transition condition e Operation outputs for each step The capacity per step is as follows e Total number of sequence steps for all instructions For details regarding the number of sequence steps for each instruction refer to the QCPU Q mode QnACPU Programming Manual Common Instructions e Transition conditions The capacity per transition condition is as follows e Total number of sequence steps for all instructions For details regarding the number of sequence steps for each instruction refer to the QCPU Q mode QnACPU Programming Manual Common Instructions 3 SPECIFICATIONS MELSEC Q 2 Number of steps required for expressing the SFC diagram as SFC dedicated instructions The following table shows the number of steps required for expressing the SF
155. res the user s device is subject to or as necessary by industry standards had been provided 4 Failure that could have been avoided if consumable parts battery backlight fuse etc designated in the instruction manual had been correctly serviced or replaced 5 Failure caused by external irresistible forces such as fires or abnormal voltages and failure caused by force majeure such as earthquakes lightning wind and water damage 6 Failure caused by reasons unpredictable by scientific technology standards at time of shipment from Mitsubishi 7 Any other failure found to not be the responsibility of Mitsubishi or the user 2 Onerous repair term after discontinuation of production 1 Mitsubishi shall accept onerous product repairs for seven 7 years after production of the product is discontinued Discontinuation of production shall be notified with Mitsubishi Technical Bulletins etc 2 Product supply including repair parts is not possible after production is discontinued 3 Overseas service Overseas repairs shall be accepted by Mitsubishi s local overseas FA Center Note that the repair conditions at each FA Center may differ 4 Exclusion of chance loss and secondary loss from warranty liability Regardless of the gratis warranty term Mitsubishi shall not be liable for compensation to damages caused by any cause found not to be the responsibility of Mitsubishi chance losses lost profits incurred to the user by failures in M
156. ruction at the executed steps are all turned OFF When the next scan is executed the operation output of the next step is executed At this time the operation output of the step executed previously is deactivated unexecuted The CPU module processes only the program of the operation output of the currently active step and the transition condition to the next step Example The execution sequence from a program start till a transition from the initial step to step 1 is as shown below CPU module RUN END processing END processing END processing I SM321 ON SM321 ON SM321 ON Initial step Initial step Step 1 operation operation operation output output output executed executed executed SFC program Block 0 Transition condition Transition condition Transition condition unsatisfied satisfied unsatisfied e The step whose attribute has been set to a HOLD step is not deactivated unexecuted Processing continues according to the set attribute 5 SFC PROGRAM PROCESSING SEQUENCE MELSEC Q 5 3 4 Continuous transition ON OFF operation There are two types of SFC program transition processing with continuous transition and without continuous transition Set with continuous transition or without continuous transition using the continuous transition bit of the SFC information devices When the device set to the continuous transition bit is turned ON OFF by the user operation is performed as described
157. s Execution Site s BLm Sn rOBLmSn t m is a block No E m is a block No Function 1 Step START instruction s a A specified step at a specified block is activated forcibly Operation at the block in question varies as follows depending on whether the block is active or inactive 1 When the specified block is inactive The specified block is activated when the instruction is executed and processing starts from the specified step Processing is performed as shown below when step 1 in block 1 is started in the sequence program Block 1 Inactive Block 1 Inactive to active so ent When step 1 S1 Si Inactive is started S1 Inactive to active processing starts from S1 S2 Inactive S2 Inactive When the block START END bit of the SFC information devices has been set the corresponding bit device changes from OFF to ON 4 SFC PROGRAM CONFIGURATION MELSEC Q 2 When the specified block is active If the step is already active when the SET instruction is executed the step will remain active and processing will continue with another step being designated as active Multiple step activation follow up function Processing is performed as shown below when step 1 in block 1 is started in the sequence program Block 1 Active Block 1 Active so L sof When step 1 S1 S1 Inactive is started S1 GH Inactive to active Les att gt Multiple steps active Follow up function S2
158. s shown below an SFC program consists of an initial step transition conditions intermediate steps and an END step The data beginning from the initial step and ending at the END step is referred to as a block Step 0 S0 Initial step i Transition condition 0 t0 Transition condition Step 1 S1 Step 4 Transition condition 1 t1 Transition condition gt Block Step 2 S2 lt Step 1 i ile lt End step J 2 An SFC program starts at an initial step executes a step following a transition condition in due order every time that transition condition is satisfied and ends a series of operations at an end step a When the SFC program is started the initial step is executed first While the initial step is being executed whether the transition condition following the initial step transition condition 0 tO in the figure has been satisfied or not is checked b Only the initial step is executed until transition condition 0 t0 is satisfied When transition condition 0 t0 is satisfied the execution of the initial step is stopped and the step following the initial step step 1 S1 in the figure is executed While step 1 S1 is being executed whether the transition condition following step 1 transition condition 1 t1 in the figure has been satisfied or not is checked c When transition condition 1 t1 is satisfied the execution of step 1 S1 is stopped and the next step step 2 S2 i
159. s stopped If switched OFF during a trace execution the trace operation is stopped e ON when step trace execution System is in progress and OFF when status tracing is completed or stopped change e Switches ON when a trigger condition is satisfied at any of the blocks where the step trace function is being executed Normal SFC program Not executed execution status Being executed S status change Not ready Step trace ready status Ready Trace STOP Trace START Step trace START Step trace execution Trace inactive flag Trace active OFF Trigger Post trigger step trace unsatisfied ON Trigger satisfied System status change OFF Block with unsatisfied trigger Switches ON when trigger exists conditions are satisfied at all ON Triggers at all blocks where the step trace blocks are function is being executed satisfied System status change Post trigger step trace Switches ON when step tracing OFF Trace START is completed at all the specified ON Trace END blocks and switches OFF when step tracing begins System status change Step trace END flag ZS Applicable to the one whose first five digits of serial No are 04122 or later APP 4 APP 4 APPENDICES MELSEC Q APPENDIX 1 2 SD Special Registers Compatible CPU Setting Side Content Description Setting Timing Basic model QCPU High Performance model Process CPU e The error co
160. se BLm Sn when specifying the step in another block in the SFC program b In the case of sequence program 1 Use BLm Sn when executing the step activation check instruction 2 When the block number is not specified specify the block number with the BRSET instruction 4 If the transition condition in question does not exist in the SFC program it will remain OFF Program Examples 1 The following program turns ON Y20 when transition condition 5 of block 3 is specified for a forced transition When step is designated by operation output of block 3 aTR5 oY20 When step is designated by operation output of other than block 3 aBL3 TR5 oY20 When step is designated by sequence program BL3 TR5 Y20 Related Instructions 1 SFC control instructions e Transition control instructions sTRn sBLm TRn PTE RA zblmet ps ies ecie oiia aana tetanosa baat See Section 4 4 9 e Block switching instruction DPRGETT See Section 4 4 11 4 SFC PROGRAM CONFIGURATION MELSEC Q QCPU PCCP REG GPU Process CPU Basic High Performance RS E ee EES First five digits of serial No are 04122 or later 4 4 3 Block operation status check instruction a b amp a amp b la Ib Usable Devices Internal Device i File H Di d SFC Program System User K mary Sequence ae Ju Ss E Program Transition Block ee Condition Ste Transition P Condition
161. sfied at the waiting steps processing will proceed to step n 2 e Waiting steps are dummy steps which require no operation output ladder 1 Up to 32 steps can processed simultaneously with the parallel transition format Step Step n 2 n 3 Step n 32 Up to 32 steps 4 SFC PROGRAM CONFIGURATION MELSEC Q 2 If another block is started by the parallel processing operation the START source block and START destination block will be executed simultaneously In the example below processing from step n 1 will be executed simultaneously with block 1 Block 0 Step n Transition condition b Step n41 Block 1 START Transition Transition condition condition When condition b is satisfied at step n Gal execution processing will proceed to step n 1 and block 1 will be started Blocks 0 and 1 will then be processed simultaneously 3 The following table indicates the number of steps that can be executed simultaneously in all blocks and the maximum number of active steps in a single block If the number of simultaneously processed steps exceeds the value in the following table an error occurs and the CPU module stops processing Number of Simultaneously Maximum Number of Active CPU Module Model name EE Processed Steps Steps in Single Block 1024 steps 128 steps High Performance model QCPU 1280
162. specified step the reset step execute the operation output with the same functions as a normal step without step attributes When a reset step is Sn R activated a specified step is deactivated SR reset 1 When deactivating only the designated step Set the step number to be deactivated to the specified step number Sn 2 When deactivating all the held steps Set 999 to the specified step number Sn When the number of the specified step is 999 all held steps of the coil HOLD steps operation HOLD steps without transition check and operation HOLD steps with transition check in the current block are batch deactivated POINT Only held steps can be deactivated by the reset step The following steps are not the targets of the reset step e HOLD steps that are active but not held e Steps that are not specified as the HOLD steps 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 2 8 Block START step with END check H A block START step with END check is the step where the specified block is started and when the START destination block is then deactivated the check of the transition condition to the next step is started 1 The operation of the block START step with END check is described below a When activated the block START step with END check starts the specified block b No processing is performed until the START destination block is deactivated after its execution has ended c When the START
163. st occurs by one of When the Start conditions is designated as Autostart block 0 Block 0 the methods described in Section 6 2 1 ther than block 0 6 SFC PROGRAM EXECUTION MELSEC Q 6 3 Block Temporary Stop and Restart Methods 6 3 1 Block STOP methods The temporary block STOP methods which can be used during SFC program execution are described below 1 Block STOP methods The methods for temporarily stopping a block during SFC program operation are shown below STOP Method Operation Description e Using an SFC control instruction a specified block is temporarily stopped from an SFC program step operation output or from Block STOP by SFC another sequence program control instruction Condition e Convenient for temporarily stopping operation at error detection etc in order to correct the error by manual operation The manual operation control program can be PAUSE BLm placed at another block which is forcibly mis the block No started when the block STOP occurs e The execution of the specified block is temporarily stopped by forcibly turning ON the block STOP RESTART bit which was set to each block as the SFC information device in the program or peripheral device e Convenient for confirming operation by step control at debugging and test operations because block processing can be stopped from a peripheral device without requiring a program STOP by SFC information device
164. step Reset initial step e Up to 512 steps in 1 block including initial step 128 steps for Basic model QCPU i step No 1 to 511 n reset destination step No m movement destination block No More than one step can be used in 1 block 4 SFC PROGRAM CONFIGURATION Transition Serial transition SFC Diagram Symbol MELSEC Q Remarks Selection branching Selection coupling Selection coupling parallel branching Parallel branching Parallel coupling Parallel coupling parallel branching Parallel coupling selection branching Selection branching parallel branching Parallel coupling selection coupling a b Transition condition No Jump transition a Transition condition No j jump destination step No 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 2 Steps Steps are the basic units for comprising a block and each step consists of operation outputs 1 The following table indicates the number of steps that can be used in one block Maximum Number of Steps in Maximum Number of Steps in CPU Module Type One Block All Blocks Basic model QCPU 128 steps 1024 steps High Performance model QCPU S 512 steps 8192 steps Process CPU 2 Serial step numbers are assigned to the steps in creation order at the time of SFC program creation The user can specify the step numbers to change them within the range o
165. step other than held step 5 rek steh STOT Block Stop in Block Stop Mode pn including HOLD step whose transition condition p p Kom Coil HOLD step SC step without step with transition PEC Parameter ee EE transition check SE check ST OFF or no e Immediately after a STOP request is made setting the coil output of the operation output is turned immediate OFF and the block is stopped e Turns OFF e The status remains active coil output e Normal operation is performed until the OFF transition condition is satisfied e Remains ON e When the transition condition is satisfied the coil output end processing of the corresponding step is held a Rr performed At the same time the transition destination step becomes active and the block is stopped before execution of the operation output OFForno e Immediately after a STOP request is made setting the block is stopped with the coil output of the immediate operation output being held e The status remains active e Normal operation is performed until the coil output transition condition is satisfied an held e When the transition condition is satisfied the STOP after end processing of the corresponding step is transition Performed h KS At the same time the transition destination step becomes active and the block is stopped before execution of the operation output e Immediately after a STOP request is made the coil e Immediately after a STOP request is
166. steps and operation HOLD steps with or without transition checks Normal steps are the steps other than the above 3 SPECIFICATIONS MELSEC Q SFC system processing time calculation example Using the Q25HCPU as an example the processing time for the SFC system is calculated as shown below given the following conditions e Designated at initial START e Number of active blocks 30 active blocks at SFC program e Number of inactive blocks 70 inactive blocks at SFC program e Number of nonexistent blocks 50 number of blocks between 0 and the max created block No which have no SFC program e Number of active steps 60 active steps within active blocks e Active step transition conditions 60 e Steps with satisfied transition conditions 10 active steps no HOLD steps with satisfied transition conditions SFC system process time 14 5 x 30 5 2 x 70 1 8 x 50 10 6 x 60 4 3 x 60 56 2 x 10 46 6 2391 6 us 2 40 ms In this case calculation using the equation shown above results in an SFC system processing time of 2 40 ms The scan time is the total of the following times SFC system processing time main sequence program processing time SFC active step transition condition time and CPU END processing time The scan time is the total of the following times SFC system processing time main sequence program processing time processing time of ladder circuit having transition conditions associated with
167. t specified 0 SFC transition specified 1 not specified 0 SD14 SD15 4 For the extension refer to REMARKS on the next page SD10 ERA Extension Sieg ile e First 8 bits Last 8 bits First 8 bits 8 bits Name yp ap so an apa Parameter O Sequence program SFC program ap 4sm en ar File register APP 7 APP 7 APPENDICES MELSEC Q Compatible CPU Setting Side Name Content Description Setting Timing e The individual information corresponding to the error code SDO is stored SD16 e There are the following six different stored information types High Performance model QCPU Process CP Basic model QCPU 1 File name drive name Example nan Meaning mie rames SD16 Drive b15 to b8 bi to b0 SD1 7 SD17 41H A 4DH M SD18 File name 4EH N 49H I SD19 ASCII code 8 characters 20H SP 20H SP SD20 20H SP 20H SP SD21 Extension 4 2EH 51H Q 2EH SD22 ASCII code 3 characters 47H G Sou SD23 Spe SD24 Vacant SD25 SD26 2 Time measured value Number Meaning SD19 SD16 Time 1 us units 0 to 999 u s SD17 Time 1 ms units 0 to 65535 ms SD18 SD19 SD20 SD21 SD20 SD22 SD23 SD24 SD25 SD26 sp21 Error Error 3 Program error location SA TEETE Number Meaning individual individual GE at error informati informati SD17 File name on on SD18 ASCII code 8 characters
168. t the step n operation output where YO is ON by SET Step wl SCC sY0 instruction the YO ON status will be maintained even Transitiori y Al after the transition to step n 1 condition n Example Step n 1 4 SFC PROGRAM CONFIGURATION MELSEC Q c When the oC _ instruction is used 1 The counter counts once every time the transition condition is satisfied and the corresponding step that is inactive is activated Example ex Transition iL condition n Counter CO counts once when transition condition n is Step n a oC0 K10 satisfied and execution proceeds to step n 2 To cause the counter to count once when the input condition turns ON and execution to proceed to the next step when the counter counts up e Create a counter ladder in a sequence program or e Create an SFC diagram using a jump transition on MELSAP L In the program example shown below the counter counts once every time X10 turns ON and execution proceeds to the next step when CO counts up When using jump transition on When creating program with When creating counter ladder in sequence program MELSAP L MELSAP3 aX0 Waiting for count up gt gt ee SS gt aco Ladder described in other scan execution program file other than SFC aco t bX10 amp bCO n 3 When counter is reset When a transition to the next step occurs before the reset instruction of the counter is executed
169. tation 2 Station 3 unit for overall process control unit control unit control uni block 0 block 1 block 2 block 3 ea Transfer machine START___ BI START SE START sic L START i initial step initial step initial step initial step Station START Pallet clamp Pallet clamp V Pallet clamp block 1 START step 1 step 1 step 1 o 1 I D oO 1 d g DC _ Station 2 START _ l Drilling Tapping Workpiece unloading amp block 2 START step 2 step 2 step 2 __ Station 3 START S i Pallet unclamp Pallet unclamp i Pallet unclamp i block 3 START 1 4 step 3 l step 3 l step 3 heen d END step END step END step 1 GENERAL DESCRIPTION MELSEC Q 2 Program development efficiency is enhanced by dividing control into parts The machine control process can be divided into parts by describing the operation sequence and machine control separately The MELSAP L is used to describe the operation sequence for the machine and a sequence program circuit list is used to describe the machine control including individual interlock Clamp SOL SOL2 LS U e 4 Clamp UP endpoint gt MT1 F ge MTO F MT1 B WW 4 Clamp DOWN endpoint MTO B Headstock rotation Ler Ee MT2 R EE Carriage Headstock RETRACT Machining Machining Carriage ADVANCE endpoint START END endpoint Carriage RETRACT endpoint LSO LS LS2 LS F LS R Interlock such as
170. tep 3 3 When step 3 is executed in the next scan execution proceeds to step 4 in the same scan since SM324 is ON 1 When a jump transition or selection coupling causes a transition from multiple steps to one step the operation output of one step may be executed twice in a single scan Step 1 Step 2 When the setting is with continuous transition in the E case as shown on the left execution passes through L Condition Condition step 3 twice in a single scan satisfied satisfied __ step 3 Condition satisfied Step 4 2 In the case of with continuous transition a step start end is made within one scan Since the END processing is not executed in this case the coil output turned on by the OUT instruction in the operation output is not reflected on the device When the coil output is the Y output actual output is not provided In addition ON of the step relay cannot be detected 3 In the case of a program that uses a jump transition for looping care must be taken when the transition conditions in the loop are all satisfied during execution at the with continuous transition setting since an endless loop will occur within one scan resulting in WDT Err No 5001 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 5 6 Number of active steps register The number of active steps value for a given block is stored at this register 1 The number of active steps value for a given block is
171. the EEN n is the step No corresponding block are deactivated by the RST instruction Condition rBLm Sn f m is the block No n is the step No 6 SFC PROGRAM EXECUTION MELSEC Q 6 4 3 Changing an active step status Cannot be used for Basic model QCPU This section explains the method for ending deactivating an active step and starting activating the specified step Changing Method e At the step operation output of the SFC e Convenient when the jump destination program the instruction execution step is ended changes depending on the condition and the specified step is forcibly started e The change destination step can be specified within the current block Change by SFC e Indirect designation DO K4MO etc can also E SCHG Kn n ne control instruction be used to specify the change destination step ee a e When multiple instructions have been described within one step the change destination executed in the same can will be valid Instruction execution Specified step is step is deactivated activated 6 SFC PROGRAM EXECUTION MELSEC Q 6 5 Operation Methods for Continuous Transition If with continuous transition is set whether a continuous transition will be performed or not can be selected at each step using the continuous transition disable flag SM324 1 Processing performed when continuous transition disable flag is not used SFC Program With Continuous Transition Witho
172. the coil output held output when the end step is reached Select whether clear processing will be performed or not when active steps other than those held exist in the block at the time of arrival at the end step When this relay is OFF the OFF Clear processing active steps are all ended SM328 Clear processing mode is performed forcibly to end the block at arrival at end step ON Clear processing e When this relay is ON the is not performed execution of the block is continued as is When no active steps other than those held exist at the time of arrival at the end step the held steps are all ended to end the block APP 3 APP 3 APPENDICES MELSEC Q Compatible CPU Setting Side Content Description Setting Timing Basic model QCPU High Performance model QCPU Process CPU e Indicates whether the normal SFC program is being executed or not e Used as an execution interlock of the SFC control instruction e Indicates whether the program Program execution execution management SFC management SFC Not executed program is being executed or S status program execution Being executed not change status e Used as an execution interlock of the SFC control instruction e Switches ON when a ready System status is established after step status trace registration change e Designates the step trace START STOP status When ON Step trace function is started When OFF Step trace function i
173. the maximum number of active steps in a single block Number of Steps That Can Be Maximum Number of Active CPU Module Model name Sa eee Simultaneously in All Blocks a N in Single Block Basic mode BasicmodeQCPU sd t024steps sid steps 428steps steps High Performance model QCPU 9 1280 steps 256 steps Process CPU POINTS 1 The block START step with END check cannot be described immediately before the coupling of a parallel coupling The block START step with END check cannot be used for a wait The block START step without END check can be described immediately before the coupling of a parallel coupling 2 The execution status of each block can be checked at another block using the block START END bit refer to Section 4 5 1 of the SFC information devices or the block activation check instruction refer to Section 4 4 3 of the SFC control instructions 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 2 9 Block START step without END check H A block START step without END check is the step where the specified block is started and if the START destination block is active the check of the transition condition to the next step is performed 1 The operation of the block START step without END check is described below a When activated the block START step without END check starts the specified block b After starting the specified block the step performs only the check of the transition condition c
174. the present value of the counter and the ON status of the contact which is ON are held if the corresponding step becomes inactive To reset the counter the RST instruction etc must be executed at another step Example Step n iL oC0 K10 Transition When counter CO is reset at step n 1 or later the conaitionnii present value is cleared and the contact turns OFF Step n 1 E sizas rco 4 SFC PROGRAM CONFIGURATION MELSEC Q 2 The PLS or __P instruction used for the operation output of any step is executed every time the corresponding step turns from an inactive to an active status The program shown on the left is actually executed in a ladder as shown below Because the step conditions contact Example is ON when the step is active and OFF when the step is Step J PLS YO inactive the PLS or i iP instruction will be executed every time the corresponding step becomes active Step conditions contact When aci ive ON When inactive OFF Step n 1 PLS Yo H 4 SFC PROGRAM CONFIGURATION MELSEC Q 4 2 2 Initial step The initial step represents the beginning of a block Up to 32 initial steps per block can be designated When there are more than one initial step the coupling enabled is only a selective coupling Execute the initial steps in the same way as executing the steps other than the initial step 1 Active steps at block START When the block that has more than one initial step is st
175. transition condition of the corresponding step is satisfied again a transition to the next step subsequent transition occurs to activate it At this time the current step remains active Transition is executed again Step which is active due to the previous transition condition being satisfied POINTS 1 Convert the transition conditions into pulses If they are not pulsed transition processing to the next step is performed every scan while the condition is satisfied 2 When a double START occurs as the transition condition was satisfied with the transition destination step being active the processing changes depending on the parameter setting The Basic model QCPU does not allow the parameters to be selected It operates in the default Transfer mode Refer to Section 4 7 6 for the parameter setting and the processing performed for each setting 3 The difference between the operation HOLD step with transition check and the operation HOLD step without transition check is whether the next step will be activated or not as a follow up when the transition condition is satisfied again 4 SFC PROGRAM CONFIGURATION MELSEC Q 3 An operation HOLD step with transition check becomes inactive when any of the following occur a When the end step of the corresponding block is executed Except when SM327 is ON b When an SFC control instruction rBLm designates a forced END at the block in question
176. uction e Switches the program of the specified file name to a scan execution type beginning PSCAN in the next scan e The execution order of multiple programs changes depending on the program setting order in the PLC parameter dialog box e Switches the program of the specified file name to a low speed execution type PLOW beginning in the next scan e The execution order of multiple programs changes depending on the program setting order in the PLC parameter dialog box Compatible x Incompatible e The following conditions will result in an operation error e When the specified program does not exist error No 2410 When the PSTOP or PLOW instruction is executed error No 2412 e When an SFC program is designated by the PSCAN instruction while scanning is in progress at another SFC program error No 2412 e When the specified SFC program is in scan execution or not can be confirmed with the PCHK instruction For details of the PCHK instruction refer to the QCPU Q mode QnACPU Programming Manual Common Instructions 2 Instruction format instruction Program name Character string or word device where character string is stored POFF PSCAN 5 SFC PROGRAM PROCESSING SEQUENCE MELSEC Q 3 Processing time required to switch SFC program from WAIT status to scan status The processing time required to switch an SFC program from a WAIT status to a scan status is shown below Although t
177. uest is made the coil e Immediately after a STOP request is output of the made the coil output of the operation operation output is output is turned OFF and the block is turned OFF and the stopped block is stopped e The status remains active e The status becomes inactive e Immediately after a STOP request is made the block is stopped with the coil output of the operation output being held e The status remains active e Remains ON coil output held The held step indicates the step whose attribute has been set to the HOLD step SC SE ST and which is being held with the transition condition satisfied 4 SFC PROGRAM CONFIGURATION MELSEC Q POINTS SM325 is turned ON OFF by the system according to the output mode setting at parameter block STOP when the CPU module switches from STOP to RUN Output Mode Setting at Parameter Block STOP SM325 Turns OFF coil output OFF OFF However by turning ON OFF SM325 in the user program the output mode at block STOP can be changed independently of the parameter setting c The STOP RESTART bit switches ON when the SFC control block STOP instruction PAUSE BLm is executed 2 Block RESTART instruction RSTART a The block in question is restarted from the step where a STOP occurred An operation HOLD status step with transition check or without transition check which has been stopped will be restarted with the operation HOLD status in effect
178. uit as shown below C Houp srci If a program is not created at a step an error will not occur In this case no processing is performed until the transition condition immediately following the corresponding step is satisfied 4 SFC PROGRAM CONFIGURATION MELSEC Q 2 MELSAP L program description The MELSAP L describes step programs in the following format instruction rm Ge Example of list format Example of circuit symbol format H K100 High speed timer h hTO K100 OUTH TO K100 The instructions other than SS above 0 h s r are the MOV K100 DO MOV K100 DO Si MOV K100 DO H same as the list To arrange several operation outputs in parallel in the same step separate them with comma MELSAP L format CY70 oY70 sM100 MOV K100 DO SET M100 MOV K100 DO 3 Precautions on description a Describe the instructions which do not require execution conditions e g DI or El at the last of each operation output With the MELSAP L execution conditions like contacts cannot be created as the operation output Therefore the instruction which requires execution conditions cannot be created after the instruction which exists individually and does not require execution conditions SS eed MELSAP L description Circuit expression C Y70 Example of proper eg MOV DO D100 DI L BOF SE description Example of improper ae DI oY70 MOV DO D100 description MOV DO D100 b Up to
179. umber of active blocks Number of blocks that are active b Inactive block Inactive block processing time inactive block processing time coefficient X number of inactive blocks processing e Inactive block processing time System processing time required to execute inactive blocks time e Number of inactive blocks Number of blocks that are inactive block nonexistent blocks processing e Nonexistent block processing time System processing time required to execute blocks that have not time been created e Number of nonexistent blocks Number of blocks where programs have not been created within the number of blocks set in the parameter E step Active step processing time active step processing time coefficient lt number of active steps E Nonexistent block processing time nonexistent block processing time coefficient lt number of processing e Active step processing time Time required to execute active steps time e Number of active steps Number of steps that are active in all blocks e Active Active transition processing time active transition processing time coefficient lt number of active transition transitions processing e Active transition processing time System processing time required to execute active transitions e Number of active transitions Number of transition conditions associated with all steps that are active in all blocks f iti Transition condition satisfied step processing time tra
180. ut Continuous Transition When the corresponding block becomes active When the corresponding block becomes the processings of all steps are executed in the active steps are executed in a 1 step per same scan and end step processing is scan format performed to deactivate the block e The end step processing is performed in the third scan to deactivate the block e When the corresponding block becomes e When the corresponding block becomes active execution proceeds to step 1 since active steps are executed in a 1 step per SM324 is ON scan format independently of whether SM324 When execution proceeds to step 1 the is present or absent processing of the first scan is ended since e The end step processing is performed in the SM324 turns OFF third scan to deactivate the block e In the second scan execution proceeds to step 2 since SM324 turns ON again When execution proceeds to step 2 SM324 aSM400 amp aSM324 turns OFF Since the transition condition of step 2 does not have the contact of SM324 a transition occurs and the end step processing is performed to deactivate the block 6 SFC PROGRAM EXECUTION MELSEC Q 6 6 Operation at Program Change The SFC program of the CPU module can be changed in either of the following methods e Write to PLC write in file unit e Online change write in ladder block unit The following table indicates SFC program changes that can be made in the ab
181. uted the instruction will be ignored equivalent to the NOP instruction and processing will continue Operation Error e Error No 4621 occurs when the specified block does not exist or when the SFC program is in the standby status Program Examples 1 When X1 switches ON the following program forcibly activates block1 When X2 switches ON it ends and forcibly deactivates block1 axl aXx2 sBL1 rBL1 Related Instructions a SFC diagram symbols e Block START step Bmg Dm See Sections 4 2 8 and 4 2 9 b SFC information device e Block GTARTIEND fant See Section 4 5 1 4 SFC PROGRAM CONFIGURATION MELSEC Q QCPU PEG GPU Process CPU Basic High Performance EA RE EES First five digits of serial No are 04122 or later 4 4 7 Block STOP and RESTART instructions PAUSE RSTART Usable Devices Programs Using Instructions Execution Site Data Type Internal Device MELSECNET Special Expansion 10 H Direct SFC Program D System User T 4 Function Index Constant SFC Other Sequence Block Step Transition Module Zi i K H BLm Sn BLm Condition DS 2 Program Transition AE EE e ee name L PAUSE BLm d PSTART BLm E m is a block No E m is a block No Function 1 Block STOP instruction PAUSE a Executes a temporary stop at the specified block b As shown below processing varies depending on when the stop occurs and on the coil
182. ven process is completed in a processing line for example H e Even if the START destination block is active a START source block transition occurs when the transition condition associated with the block START step is satisfied At this time the processing of the START destination block will be continued unchanged until the end step is reached By starting another block at a given step the START destination block can be controlled independently and asynchronously with the START source block until processing of the current block is completed 1 GENERAL DESCRIPTION 1 10 MELSEC Q 6 A given function can be controlled in a variety of ways according to the application in question Block functions such as START END temporary stop restart and forced activation and ending of specified steps can be controlled by SFC diagram symbols SFC control instructions or by SFC information registers e Control by SFC diagram symbols Sia eee es Convenient for control of automatic operations with easy sequential control e Control by SFC instructions Sofia sait Enables requests from program files other than the SFC and is convenient for error processing for example after emergency stops and interrupt control e Control by SFC information devices fuser Enables control of SFC peripheral devices and is convenient for partial operations such as debugging or trial runs Functions which can be controlled by these 3 methods are shown b
Download Pdf Manuals
Related Search
Related Contents
Jeu de fl échettes électronique DS Sony ICF-C1T Operating Instructions Apparati e rete in ponte radio sincrona installati dalla USER'S MANUAL & WARRANTY PDFダウンロード Osram LIGHTIFY Surface Light W 28 Einstellungen - Service Procesador de audio DA80 de Plantronics SR/PP 4630, SR/PP 4640 Copyright © All rights reserved.
Failed to retrieve file