Delta AH500 — 6.16.2 Explanation of Floating-point Number Instructions

Chapter 6 Applied Instructions API 1515 Symbol: S : Source device Double word D : Device in which the operation result is stored Double word Explanation: 1. The natural logarithm of the operand S is calculated. 2. LN[ S +1, S]=[ S +1, D] 3. The value in S only can be a positive value. The register specified by D should be a 32-bit register, and the value in S should be a floating-point number. 4. e D = S . → The value in D =ln S . ( S represents the source data.) 5. If the operation result stored in D is 0, SM600 is ON. Example: 1. When X0.0 is ON, the value in (D1, D0) is converted into the floating-point number, and the conversion result is stored in (D11, D10). 2.

When X0.1 is ON, the natural logarithm of the floating-point number in (D11, D10) is calculated, and the operation result is stored in (D21, D20). Additional remark: 1. If the value in S is less than or equal to 0, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#2003. 6-345 Instruction code Operand Function FLN P S, D Natural logarithm of the binary 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-6 steps) 32-bit instruction AH500 AH500 -