Chapter 6 Applied Instructions API 0203 Symbol: S : Source device Word/Double word D : Conversion result Long word Explanation: 1. When the instruction is executed, the binary integer is converted into the double-precision floating-point number. 2. The operand S used in the instruction FLTD can not be the 32-bit counter. 3. The source device S used in the instruction FLTD occupies one register, and D used in FLTD occupies four registers. 4. The source device S used in the instruction DFLTD occupies two registers, and D used in DFLTD occupies four registers. 5.
When the absolute value of the conversion result is larger than the value which can be represented by the maximum floating-point number, SM602 is ON, and the maximum floating-point number is stored in D . 6. When the absolute value of the conversion result is less than the value which can be represented by the minimum floating-point number, SM601 is ON, and the minimum floating-point number is stored in D . 7. When the conversion result is zero, SM600 is ON. Example: 1. When X0.0 is ON, the 16-bit binary integer in D0 is converted into the double-precision floating-point number, and the conversion result is stored in (D15, D14, D13, D12). 2.
When X0.1 is ON, the 32-bit binary integer in (D1, D0) is converted into the double-precision floating-point number, and the conversion result is stored in (D23, D22, D21, D20). 3. Suppose the 16-bit binary integer in D0 is 10. When X0.0 is ON, 10 is converted into 16#4024000000000000, and 16#4024000000000000 is stored in the 64-bit register (D15, D14, D13, D12). 4. Suppose the 32-bit binary integer in (D1, D0) is 100,000. When X0.1 is ON, 100,000 is converted into 16#40F86A0000000000, and 16#40F86A0000000000 is stored in the 64-bit register (D23, D22, D21, D20).
6-81 Instruction code Operand Function D FLTD P S, D Converting the binary integer into the 64-bit floating-point number Device X Y M S T C HC D L SM SR E PR K 16# “$” DF S D Pulse instruction 16-bit instruction (5 steps) 32-bit instruction (5 steps) AH500 AH500 AH500