7-311
BCOS(P)
1
2
3
4
6
6
7
8
7.12 Special function instructions
7.12.30 BCD type COS operations (BCOS(P))
7.12.30 BCD type COS operations (BCOS(P))
BCOS(P)
Function
(1) Calculates COS (cosine) value of value (angle) designated by , then stores the sign for
the operation result in the word device designated by , and the operation result in the
word device designated by +1 and +2.
(2) The value designated at is a BCD value which can be between 0 and 360 degrees
(in units of degrees).
(3) The sign for the operation result stored in will be "0" if the result is a positive value, and
"1" if the result is a negative value.
(4) The operation results stored in +1 and +2 are BCD values between 1.000 and 1.000.
(5) Operation results are rounded off from the fifth decimal place.
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 data designated by is not a BCD value. (Error code: 4100)
• The data designated by is not in the range of from 0 to 360. (Error code: 4100)
• The device specified by exceeds the range of the corresponding device.
(For the Universal model QCPU only.) (Error code: 4101)
: Data of which the COS (cosine) value is obtained or head number of the devices where the data is stored
(BCD 4 digits)
: Head number of the devices where the operation result will be stored (BCD 4 digits)
Setting
Data
Internal Devices
R, ZR
J\
U\G
Zn
Constants
K, H
Other
Bit Word Bit Word
––
–– –– ––
Process
High
performance
Redundant
Universal
Basic
BCOS
Command
Command
BCOSP
BCOSP
BCOS S D
S D
S
D
S
D
S
D
D D
+2
D
S
Integer part Decimal fraction part
.
D
Sign
COS
+1
D
S
D
D D
S
S
D