Bcd Type Cos Operations - Mitsubishi Electric MELSEC-Q/L Programming Manual

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

BCD type COS operations

BCOS(P)
Basic
High
Process
performance
(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
Internal device
data
Bit
(S)
(D)
Processing details
• 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.
D
COS
S
Sign
• 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.
Operation error
• In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
Error
Error details
code
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.
7 APPLICATION INSTRUCTIONS
652
7.12 Special Function Instructions
Redundant Universal
LCPU
BCOS
BCOSP
R, ZR
Word
D
+1
D
Integer part
Decimal fraction part
.
Command
Command
J\
Bit
Word
+2
Q00J/
Q00/
Q01
BCOS
S
D
BCOSP
S
D
U\G
Zn
QnH
QnPH
QnPRH
Constant
Others
K, H
QnU
LCPU

Advertisement

Table of Contents
loading

Table of Contents