652
7 APPLICATION INSTRUCTIONS
7.12 Special Function Instructions
BCD type COS operations
BCOS(P)
• Calculates COS (cosine) value of value (angle) designated by (S), then stores the sign for the operation result in the word
device designated by (D), and the operation result in the word device designated by (D)+1 and (D)+2.
• The value designated at (S) is a BCD value which can be between 0 and 360 degrees (in units of degrees).
• The sign for the operation result stored in (D) will be "0" if the result is a positive value, and "1" if the result is a negative
value.
• The operation results stored in (D)+1 and (D)+2 are BCD values within the range of -1.0000 and 1.0000.
• Operation results are rounded off to four decimal places.
• In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
(S): Data of which the COS (cosine) value is obtained or head number of the devices where the data is stored (BCD 4 digits)
(D): Head number of the devices where the operation result will be stored (BCD 4 digits)
Setting
data
Internal device R, ZR J\ U\G Zn Constant
K, H
Others
Bit Word Bit Word
(S)
(D)
Error
code
Error details Q00J/
Q00/
Q01
QnH QnPH QnPRH QnU LCPU
4100 The data specified in (S) is not a BCD value.
The data specified in (S) is not in the range from 0 to 360.
4101 The points of the device specified in (D) exceeds those of the corresponding
device.
Process
High
performance
Redundant
Universal
LCPU
Basic
BCOS
Command
Command
BCOSP
BCOSP
BCOSSD
S D
+2
D
S
Integer part Decimal fraction part
.
D
Sign
COS
+1
D