DVP - ES2/EX2/SS2/SA2/SX2/SE 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

 

 

 

 

 

 

 

 

 

 

 

 

MOVP

(K30

 

D10)

 

 

 

 

 

 

 

 

 

 

 

X1

 

 

(K60

 

D10)

 

 

 

 

 

 

 

 

 

MOVP

K60

D10

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

M1000

 

 

(D10

 

D15, D14) Binary floating point

 

 

 

 

FLT

D10

D14

 

 

 

 

 

 

 

 

 

 

DEDIV

K31415926 K1800000000 D20

( π /180)

 

(D21, D20)

 

 

 

 

 

 

 

 

 

Binary

Binary

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

floating point

floating point

DEMUL D14 D20

DSIN D40 D50

Program Example 3:

D40

(D15, D14) Degree x π /180

 

 

 

(D41, D40) RAD binary floating point

 

(D41, D40) RAD (D51, D50) SIN binary floating point

M1018 = ON, degree mode. When X0 = ON, DSIN instruction performs sine operation on the degree value (0°degree360°) in (D1, D0) and stores the SIN value in (D11, D10) in binary floating format.

M1002

SET M1018

X0

DSIN D0 D10

D 1

D 0

Degree value

D 11

D 10

SIN value

(binary floating point)

3 - 316

Page 432
Image 432
Delta DVP-ES2/EX2/SS2/SA2/SX2/SE manual Movp