Mitsubishi Electronics FX1S manual Rst

Page 101
Devices in Detail 4

FX Series Programmable Controllers

4.11.41 Phase Counters - Assigned Start and Reset (C241 to C245) These counters have one countable input

and 1 reset input each. Counters C244 and

 

 

 

 

 

 

 

 

 

 

 

C245 also have a start input.

 

X13

 

 

 

 

When the direction flag M8245 is ON, C245

 

 

 

 

 

 

M8245

 

 

 

 

 

 

 

 

 

 

 

 

counts down. When it is OFF C245 will count

 

X14

 

 

up.

 

 

 

 

 

 

 

RST

C245

 

 

 

 

 

 

 

 

 

 

When X14 is ON, C245 resets in the same

 

X15

 

 

manner as normal internal 32bit counters, but

 

 

 

 

 

 

 

 

 

 

C245

 

 

 

C245 can also be reset by input X3. This is

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

D0

 

 

assigned automatically when counter C245 is

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

used (see previous counter tables).

Counter C245 also has an external start contact, again automatically assigned. This is actually input X7. Once again this data can be found on the previous counter tables.

When X7 is ON, C245 starts counting, conversely when X7 is OFF C245 stops counting. The input X15 selects and reserves the assigned inputs for the selected counter, i.e. in this case C245.

The reason why these counters use assigned start (X7) and reset (X3) inputs is because they are not affected by the cycle (scan) time of the program. This means their operation is immediate and direct.

In this example C245 actual counts the number of OFF to ON events of input X2.

Note: Because C245 is a 32bit counter, its setting data, specified here by a data register also has to be of a 32bit format. This means that data registers D1 and D0 are used as a pair to provide the 32bit data format required.

Device specification:

• All of these counters are 32bit up/down ring counters. Their counting and contact operations are the same as normal 32bit up/down counters described on page 4-21. When the counters current value reaches its maximum or setting value, the counters associated contacts are set and held when the counter is counting upwards. However, when the counter is counting downwards the contacts are reset.

Setting range:

-2,147,483,648 to +2,147,483,647

Direction setting:

The counting direction for 1 phase counters is dependent on their corresponding flag M8✰✰✰; where ✰✰✰ is the number of the corresponding counter, (C241 to C245).

-When M8✰✰✰ is ON the counter counts down.

-When M8✰✰✰ is OFF the counter counts up.

4-27

Image 101
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 Detailed device information What is a Program?Outline of Basic Devices Used in Programming Example How to Read Ladder LogicProgram example Load, Load InverseOUT instruction Out Timer and Counter VariationsDouble Coil Designation Use of dual coilsLast coil effect 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 PulseSequential processing limitations Or BlockBatch 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 Reset16.1Basic Timers, Retentive Timers And Counters Timer, Counter Out & ResetRetentive timers Availability of devices Bit countersNormal 32 bit Counters High Speed 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?Look Inside an STL How STL OperatesEach step is a program Combined SFC Ladder representation How To Start And End An STL ProgramEmbedded STL programs Activating new statesReturning to Standard Ladder Initial StepsTerminating an STL Program Moving Between STL Steps Using SET to drive an STL coilOut is used for distant jumps Using OUT to drive an STL coilOUT is used for loops and jumps Basic Notes On The Behavior Of STL programs Rules and Techniques For STL programsT001 K20 K50 Method 2 Special Single Pulse Flags Single Signal Step ControlMethod 1 Using locking devices Restrictions on using applied instructions Restrictions Of Some Instructions When Used With STLUsing ‘jump’ operations with STL 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 Inputs Configuration detailsAvailable devices Device MnemonicAlias O/P OutputsDevice Mnemonic Y General Stable State Auxiliary Relays Auxiliary RelaysDevice Mnemonic M External loads Battery Backed/ Latched Auxiliary RelaysSpecial Single Operation Pulse Relays Special Diagnostic Auxiliary RelaysGeneral Stable State State Relays State RelaysDevice Mnemonic S PLC FX 1S FX 1N FX 2N Battery Backed/ Latched State RelaysMonitoring STL programs Assigned statesSTL/SFC programming IST instructionAnnunciator Flags Jumping to the end of the program PointersDevice availability Device Mnemonic PAdditional applied instructions Interrupt PointersNested levels Pointer positionInput Interrupts Timer InterruptsRules of use Disabling high speed counter interrupts Driving special auxiliary relaysAdditional notes Disabling Individual InterruptsConstant H Constant KDevice Mnemonic K Example device usage N/ADevice Mnemonic T TimersTimer accuracy Driving special auxiliary coils General timer operationSelectable Timers Retentive Timers Using timers in interrupt or ‘CALL’ subroutinesTimers Used in Interrupt and ‘CALL’ Subroutines Internal timer accuracyTimer Accuracy ConditionCounters Setting ranges for countersHigh speed counters Device Mnemonic CGeneral/ Latched 16bit UP Counters Battery backed/latched countersGeneral/ Latched 32bit Bi-directional Counters Battery backed/ latched countersSelecting the counting direction Further uses None Basic high speed counter operationBasic High Speed Counter Operation Driving high speed counter coilsAvailability of High Speed Counters Input assignmentCounter Speeds Calculating the maximum combined counting speed on FX1S Setting range Device specificationDirection setting Using the SPD instructionRST Device size 11.5 2 Phase Bi-directional Counters C246 to C25011.6 A/B Phase Counters C252 to C255 Example device usage None Data RegistersDevice Mnemonic D General Use Registers Data register updatesData retention Use of diagnostic registers Using the FX2-40AW/APBattery Backed/ Latched Registers Special Diagnostic RegistersWriting to file registers Special caution when using FX1SFile Registers Program memory registersUses Externally Adjusted RegistersUse of Modifiers with Applied Instruction Parameters Index RegistersDevice Mnemonic V,Z Available formsMisuse of the Modifiers Using Multiple Index RegistersModifying a Constant Bit Devices, Individual and Grouped Bits, Words, BCD and HexadecimalAssigning grouped bit devices Moving grouped bit devicesAssigning I/O 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