Mitsubishi Electronics QSERIES Smoker User Manual


  Open as PDF
of 1204
 
7-266
ASIND(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 value specified by is within the double-precision floating-point range and outside
the range of -1.0 to 1.0. (Error code: 4100)
The result exceeds the following range (Operation results in an overflow):
2
1024
| Operation result | (Error code: 4141)
Program Example
(1) The following program seeks the inverse sine of the 64-bit floating decimal point real number
at D0 to D3, and outputs the angle to the 4 BCD digits at Y40 to Y4F.
[Ladder Mode]
[List Mode]
[Operations involved when the D0 to D3 value is 0.5]
S
Calculates an angle (radian value)
by SIN operation ( ).
Converts the radian value into
an angle ( ).
Converts the angle in 64-bit floating-point
real number into an integer ( ).
Outputs
the integer-converted angle to a
display device ( ).
1
1
2
3
4
Step Instruction Device
64-bit floating-point
real number
D1
0.5
D0D3 D2
64-bit floating-point
real number
D21
30
D20D23 D22
64-bit floating-point
real number
D11
0.5235988
D10D13 D12
Conversion
to BIN
INTD
BCD operation
BCD
ASIND
Conversion to angle
DEGD
Y4F
BCD value
0
030
Y40
D30
b15 b0
BIN value
30
SIN operation
1
1
2
3
4