Mitsubishi Electronics QSERIES Smoker User Manual


  Open as PDF
of 1204
 
7-261
TAND(P)
1
2
3
4
6
6
7
8
7.12 Special function instructions
7.12.6 TAN operation on floating-point data (Double precision) (TAND(P))
Operation Error
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and
an error code is stored into SD0.
The value of the specified device is not in the following range: (Error code: 4140)
0,2
-1022
| value of specified device | < 2
1024
The value of the designated device is 0. (Error code: 4140)
The result exceeds the following range (Operation results in an overflow):
2
1024
| Operation result | (Error code: 4141)
Program Example
(1) The following program performs a TAN operation on the angle data set by the 4 BCD digits
from X20 to X2F, and stores the results as 64-bit floating decimal point type real numbers at
D0 to D3.
[Ladder Mode]
[List Mode]
[Operations involved when X20 to X2F designate a value of 135]
Inputs an angle used for TAN
operation ( ).
Converts the input angle into a
64-bit floating-point real number ( ).
Converts the converted angle into a
radian value ( ).
Executes TAN operation
using the
converted radian value ( ).
1
2
3
4
Step Instruction Device
64-bit floating-point
real number
X2F
BCD value
0
D30
135
X20
Conversion
to BIN
BIN
b15
b0
BIN value
Conversion to radian
RADD
TAN operation
TAND
135
Conversion to
floating-point
FLTD
D21
135
D20D23 D22
64-bit floating-point
real number
D21
2.356194
D20D23 D22
64-bit floating-point
real number
D21
-1.000000
D20D23 D22
1
2
3
4