Mitsubishi Electronics FX1S manual Scientific Notation

Page 118

FX Series Programmable Controllers

Devices in Detail 4

4.15.1Scientific Notation

This format could be called the step between the ‘integer’ formats and the full floating point formats. In basic terms Scientific Notation use two devices to store information about a number or value. One device contains a data string of the actual characters in the number (called the mantissa), while the second device contains information about the number of decimal places used in the number (called the exponent). Hence, Scientific Notation can accommodate values greater/smaller than the normal 32 bit limits, i.e. -2,147,483,648 to 2,147,483,647 where Scientific Notation limits are;

Maximums

Minimums

9999 1035

9999 10-41

-9999 1035

-9999 10-41

Scientific Notation can be obtained by using the BCD, or EBCD in FX2N, instruction (FNC 18 or FNC 118) with the float flag M8023 set ON. In this situation floating point format numbers are converted by the BCD instruction into Scientific Notation - see page 5-22 for details. When using the FX2N the INT instruction (FNC 129) can be used.

Scientific Notation can be converted back to floating point format by using the BIN instruction (FNC 19) with the float flag M8023 set ON - see page 5-22 for details.

The following points should be remembered about the use of Scientific Notation within appropriate FX units;

• The mantissa and exponent are stored

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

in consecutive data registers.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Each part is made up of 16 bits and can

 

 

 

EXPONENT

 

MANTISSA

 

be assigned a positive or negative value

 

 

 

Data Register D+1

 

 

Data Register D

 

indicated by the value of the most

 

b15

 

 

 

 

b0

b15

 

 

 

 

b0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

significant bit (MSB, or bit 15 of the data

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

register) for each number.

 

 

 

Sign bit (MSB)

Sign bit (MSB)

 

 

 

 

1= Negative

1= Negative

• The mantissa is stored as the first 4

 

 

 

0 = Positive

0= Positive

significant figures without any rounding

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

of the number, i.e. a floating point number of value 2.34567 103 would be stored as a mantissa of 2345 at data register D and an exponent of 0 (zero) at data register D+1.

The range of available mantissa values is 0, 1000 to 9999 and -1000 to -9999.

The range of available exponent values is +35 through to -41.

Scientific format cannot be used directly in calculations, but it does provide an ideal method of displaying the data on a monitoring interface.

4-44

Image 118
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 Outline of Basic Devices Used in Programming What is a Program?Detailed device information How to Read Ladder Logic ExampleOUT instruction Load, Load InverseProgram example Timer and Counter Variations OutLast coil effect Use of dual coilsDouble 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 ORBBatch processing limitations Or BlockSequential 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 countersRetentive timers Timer, Counter Out & Reset16.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 noteEach step is a program How STL OperatesLook Inside an STL Embedded STL programs How To Start And End An STL ProgramCombined SFC Ladder representation Activating new statesTerminating an STL Program Initial StepsReturning to Standard Ladder Using SET to drive an STL coil Moving Between STL StepsOUT is used for loops and jumps Using OUT to drive an STL coilOut is used for distant jumps Rules and Techniques For STL programs Basic Notes On The Behavior Of 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 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 MnemonicDevice Mnemonic Y OutputsAlias O/P Device Mnemonic M Auxiliary RelaysGeneral Stable State Auxiliary Relays Battery Backed/ Latched Auxiliary Relays External loadsSpecial Diagnostic Auxiliary Relays Special Single Operation Pulse RelaysDevice Mnemonic S State RelaysGeneral 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 positionRules of use Timer InterruptsInput Interrupts Additional notes Driving special auxiliary relaysDisabling high speed counter interrupts Disabling Individual InterruptsDevice Mnemonic K Constant KConstant H Example device usage N/ATimer accuracy TimersDevice Mnemonic T Selectable Timers General timer operationDriving 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 CountersSelecting the counting direction Battery backed/ latched countersGeneral/ Latched 32bit Bi-directional Counters Basic high speed counter operation Further uses NoneDriving high speed counter coils Basic High Speed Counter OperationCounter Speeds Input assignmentAvailability 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 Device Mnemonic D Data RegistersExample device usage None Data retention Data register updatesGeneral 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 formsModifying a Constant Using Multiple Index RegistersMisuse of the Modifiers Bits, Words, BCD and Hexadecimal Bit Devices, Individual and GroupedAssigning I/O Moving grouped bit devicesAssigning 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