Mitsubishi — 5.6 Descriptions of the Applied Instructions

Chapter 5 Applied Instructions  S : Source device; D : Device in which an operation result is stored Explanation  EXP [ D +1, D ] =[ S +1 , S ]  e is a base (e=2.71828), and S is an exponent.  The value in S can be a positive value or a negative value. D must be a 32-bit register, and the value in S must be a floating-point value.  The value in D is e S . (e is 2.71828, and S represents a source value.)  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.  When M0 is ON, the value in (D1, D0) is converted into a floating-point value, and the conversion result is stored in (D11, D10).  When M1 is ON, the exponentiation with the value in (D11, D10) as an exponent is performed. The result is a floating-point number, and 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-87 API Instruction code Operand Function Exponent of a binary 124 D EXP P S, D 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)  –  M0 DFLT D0 D10 M1 DEXP D10 D20 DFLT D0 D10 DEXP D10 D20