EasyManuals Logo
Home>Mitsubishi>Controller>MELSEC-Q/L

Mitsubishi MELSEC-Q/L User Manual

Mitsubishi MELSEC-Q/L
850 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #547 background imageLoading...
Page #547 background image
545
BCOS, BCOSP
1
2
3
4
4
6
7
8
7.12 Special function instructions
7.12.30 BCOS, BCOSP
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.
Program Example
(1) The following program calculates the cosine of the data designated by the 3 BCD digits from X20 to X2B and outputs the
integer part of the result to 1 BCD digit from Y50 to Y53, and the decimal fraction part of the result to the 4 BCD digits
from Y40 to Y4F.
Y60 is turned ON if the results of the operation are negative.
[Ladder Mode]
[List Mode]
[Operations involved when value designated by X20 to X2B is 430]
Error
code
Error details
Q00J/
Q00/
Q01
QnH QnPH QnPRH QnU LCPU
4100
The data specified in is not a BCD value.
The data specified in is not in the range from 0 to 360.
––
4101
The points of the device specified in exceed those of the
corresponding device.
–– –– –– ––
S
S
D
Processes so that the input
angle is within 360° ( )
Executes COS operation ( )
Outputs the integer part of the operation
result to a display device ( )
Outputs the decimal fraction part of the
operation result to a display device ( )
Outputs the sign of the operation result
by ON or OFF ( )
1
2
3
4
5
Step Instruction Device
X2B
BCD value
430
X20
B/ operation
B/
BCOS
operation
BCOS
OUT
D10
BCD value
(quotient)
0001
D11
BCD value
(remainder)
0070
D20
Transfer
MOV
D21
Transfer
MOV
D22
BCD value
0000
BCD value
0000
BCD value
3420
Y4F
BCD value
3420
Y40
Y53
BCD value
0
Y50
Y60 ON
1
2
3
4
5

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Mitsubishi MELSEC-Q/L and is the answer not in the manual?

Mitsubishi MELSEC-Q/L Specifications

General IconGeneral
BrandMitsubishi
ModelMELSEC-Q/L
CategoryController
LanguageEnglish

Related product manuals