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 9
API Mnemonic
Operands
Function
132
D TAN P
S, D
Floating Point Tangent 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
*
DTAN, DTANP: 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 (0
°≦
S
<
360
°
)
D
: Area where calculated result is stored
Description:
1.
Source designated by
S
can be in radians or an angle based on flag M1018.
2.
When M1018= OFF, is set to radian mode. RAD=angle
×π
/180.
3.
When M1018= ON, is set to angle mode. Angle range: 0
°≦
angle
<
360
°
.
4.
The TAN value of an angle specified by
S
is calculated and the result is stored in the register
specified by
D
.
S: Radian
R: Result
Following shows the relation between radian and result:
R
S
-2
2
3
2
2
2
-
1
-1
0
3
2
-
-
1
5.
If result of D is 0, the zero flag M1020=ON.
Program Example 1:
When M1018= OFF, it is in radian mode. When X0= ON, take the TAN of RAD value (D1, D0) and
store the result in (D11, D10). The value in (D1, D0) and the result stored in (D11, D10) are all in
binary floating point format.
M1002
RST
M1018
X0
DTAN
D0
D10
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...