DVP-ES2/EX2/SS2/SA2/SX2/SE&TP Operation Manual - Programming Program Example 2: M1018 = OFF, radian mode. Select the degree value from inputs X0 and X1 and convert it to RAD value for further sine operation. X0 (K30 D10) X1 (K60 D10) M1000 (D10 D15, D14) Binary floating point Binary floating point ( /180) (D21, D20) Binary floating point (D15, D14) Degree x /180 (D41, D40) RAD binary floating point (D41 D40) RAD (D51, D50) SIN , binary floating point Program Example 3: M1018 = ON, degree mode. When X0 = ON, DSIN instruction performs sine operation on the degree value (0° degree ≦ < 360°) in (D1, D0) and stores the SIN value in (D11, D10) in binary floating format.
M1002 X0 Degree value SIN value (binary floating point) 3-340 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 D 11 D 10