Chapter 6 Applied Instructions API 0205 Symbol: S : Source device Long word D : Conversion result Word/Double word Explanation: 1. The double-precision floating-point number in the register specified by S is converted into the binary integer. The binary floating-point number is rounded down to the nearest whole digit, and becomes the bianry integer. The binary integer is stored in the register specified by D . 2. The source device S used in the instruction FINT occupies four registers, and D used in FINT occupies one register. 3. The source device S used in the instruction DFINT occupies four registers, and D used in DFINT occupies two registers. 4.
The operand D used in the instructions FINT and FLTP can not be the 32-bit counter. 5. The instruction FINT is the opposite of the instruction FLTD. 6. When the conversion result is zero, SM600 is ON. 7. During the conversion, if the floating-point number is rounded down to the nearest whole digit, SM601 will be ON. 8. When the conversion result exceeds the range, SM602 is ON. For the instruction FINT/FINTP, the range of conversion results is between -32,768 and 32,767. For the instruction DFINT/DFINTP, the range of conversion results is between -2,147,483,648 and 2,147,483,647. Example: 1.
When X0.0 is ON, the double-precision floating-point number in (D3, D2, D1, D0) is converted into the binary integer, and the conversion result is stored in D10. The binay floating-point number is rounded down to the nearest whole digit. 2. When X0.1 is ON, the double-precision floating-point number in (D23, D22, D21, D20) is converted into the binary integer, and the conversion result is stored in (D31, D30). The binay floating-point number is rounded down to the nearest whole digit.
6-85 Instruction code Operand Function D FINT P S, D Converting the 64-bit floating-point number into the binary integer Device X Y M S T C HC D L SM SR E PR K 16# “$” DF S D Pulse instruction 32-bit instruction (5 steps) 64-bit instruction (5 steps) AH500 AH500 AH500