Omron CJ - INSTRUCTIONS Reference Manual page 1167

Table of Contents

Advertisement

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
CS/CJ/NSJ Series Instructions Reference Manual (W474)
100
101
to
100
D100
109
S+(N–1)
Counts the number
of ON bits (35).
to
R: D100
3. Instructions
N words
Counts the number
to
of ON bits.
BCD result
R
3
5
0035 BCD
1129
3

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents