Special Math Instructions
1,2,3...
3-13-5 BIT COUNTER: BCNT(067)
Purpose
Ladder Symbol
Variations
Applicable Program Areas
470
1. D2000 and D2002 are set to 0000 and D2001 and D2003 are set to 4000.
Dividend
D0
D2001
D2000
#4000 transferred.
4
(3452 = 0.3452 x 10
4
0079 = 0.0079 x 10
)
2. MOVD(083) is used to move the digits of the original source words to the
proper digits in the 2-word floating-point formats.
D1000
3
4
5
2
D2001
D2000
4
3
4
5
2
0
3. FDIV(079) divides the floating-point number in D2001 and D2000 by the
floating-point number in D2003 and D2002.
D2001
D2000
4
3
4
5
2
D2003
D2002
4
0
0
7
9
D3
2
4
3
6
9
Counts the total number of ON bits in the specified word(s).
BCNT(067)
N
N: Number of words
S: First source word
S
R
R: Result word
Variations
Executed Each Cycle for ON Condition
Executed Once for Upward Differentiation
Executed Once for Downward Differentiation Not supported.
Immediate Refreshing Specification
Block program areas
OK
OK
Divisor
D1
D2003
#0000 transferred.
(D2000 and D2002 cleared.)
D1001
0
0
D2003
0
0
4
0
0
0
0
0
0.3452000
10
0
0
0
0.0079000
10
D2
6
2
0
0.4369620
10
Step program areas
Subroutines
OK
Section 3-13
D2002
7
9
D2002
7
9
0
0
0
4
4
2
BCNT(067)
@BCNT(067)
Not supported.
Interrupt tasks
OK
Need help?
Do you have a question about the CP - PROGRAMMING MANUAL 05-2007 and is the answer not in the manual?
Questions and answers