7-296
7.12 Special Function Instructions
7.12.29 COS
-1
operation on data in BCD format
BACOS
O
peration Error
In any of the following cases, an operation error occurs, the error flag (SM0) is turned ON, and
the corresponding error code is stored to SD0.
• The value specified for
is not a BCD value.
(Error code: 4100)
• The value specified for
is not in the range of 1.000 to 1.000.
(Error code: 4100)
• The device specified for
exceeds the corresponding device range. (For Universal
model QCPU only)
(Error code: 4101)
Program Example
In the following program, the arccosine function is evaluated on the data in which X0 with positive
and negative signs (positive when X0 is OFF, and negative when X0 is ON), the integer part in
BCD 1 digit from X30 to X33 and the decimal fraction in BCD 4 digit from X20 to X2F, and the
evaluated angle is output in BCD 4 digits to the devices from Y40 to Y4F.
[Structured ladder]
s
s
s
S
ets
the
s
i
gn
of
the
cos
i
ne
va
l
ue
. ( )
S
ets
the
d
ec
i
ma
l
fract
i
on
of
the
cos
i
ne
va
l
ue
. ( )
S
ets
the
i
nteger
part
of
the
cos
i
ne
va
l
ue
. ( )
E
va
l
uates
the
arccos
i
ne
funct
i
on
an
d
outputs
the
operat
i
on
resu
l
t
to
the
d
ev
i
ces
from
Y40
to
Y4F. ( )
T
urns
M0 ON w
hen
D
1>1,
or
D
1=1
an
d
D
2 0.
1
2
3
4
Содержание MELSEC Q Series
Страница 1: ...Structured Programming Manual Mitsubishi Programmable Controller QCPU Common Instructions ...
Страница 2: ......
Страница 14: ...A 12 MEMO ...
Страница 340: ...6 178 MEMO MTR ...
Страница 708: ...7 368 MEMO ...
Страница 776: ...8 68 MEMO ...
Страница 796: ...9 20 MEMO ...
Страница 804: ...App 8 MEMO ...
Страница 812: ...Index 8 MEMO ...
Страница 815: ......