Chapter 5 Applied Instructions S 1 : Device in which the base is stored; S 2 : Source device; D : Device in which an operation result is stored The logarithm of the value in S 2 with respect to the value in S 1 is calculated, and the operation result is stored in D . The values in S 1 and S 2 can only be positive values. D must be a 32-bit register, and the values in S 1 and S 2 must be floating-point values. Explanation If the absolute value of an oepration result is greater than the maximum floating-point value available, a carry flag will be ON. If the absolute value of an oepration reuslt is less than the minimum floating-point value available, a borrow flag will be ON.
If an operation result is 0, a zero flag will be ON. SM1064 is the zero flag in an Ox motion subroutine, and SM968 is the zero flag in O100. SM1065 is the borrow flag in an Ox motion subroutine, and SM969 is the borrow flag in O100. SM1066 is the carry flag in an Ox motion subroutine, and SM970 is the carry flag in O100. S 1 D = S 2 → D =Log S1 S 2 When M0 is ON, the values in (D1, D0) and (D3, D2) are converted into binary floating-point values, and the conversion results are stored in (D11, D10) and (D13, D12) respectively.
When M1 is ON, the logarithm of the binary floating-point value in (D13, D12) with respect to the binary floating-point value in (D11, D10) is calculated, and the operation result is stored in (D21, D20). Example M0 DFLT M1 DFLT Additional remark Please refer to section 5.3 for more information about performing operations on floating-point numbers. 5-89 API Instruction code Operand Function S , S , D 1 2 Logarithm of a binary 126 D LOG P floating-point number Device Xn.n Yn.n M S K 16# F KnM KnS D W T C V Z S 1 S 2 D Pulse instruction 16-bit instruction 32-bit instruction (9 steps) – D0 D10 D2 D12 DLOG D10 D12 D20