Delta Electronics AH — 3.5 Data Conversion Instructions

Chapter 3 Standard Instructions 3_ Graphic expression: S : Data source D : Conversion result Explanation: 1. The decimal floating-point value in the register specified by S is converted into the single-precision floating-point value, and the conversion result is stored in the register specified by D. 2. Suppose the value in S is 1234, and the value in S+1 is 3. The value in S is converted into 1.234x106. 3. The value in D should be a single-precision floating-point value, and the values in S and S+1 represent the decimal real number and the decimal exponent respectively. 4.

The instruction FBIN is used to convert the decimal floating-point value into the single-precision floating-point value. 5. The real number of decimal floating-point values range from -9,999 to +9,999, the exponents of decimal floating-point values range from -41 to +35, and the practical range of decimal floating-point values in PLC is between ±1175Ч10-41 and ±3402Ч10+35. When the operation result is zero, SM600 is ON. Example 1: When X0.0 is ON, the decimal floating-point value in the register in (D1, D0) is converted into the single-precision floating-point value, and the conversion result is stored in (D3, D2).

3-137 FB/FC Instruction Operand Description FC FBIN P S, D Converting the decimal floating-point value 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 32-bit instruction 64-bit instruction AH Motion CPU AH Motion CPU -