Mitsubishi — Chapter 8 Application Instructions API 100-149

8 Application Instructions API 100-149 Program Example 2: When M1018 = Off, the program is in radian mode. Input terminals X0 and X1 select the angle. The angles are converted into RAD value for calculating the SIN value. X0 (K30 D10) X1 (K60 D10) M1000 (D10 D15, D14) binary floating point binary floating point ( /180) (D21, D20) binary floating point (D15, D14) angle x /180 (D41, D40) RAD binary floating point (D41 D40) RAD (D51, D50) SIN , binary floating point Program Example 3: When M1018 = On, the program is in angle mode. When X0 = On, use the angle of (D1, D0) to obtain SIN value and store the binary floating point result in (D11, D10).

(0° ≤ angle M1002 X0 angle value D 11 D 10 SIN value (binary floating point) Remarks: For floating point operations, see “5.3 Handling of Numeric Values”. DVP-PLC Application Manual 8-48 MOVP K30 D10 MOVP K60 D10 FLT D10 D14 DEDIV K31415926 K1800000000 D20 DEMUL D14 D20 D40 DSIN D40 D50 SET M1018 DSIN D0 D10 D 1 D 0