EasyManuals Logo

Mitsubishi MELSEC-A series Programming Manual

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
Page #246 background imageLoading...
Page #246 background image
7. APPLICATION INSTRUCTIONS
7 44
MELSEC-A
Execution Conditions
Program Examples SUM
Program which obtains the number of bits, which are on (1), in the data of X30 to 3F
when X8 turns on.
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.
OFF
ON
Executed
per scan
Executed
per scan
Executed
only once
Executed
only once
Operation command
P
Coding
0 LD X008
1 SUMP K4X030
4 END
X008
0
PK4
SUM X030
Counted data
Total number of 1s is stored into A0.
Searching the data of X20 to 3F, the number of bits
which are "on" is stored into A0.
X00B
0
PK8
DSUM X020
PK7
DSUM X040
P
MOV A0 D18
P
+ A0 D18
Data of A0 is stored into D18.
Searching the data of X40 to 5B, the number of bits
which are "on" is stored into A0.
Data of A0 and that of D18 are added and stored into
D18.
Coding
0 LD X00B
1 DSUMP K8X020
4 MOVP A0 D18
9 DSUMP K7X040
12 +P A0 D18
17 END

Table of Contents

Other manuals for Mitsubishi MELSEC-A series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Mitsubishi MELSEC-A series and is the answer not in the manual?

Mitsubishi MELSEC-A series Specifications

General IconGeneral
BrandMitsubishi
ModelMELSEC-A series
CategoryController
LanguageEnglish

Related product manuals