beautypg.com

Delta Electronics Programmable Logic Controller DVP-PLC User Manual

Page 446

background image

8 Application Instructions API 100-149

DVP-PLC Application Manual

8-44

D10

FLT

M1000

D14

K31415926 K1800000000

D20

D14

D40

K30

MOVP

X0

D10

K60

X1

D10

D50

D40

DEDIV

DSIN

D20

MOVP

DEMUL

(K30 D10)

(K60 D10)

(D10 D15, D14)

( /180) (D21, D20)

(D15, D14) angle x /180
(D41, D40) RAD binary floating point

(D41 D40) RAD (D51, D50) SIN

,

binary

floating point

binary floating point

binary

floating point

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 < 360°)

M1002

SET

M1018

X0

DSIN

D0

D10

D 1

D 0

D 11

D 10

angle value

SIN value
(binary floating point)

Remarks:

For floating point operations, see “5.3 Handling of Numeric Values”.