Download Programming Manual - Mitsubishi Electric

Transcript
5. OPERATION CONTROL PROGRAMS
5.6.3
Tangent : TAN
F/FS
G
Format
Number of Basic Steps
TAN(S)
2
(1) Usable data
Usable Data
Data to
be Set
Bit device
(S)

16-bit
integer
type
Word device
64-bit
32-bit
floatinginteger
point
type(L)
type(F)
Coasting
timer
16-bit
integer
type
(K/H)
Constant
32-bit
integer
type
(K/H,L)
64-bit
floatingpoint
type (K)
ComparBit
Calculation
ison
conditional
expression
conditional
expression
expression


(2) Data to be set
Data to be Set
Description
Data Type of Result
(S)
Angle data on which TAN (tangent)
operation will be performed
Floating-point type
(3) Functions
(a) TAN (tangent) operation is performed on the data specified at (S).
(b) The data specified at (S) is in an angle (degree) unit.
(c) If (S) is an integer type, it is converted into a floating-point type before
operation is performed.
(4) Errors
(a) An operation error will occur if:
1) (S) is an indirectly specified device and its device number is outside the
range; or
2) (S) is 90+(180*n). (n is an integer)
(5) Program examples
(a) Program which performs the TAN operation of D0 and assigns the result to
#0F
#0F = TAN(D0)
#3
#2
#1
#0
0.57735026918963
5 − 24
D0
30