Omron CJ - REFERENCE MANUAL 02-2010 Reference Manual page 1146

Table of Contents

Advertisement

3. Instructions
Function
BCNTC(621) counts the total number of bits that are
ON in all words between S and S+(N–1) and places
the BCD result in R.
Precaution
• S and S+(N-1) must be in the same data area.
Example Programming
When CIO 0.00 is ON in the following example, BCNTC(621) counts the total number of ON bits in the
10 words from CIO 100 through CIO 109 and writes the result to D100.
0.00
BCNTC
N
#0010
S
R
1110
100
101
to
100
D100
109
S+(N–1)
Counts the number
of ON bits (35).
to
R: D100
CS/CJ/NSJ Series Instructions Reference Manual (W474)
N words
Counts the number
to
of ON bits.
BCD result
R
3
5
0035 BCD

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CJ - REFERENCE MANUAL 02-2010 and is the answer not in the manual?

Table of Contents