Delta DVP-ES2/EX2/SS2/SA2/SX2/SE manual Mnemonic Operands Function, Sin

Models: DVP-ES2/EX2/SS2/SA2/SX2/SE

1 702
Download 702 pages 56.54 Kb
Page 431
Image 431

3. Instruction Set

API

 

 

Mnemonic

 

Operands

Function

 

 

 

 

 

 

 

 

 

130

 

D

 

SIN

 

P

 

Sine

 

 

 

 

 

 

 

 

 

Controllers

ES2/EX2 SS2 SA2 SX2

SE

Type

Bit Devices

 

Word devices

 

 

 

 

Program Steps

OP

X

Y

M

S

K

H KnX KnY KnM KnS T

C

D

E

F

DSIN, DSINP: 9 steps

S

 

 

 

 

*

*

 

*

 

 

 

D

 

 

 

 

 

 

 

*

 

 

 

 

 

 

 

 

 

PULSE

 

 

16-bit

 

32-bit

ES2/EX2

SS2

SA2

SX2

ES2/EX2

SS2

SA2

SX2

ES2/EX2

SS2

SA2

SX2

SE

SE

SE

Operands:

S: Source device (0°S360°) D: Operation result

Explanations:

1.SIN instruction performs sine operation on S and stores the result in D.

2.The value in S can be set as radian or degree by flag M1018.

3.M1018 = OFF, radian mode. RAD = degree ×π/180.

4.M1018 = ON, degree mode. Degree range: 0°degree360°.

5.Flag: M1018 (Flag for Radian/Degree)

6.See the figure below for the relation between the radian and the operation result:

 

 

 

 

 

 

 

 

R

 

 

S: Radian

 

 

 

 

 

 

 

 

 

 

 

1

 

 

 

R: Result (SIN value)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3

 

 

 

 

 

0

 

 

3

 

 

-2 -

2

-2

- 2

 

 

2

2

2

 

 

 

 

 

 

 

 

 

-1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7.If operation result in D is 0, Zero flag M1020 = ON.

Program Example 1:

M1018 = OFF, radian mode. When X0 = ON, DSIN instruction conducts sine operation on binary floating value in (D1, D0) and stores the SIN value in (D11, D10) in binary floating format.

 

M1002

 

 

 

 

 

 

 

 

 

 

RST

M1018

 

 

 

 

 

 

 

 

X0

 

 

 

 

 

 

 

DSIN

D0

D10

 

 

 

 

 

 

 

 

 

 

 

 

 

 

D1

D0

RAD value(degree x π/180)

 

 

 

 

 

 

 

 

binary floating point

 

 

 

 

 

 

 

 

 

 

 

D11

D10

SIN value

 

 

 

 

binary floating point

 

 

 

 

 

 

 

3 - 3 1 5

Page 431
Image 431
Delta DVP-ES2/EX2/SS2/SA2/SX2/SE manual Mnemonic Operands Function, Sin