Mitsubishi MELSEC-Q/L Programming Manual page 552

Table of Contents

Advertisement

BACOS, BACOSP
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.
Error
code
The operation data specified in
4100
The operation data specified in
1.0000.
The points of the device specified in
4101
corresponding device.
Program Example
(1) The following program performs a COS
the BCD 1-digit integer part from X30 to X33 and the BCD 4-digit decimal fraction part from X20 to X2F, and outputs the
calculated angle in 4 BCD digits from Y40 to Y4F.
[Ladder Mode]
[List Mode]
Step
Instruction
550
Error details
is not a BCD value.
S
is not in the range from -1.0000 to
S
exceed those of the
S
-1
operation on the sign (positive when X0 is OFF, and negative when X0 is ON),
Sets the sign of a COS value (
Sets the integer part of a COS value (
Sets the decimal fraction part of a COS value (
Turns M0 ON when D1>1 or D1=1 and D2 0
Executes COS -1 operation and outputs
the result of operation to Y40 to Y4F (
Device
Q00J/
Q00/
QnH
QnPH QnPRH
Q01
––
––
––
––
––
)
1
)
2
)
3
)
4
QnU
LCPU

Advertisement

Table of Contents
loading

Table of Contents