Mitsubishi MELSEC-A Series Programming Manual page 246

Type acpu/qcpu-a (a mode)
Hide thumbs Also See for MELSEC-A Series:
Table of Contents

Advertisement

7. APPLICATION INSTRUCTIONS
Execution Conditions
Operation command
Program Examples
OFF
P
SUM
Program which obtains the number of bits, which are on (1), in the data of X30 to 3F
when X8 turns on.
X008
P
SUM
0
Counted data
DSUM
Program which stores the number of bits, which are on (1), in the data of X20 to 5B,
to D18 when XB turns on.
X00B
0
MOV
+
• Coding
0
LD
1
DSUMP K8X020
4
MOVP
9
DSUMP K7X040
12
+P
17
END
ON
Executed
per scan
Executed
only once
• Coding
K4
X030
Total number of 1s is stored into A0.
P
K8
Searching the data of X20 to 3F, the number of bits
DSUM
X020
which are "on" is stored into A0.
P
A0
D18
Data of A0 is stored into D18.
P
K7
Searching the data of X40 to 5B, the number of bits
DSUM
X040
which are "on" is stored into A0.
P
Data of A0 and that of D18 are added and stored into
A0
D18
D18.
X00B
A0
D18
A0
D18
7 − 44
MELSEC-A
Executed
per scan
Executed
only once
0
LD
X008
1
SUMP
K4X030
4
END

Advertisement

Table of Contents
loading

This manual is also suitable for:

Acpu-common-p-e13j741AcpuQcpu-a

Table of Contents