EasyManua.ls Logo

Mitsubishi MELSEC-A series - Page 130

Mitsubishi MELSEC-A series
508 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
Loading...
6. BASIC INSTRUCTIONS
6 18
MELSEC-A
Program Examples *
(1) Program which stores the multiplication result of 5678 and 1234 in BIN to D3
and 4 when X5 turns on.
(2) Program which outputs the multiplication result of the BIN data of X8 to F and
the BIN data of X10 to 1B to Y30 to 3F.
/
Program which outputs the quotient, obtained by dividing the data of X8 to F by
3.14, to Y30 to 3F when X3 turns on.
Coding
0 LD X005
1 *P K5678 K1234 D3
8 END
0
X005
P K K
* 5678 1234 D3
Coding
0 LD M9038
1 * K2X008 K3X010 K4Y030
8 END
0
M9038
K2 K3 K4
* X008 X010 Y030
Coding
0 LD X003
1 *P K2X008 K100 D0
8 /P D0 K314 K4Y030
15 END
0
X003
P K2 K
* X008 100 D0
P K K4
/
D0 314 Y030

Table of Contents

Other manuals for Mitsubishi MELSEC-A series

Related product manuals