3 . I n s t r u c t i o n S e t
M N 0 5 0 0 3 0 0 3 E F o r m o r e i n f o r m a t i o n v i s i t :
w w w. e a t o n . c o m
3 - 3 1 5
API Mnemonic
Operands
Function
130
D SIN P
S, D
Floating Point Sine Operation
Bit Devices
Word devices
Program Steps
Type
OP
X Y M S K H KnX KnY KnM KnS T
C
D
E
F
S
*
*
*
D
*
DSIN, DSINP: 9 steps
ELC ELCB
ELCM
PB PC/PA/PH
PV
PB PH/PA
32
16
P
32
16
P
32
16
P
32 16
P
32
16
P
Operands:
S
: Specified RAD value or an angle (0
°≦
S
<
360
°
)
D
: Result of the SIN operation
Description:
1. Source
S
can be in radians or an angle based on flag M1018.
2.
When M1018= OFF, it is set to radian mode. RAD=angle
×π
/180.
3.
When M1018= ON, it is set to angle mode. Angle range: 0
°≦
angle
<
360
°
.
4.
The SIN value of an angle specified by
S
is calculated and the result is stored in the register
specified by
D
.
5.
Flag: M1018 flag for radian/angle.
S: Radian
R: Result
R
S
-2
3
2
-2
2
3
2
2
2
-
1
-1
0
-
Following shows the relation between radian and result:
6.
If result of D is 0, the Zero flag M1020=ON.
Program Example 1:
When M1018= OFF, the radian mode is used. When X0= ON, the SIN of the RAD value (D1, D0) is
calculated and the result is stored in (D11, D10). The result in (D11, D10) is in binary floating point
format.
M1002
RST
M1018
X0
DSIN
D0
D10
D1
D0
D11
D10
SIN value
binary floating point
binary floating point
RAD value(degree x
π
/180)
Summary of Contents for ELC-PB
Page 1: ......
Page 5: ...For more information visit www eaton com MN05003003E iv...
Page 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Page 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Page 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Page 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...