Mitsubishi Electric MELDAS 60 Series Programming Manual page 163

Plc programming
Hide thumbs Also See for MELDAS 60 Series:
Table of Contents

Advertisement

Program example
Program to rotate the D10 details 3 bits to the left when M0 turns ON.
M0
10
(pulse coding)
D10 before execution
(n=1)
Transition
(n=2)
D10 after execution (n=3)
ROL
Carry flag
(SM12)
B15 B14 B13 B12 B11 B10 B9 B8 B7 B6 B5 B4 B3 B2 B1 B0
0 0
1
0
*
To B0
1
0
0
0
0
To B0
0
0 0
0
0
To B0
0
0
0
0
0 0
*The carry flag is set to 1 or 0 before execution.
Left rotation of data using ROL command
Coding
No. of
D10
K3
steps
10
11
14
0
0 0
0
0
0
0
0
0 0
0
0
0
0 0
0
0
0 0
0
0
0
0
0
- 155 -
ROL
Com-
Device
mand
LD
M0
ROL
D10
K3
0
0
0
0
0
0
0
0
0 0
1
0 1
0
0
0
0
1
0
0
0 0
0
B15 details
before execution
B15 details
when n=1
B15 details
when n=2

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents