Mitsubishi Electronics FX1S manual General Rules For Successful STL Branching, Instruction Format

Page 66

FX Series Programmable Controllers

STL Programming 3

3.9General Rules For Successful STL Branching

For each branch point 8 further branches may be programmed. There are no limits to the num- ber of states contained in a single STL flow. Hence, the possibility exists for a single initial state to branch to 8 branch flows which in turn could each branch to a further 8 branch flows etc. If the programmable controllers program is read/written using instruction or ladder formats the above rules are acceptable. However, users of the FX-PCS/AT-EE programming package who are utilizing the STL programming feature are constrained by further restrictions to enable automatic STL program conversions (please see page 3-15 for more details).

When using branches, different types of branching /merging cannot be mixed at the same branch point. The item marked with a ‘S’ are transfer condition which are not permitted.

The following branch configurations/modifications are recommended:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S 20

 

 

S 30

 

 

S 40

X0

 

 

 

X1

 

 

 

X2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X3

 

 

X4

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S 50

 

 

S 60

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S 20 S 30 S 40

X0

S 50 S 60

S 20 S 30

X0 X1

S 40 S 50

S 20 S 30

X0

X1 X2

S 40 S 50

Rewrite as

Rewrite as

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S 20

 

 

S 30

 

 

S 40

 

 

S 20

 

 

S 30

 

 

S 40

X0

 

 

 

 

 

X1

 

 

 

X2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X0

 

 

 

 

Dummy

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Dummy state

 

 

 

 

 

 

 

 

 

 

 

 

S 100

 

S 101

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

state

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(S100)

 

 

 

 

(S100)

 

 

 

 

(S101)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X3

 

 

 

X4

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S 50

 

 

S 60

 

 

S 50

 

 

S 60

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S 20

 

 

 

S 30

 

 

S 20

 

 

S 30

 

X0

 

 

X1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X0

 

 

 

 

 

Dummy

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Dummy

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S 102

 

 

S 103

 

 

 

 

 

 

 

 

state

 

 

 

 

 

 

 

state

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(S102)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(S103)

 

 

(S103)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X1

 

 

X2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S 40

 

 

 

S 50

 

 

S 40

 

 

S 50

 

In Instruction

In Instruction

format...

format...

STL S 20 LD X 0 SET S 100 STL S 30 LD X 1 SET S 100 STL S 40 LD X 2 SET S 100 STL S 100 LD S 100 AND X 3 SET S 50 LD S 100 AND X 4 SET S 60

STL S 20 STL S 30 STL S 40 LD X 0 SET S 101 STL S 101 LD S 101 SET S 50 SET S 60

STL S 20 LD X 0 SET S 102 STL S 30 LD X 1 SET S 102 STL S 102 LD S 102 SET S 40 SET S 50

STL S 20 STL S 30 LD X 0 SET S 103 STL S 103 LD S 103 AND X 1 SET S 40 LD S 103 AND X 2 SET S 50

3-14

Image 66
Contents Programming Manual Page FX Series Programmable Controllers ForewordFX Series Programmable Controllers FAX Back Combined Programming Manual J FX Series Programmable Controllers Hardware Warnings Software WarningsFX Series Programmable Controllers Contents STL Programming Applied Instructions Rotation And Shift Functions 30 to External FX Serial Devices Functions 80 to Execution Times And Instructional 10-1 Viii FX Series Programmable Controllers Chapter Contents Introduction OverviewWhat is a Programmable Controller? What do You Need to Program a PLC?Special considerations for programming equipment Current Generation CPU all versionsAssocciated Manuals Manual name Number FX Base Unit HardwareManual name Number FX DU, GOT and DM units Memo Basic Program Instructions FX Series Programmable ControllersBasic Program Instructions What is a Program? Outline of Basic Devices Used in ProgrammingDetailed device information How to Read Ladder Logic ExampleLoad, Load Inverse OUT instructionProgram example Timer and Counter Variations OutUse of dual coils Last coil effectDouble Coil Designation And, And Inverse Peripheral limitationsOr, Or Inverse ORILoad Pulse, Load Trailing Pulse Single Operation flags M2800 to M3071Pulse, And Trailing Pulse LDF ANF OUTOr Pulse, Or Trailing Pulse ORF ORBOr Block Batch processing limitationsSequential processing limitations Block ANB13 MPS, MRD and MPP MPS, MRD and MPP usageMultiple program examples Master Control and Reset MCRNested MC program example Set and Reset Resetting timers and countersTimer, Counter Out & Reset Retentive timers16.1Basic Timers, Retentive Timers And Counters Normal 32 bit Counters Bit countersAvailability of devices High Speed CountersPLF Leading and Trailing PulseInverse Usages for INVNo Operation No Operation20 End Program scanMemo STL Programming FX Series Programmable ControllersSTL Programming What is STL, SFC And IEC1131 Part 3? General noteHow STL Operates Each step is a programLook Inside an STL Embedded STL programs How To Start And End An STL ProgramCombined SFC Ladder representation Activating new statesInitial Steps Terminating an STL ProgramReturning to Standard Ladder Using SET to drive an STL coil Moving Between STL StepsUsing OUT to drive an STL coil OUT is used for loops and jumpsOut is used for distant jumps Rules and Techniques For STL programs Basic Notes On The Behavior Of STL programsT001 K20 K50 Single Signal Step Control Method 1 Using locking devicesMethod 2 Special Single Pulse Flags Restrictions Of Some Instructions When Used With STL Using ‘jump’ operations with STLRestrictions on using applied instructions Using STL To Select The Most Appropriate Program STL OUT SETUsing STL To Activate Multiple Flows Simultaneously Limits on the number of branchesLimits on the number of branches General Rules For Successful STL Branching Instruction FormatGeneral Precautions When Using The FX-PCS/AT-EE Software Programming Examples Simple STL FlowIdentification of normally closed contacts SET STLPoints to note Selective Branch/ First State Merge Example ProgramFull STL flow diagram/program Advanced STL Use Devices in Detail FX Series Programmable ControllersDevices in Detail Available devices Configuration detailsInputs Device MnemonicOutputs Device Mnemonic YAlias O/P Auxiliary Relays Device Mnemonic MGeneral Stable State Auxiliary Relays Battery Backed/ Latched Auxiliary Relays External loadsSpecial Diagnostic Auxiliary Relays Special Single Operation Pulse RelaysState Relays Device Mnemonic SGeneral Stable State State Relays Battery Backed/ Latched State Relays PLC FX 1S FX 1N FX 2NSTL/SFC programming Assigned statesMonitoring STL programs IST instructionAnnunciator Flags Device availability PointersJumping to the end of the program Device Mnemonic PNested levels Interrupt PointersAdditional applied instructions Pointer positionTimer Interrupts Rules of useInput Interrupts Additional notes Driving special auxiliary relaysDisabling high speed counter interrupts Disabling Individual InterruptsDevice Mnemonic K Constant KConstant H Example device usage N/ATimers Timer accuracyDevice Mnemonic T General timer operation Selectable TimersDriving special auxiliary coils Using timers in interrupt or ‘CALL’ subroutines Retentive TimersTimer Accuracy Internal timer accuracyTimers Used in Interrupt and ‘CALL’ Subroutines ConditionHigh speed counters Setting ranges for countersCounters Device Mnemonic CBattery backed/latched counters General/ Latched 16bit UP CountersBattery backed/ latched counters Selecting the counting directionGeneral/ Latched 32bit Bi-directional Counters Basic high speed counter operation Further uses NoneDriving high speed counter coils Basic High Speed Counter OperationInput assignment Counter SpeedsAvailability of High Speed Counters Calculating the maximum combined counting speed on FX1S Direction setting Device specificationSetting range Using the SPD instructionRST 11.5 2 Phase Bi-directional Counters C246 to C250 Device size11.6 A/B Phase Counters C252 to C255 Data Registers Device Mnemonic DExample device usage None Data register updates Data retentionGeneral Use Registers Battery Backed/ Latched Registers Using the FX2-40AW/APUse of diagnostic registers Special Diagnostic RegistersFile Registers Special caution when using FX1SWriting to file registers Program memory registersExternally Adjusted Registers UsesDevice Mnemonic V,Z Index RegistersUse of Modifiers with Applied Instruction Parameters Available formsUsing Multiple Index Registers Modifying a ConstantMisuse of the Modifiers Bits, Words, BCD and Hexadecimal Bit Devices, Individual and GroupedMoving grouped bit devices Assigning I/OAssigning grouped bit devices Word Devices Interpreting Word DataFX Series Programmable Controllers Binary Coded Decimal value= Error Word Data Summary14.4 Two’s Compliment Inverted7 Additional1Floating Point And Scientific Notation Some useful constantsScientific Notation Floating Point Format FLT