Mitsubishi Electronics FX1S manual General Precautions When Using The FX-PCS/AT-EE Software

Page 67

FX Series Programmable Controllers

STL Programming 3

Further recommended program changes:

 

 

S 20

 

 

 

 

 

 

 

 

 

 

 

 

 

X0

 

 

 

 

 

 

 

X10

 

 

 

 

 

 

 

 

 

X1

 

 

 

 

X4

 

 

X11

 

 

 

 

 

 

X14

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Rewrite as...

 

S 20

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X0

 

 

 

 

X0

 

X10

 

X10

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X1

 

 

 

 

X4

 

X11

 

X14

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S 21

 

S 23

 

 

S 25

 

 

S 27

X2

 

 

 

X5

 

 

 

X12

 

 

 

 

 

X15

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S 22

 

S 24

 

 

S 26

 

 

S 28

X3

 

 

 

X6

 

 

 

X13

 

 

 

X16

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X7

 

 

 

 

 

 

 

X17

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S21

X2 S 22

X3

X7

 

S 23

 

 

S 25

 

 

S 27

X5

 

 

 

 

X12

 

 

 

 

X15

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S 24

 

 

S 26

 

 

S 28

X6

 

 

 

X13

 

 

 

 

X16

 

 

 

 

 

 

 

 

 

 

 

 

 

X7

 

 

 

 

 

X17

 

 

 

X17

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S 29

S 29

Program violation!

Rewrite as...

 

S 20

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X0

 

 

 

 

 

X1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S 21

 

S 23

 

S 25

 

S 27

X2

 

 

 

X3

 

 

 

X4

 

 

 

X5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S 22

 

S 24

 

S 26

 

S 28

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X6

X7

 

S 29

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

STL

S 20

STL

S 22

LD

X

0

STL

S 24

SET

S 21

LD

X

6

SET

S 23

SET

S 29

LD

X

1

STL

S 26

SET

S 25

STL

S 28

SET

S 27

LD

X

7

 

 

 

 

 

 

SET

S 29

3.10General Precautions When Using The FX-PCS/AT-EE Software

FX1S

FX1N

FX2N

FX2NC

This software has the ability to program in SFC flow diagrams. As part of this ability it can read and convert existing STL programs back into SFC flows even if they were never originally programmed using the FX-PCS/AT-EE software. As an aid to allowing this automatic SFC flow generation the following rules and points should be noted:

1)When an STL flow is started it should be initialized with one of the state devices from the range S0 to S9.

2)Branch selection or merging should always be written sequentially moving from left to right. This was demonstrated on page 3-11, i.e. on the selective branch S21 was specified before S31 which was specified before S41. The merge states were programmed in a similar manner, S29 proceeded S39 which proceeded S49.

3)The total number of branches which can be programmed with the STL programming mode are limited to a maximum of 16 circuits for an STL flow. Each branch point is limited to a maximum of 8 branching flows. This means two branch points both of 8 branch flows would equal the restriction. These restrictions are to ensure that the user can always view the STL flow diagram on the computer running the FX-PCS-AT/ EE software and that when it is needed, the STL program flow can be printed out clearly.

3-15

Image 67
Contents Programming Manual Page Foreword FX Series Programmable ControllersFX Series Programmable Controllers FAX Back Combined Programming Manual J FX Series Programmable Controllers Software Warnings Hardware 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 Overview IntroductionWhat do You Need to Program a PLC? What is a Programmable Controller?Current Generation CPU all versions Special considerations for programming equipmentManual name Number FX Base Unit Hardware Assocciated ManualsManual name Number FX DU, GOT and DM units Memo Basic Program Instructions FX Series Programmable ControllersBasic Program Instructions Outline of Basic Devices Used in Programming What is a Program?Detailed device information Example How to Read Ladder LogicOUT instruction Load, Load InverseProgram example Out Timer and Counter VariationsLast coil effect Use of dual coilsDouble Coil Designation Peripheral limitations And, And InverseORI Or, Or InverseSingle Operation flags M2800 to M3071 Load Pulse, Load Trailing PulseLDF ANF OUT Pulse, And Trailing PulseORF ORB Or Pulse, Or Trailing PulseBatch processing limitations Or BlockSequential processing limitations ANB BlockMPS, MRD and MPP usage 13 MPS, MRD and MPPMultiple program examples MCR Master Control and ResetNested MC program example Resetting timers and counters Set and ResetRetentive timers Timer, Counter Out & Reset16.1Basic Timers, Retentive Timers And Counters High Speed Counters Bit countersAvailability of devices Normal 32 bit CountersLeading and Trailing Pulse PLFUsages for INV InverseNo Operation No OperationProgram scan 20 EndMemo STL Programming FX Series Programmable ControllersSTL Programming General note What is STL, SFC And IEC1131 Part 3?Each step is a program How STL OperatesLook Inside an STL Activating new states How To Start And End An STL ProgramCombined SFC Ladder representation Embedded STL programsTerminating an STL Program Initial StepsReturning to Standard Ladder Moving Between STL Steps Using SET to drive an STL coilOUT is used for loops and jumps Using OUT to drive an STL coilOut is used for distant jumps Basic Notes On The Behavior Of STL programs Rules and Techniques For STL programsT001 K20 K50 Method 1 Using locking devices Single Signal Step ControlMethod 2 Special Single Pulse Flags Using ‘jump’ operations with STL Restrictions Of Some Instructions When Used With STLRestrictions on using applied instructions STL OUT SET Using STL To Select The Most Appropriate ProgramLimits on the number of branches Using STL To Activate Multiple Flows SimultaneouslyLimits on the number of branches Instruction Format General Rules For Successful STL BranchingGeneral Precautions When Using The FX-PCS/AT-EE Software Simple STL Flow Programming ExamplesSET STL Identification of normally closed contactsSelective Branch/ First State Merge Example Program Points to noteFull STL flow diagram/program Advanced STL Use Devices in Detail FX Series Programmable ControllersDevices in Detail Device Mnemonic Configuration detailsInputs Available devicesDevice Mnemonic Y OutputsAlias O/P Device Mnemonic M Auxiliary RelaysGeneral Stable State Auxiliary Relays External loads Battery Backed/ Latched Auxiliary RelaysSpecial Single Operation Pulse Relays Special Diagnostic Auxiliary RelaysDevice Mnemonic S State RelaysGeneral Stable State State Relays PLC FX 1S FX 1N FX 2N Battery Backed/ Latched State RelaysIST instruction Assigned statesMonitoring STL programs STL/SFC programmingAnnunciator Flags Device Mnemonic P PointersJumping to the end of the program Device availabilityPointer position Interrupt PointersAdditional applied instructions Nested levelsRules of use Timer InterruptsInput Interrupts Disabling Individual Interrupts Driving special auxiliary relaysDisabling high speed counter interrupts Additional notesExample device usage N/A Constant KConstant H Device Mnemonic KTimer accuracy TimersDevice Mnemonic T Selectable Timers General timer operationDriving special auxiliary coils Retentive Timers Using timers in interrupt or ‘CALL’ subroutinesCondition Internal timer accuracyTimers Used in Interrupt and ‘CALL’ Subroutines Timer AccuracyDevice Mnemonic C Setting ranges for countersCounters High speed countersGeneral/ Latched 16bit UP Counters Battery backed/latched countersSelecting the counting direction Battery backed/ latched countersGeneral/ Latched 32bit Bi-directional Counters Further uses None Basic high speed counter operationBasic High Speed Counter Operation Driving high speed counter coilsCounter Speeds Input assignmentAvailability of High Speed Counters Calculating the maximum combined counting speed on FX1S Using the SPD instruction Device specificationSetting range Direction settingRST Device size 11.5 2 Phase Bi-directional Counters C246 to C25011.6 A/B Phase Counters C252 to C255 Device Mnemonic D Data RegistersExample device usage None Data retention Data register updatesGeneral Use Registers Special Diagnostic Registers Using the FX2-40AW/APUse of diagnostic registers Battery Backed/ Latched RegistersProgram memory registers Special caution when using FX1SWriting to file registers File RegistersUses Externally Adjusted RegistersAvailable forms Index RegistersUse of Modifiers with Applied Instruction Parameters Device Mnemonic V,ZModifying a Constant Using Multiple Index RegistersMisuse of the Modifiers Bit Devices, Individual and Grouped Bits, Words, BCD and HexadecimalAssigning I/O Moving grouped bit devicesAssigning grouped bit devices Interpreting Word Data Word DevicesFX Series Programmable Controllers Word Data Summary Binary Coded Decimal value= ErrorInverted7 Additional1 14.4 Two’s ComplimentSome useful constants Floating Point And Scientific NotationScientific Notation Floating Point Format FLT