Mitsubishi MELSEC Q Series Programming Manual page 691

Common instruction 1/2
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

Program Example
(1) The following program performs a COS
and negative when X0 is ON), 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
[Operations involved if X0 and X20 to X33 designate a value of
X0 ON
X33
X30
0
BCD value
X2F
X20
7
6
5
0
BCD value
Device
D0
1
0
0
0
1
BCD value
D1
2
Transfer
BACOS operation
4
0
0
0
0
MOV
BCD value
D2
Transfer
3
7
6
5
0
MOV
BCD value
-1
operation on the sign (positive when X0 is OFF,
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 (
Y4F
Y40
0
1
4
0
BACOS
BCD value
BACOS(P)
)
1
)
2
)
3
)
4
0.7650]
7-317
1
2
3
4
6
6
7
8

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents