Omron CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 Reference Manual page 495

Programmable controllers
Hide thumbs Also See for CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009:
Table of Contents

Advertisement

3. Instructions
Precautions
• Some time will be required to complete BCNT(067) if a large number of words is specified. Even if an
interrupt occurs, execution of this instruction will not be interrupted and execution of the interrupt task
will be started after execution of BCNT(067) has been completed. One BCNT(067) instruction can
be replaced with two BCNT(067) instructions to help avoid this problem.
Sample Program
When CIO 0.00 is ON in the following example, BCNT(067) 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
BCNT
N
S
R
458
BCNT
&1000
D1000
W0
100
10 words
101
&10
to
100
D100
109
BCNT
&500
D1000
W1
W1: Temporary storage
BCNT
&500
D1500
W2: Temporary storage
W2
+
W1
W2
W0
Counts the number
of ON bits (35).
to
R: D100
CS/CJ/NSJ Series Instructions Reference Manual (W474)
23 hexadecimal
(35 decimal)

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 and is the answer not in the manual?

Questions and answers

Table of Contents