7-286
7.12 Special Function Instructions
7.12.26 COS operation on data in BCD format
BCOS
7.12.26
COS operation on data in BCD format
BCOS
Function
(1) Evaluates the cosine function on the value (angle) specified for
, then stores the sign of
the operation result to the word device specified for
, and the operation result to the word
device specified for
+1 and
+2.
(2) The value specified for
is a BCD value which can be between 0 and 360 degrees
(in degrees).
(3) The sign for the operation result stored to
will be 0 if the result is a positive value, and 1 if
the result is a negative value.
(4) The operation results stored to
+1 and
+2 are BCD values between 1.000 and 1.000.
(5) The value of the operation result is rounded off at the fifth digit of decimal fraction.
BCOS(P)
P: Executing condition
:
indicates any of the following
instructions.
BCOS
BCOSP
Input argument,
EN:
Executing condition
:Bit
s:
Data on which the cosine function is evaluated, or start
number of the device that stores data
:ANY16
Output argument,
ENO:
Execution result
:Bit
d:
Start number of the device that stores the operation result
:Array of ANY16 (0..2)
Setting
data
Internal device
R, ZR
J
\
U
\G
Zn
Constant
K, H
Others
Bit
Word
Bit
Word
−
−
−
−
Universal
UD
High
Performance
Structured ladder
ST
B
COS
EN
ENO
s
d
B
COS
(EN,
s
, d);
ENO:=
s
d
s
d
d
d
+2
d
s
I
nteger
part
Dec
i
ma
l
fract
i
on
.
d
Si
gn
COS
+1
d
s
d
d
d
Summary of Contents for MELSEC Q Series
Page 1: ...Structured Programming Manual Mitsubishi Programmable Controller QCPU Common Instructions ...
Page 2: ......
Page 14: ...A 12 MEMO ...
Page 340: ...6 178 MEMO MTR ...
Page 708: ...7 368 MEMO ...
Page 776: ...8 68 MEMO ...
Page 796: ...9 20 MEMO ...
Page 804: ...App 8 MEMO ...
Page 812: ...Index 8 MEMO ...
Page 815: ......