Mitsubishi — 5.6 Descriptions of the Applied Instructions

AH500 Motion Control Module Manual Explanation  S : Source device; D : Device in which an operation result is stored  The natural logarithm of the value in S is calculated Ln[ S +1, S ]=[ D +1, D ]  The value in S can only be a positive value. D must be a 32-bit register, and the value in S must be a floating-point value.  If the value in S is not a positive value, an operation error will occur, the instruciton will not be executed, an operation error flag will be ON, and the error code 16#0E19 will appear.  e D = S .→The value in D =ln S ( S :

Source device)  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.

 SM1049 is the operation error flag in an Ox motion subroutine, and SM953 is the operation error flag in O100.  When M0 is ON, the value in (D1, D0) is converted into a binary floating-point value, and the conversion result is stored in (D11, D10).  When M1 is ON, the natural logarithm of the floating-point value in (D11, D10) is calculated, and the operation result is stored in (D21, D20). Example Additional remark  Please refer to section 5.3 for more information about performing operations on floating-point numbers.

5-88 API Instruction code Operand Function Natural logarithm of a 125 D LN P S, D binary floating-point number Device Xn.n Yn.n M S K 16# F KnM KnS D W T C V Z S    D   Pulse instruction 16-bit instruction 32-bit instruction (6 steps)  –  DFLT D0 D10 M DLN D10 D20