Delta Electronics AH — 3.5 Data Conversion Instructions

AH Motion Controller – Standard Instructions Manual _3 Graphic expression: S : Source device D : Conversion result Explanation: 1. The instruction is used to convert the binary integer into the single-precision floating-point value. 2. The operand S used in the instruction FLT can not be the 32-bit counter. 3. The source device S used in the instruction FLT occupies one register, and D used in FLT occupies two registers. 4. The source device S used in the instruction DFLT occupies two registers, and D used in DFLT also occupies two registers.

 When the absolute value of the conversion result is larger than the value which can be represented by the maximum floating-point value, SM602 is ON, and the maximum floating-point value is stored in D .  When the absolute value of the conversion result is less than the value which can be represented by the minimum floating-point value, SM601 is ON, and the minimum floating-point value is stored in D.  When the conversion result is zero, SM600 is ON. Example 1: 1. When X0.0 is ON, the binary integer in D0 is converted into the single-precision floating-point value, and the conversion result is stored in (D13, D12). 2.

When X0.1 is ON, the binary integer in (D1, D0) is converted into the single-precision floating-point value, and the conversion result is stored in (D21, D20). 3. Suppose the value in D0 is 10. When X0.0 is ON, 10 is converted into the single-precision floating-point value 16#41200000, and 16#41200000 is stored in the 32-bit register (D13, D12).

3-114 FB/FC Instruction Operand Description FC D* FLT P S, D Converting the binary integer into the binary floating-point value BOOL WORD DWORD LWORD UINT UDINT INT DINT LINT REAL LREAL TMR CNT STRING Data type S  *  * D /* /* Device X Y M S T C HC/AC D L SM SR E PR K 16# “$” D F S            D           Pulse instruction 16-bit instruction 32-bit instruction AH Motion CPU AH Motion CPU AH Motion CPU