1062
Model Conversion Instructions Section 3-33
Description 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.
Flags
Note In C-series PLCs, the BIT COUNTER (BITC) instruction will cause the Error
Flag to go ON if the content of an indirectly addressed DM word (*DM) is not
BCD, or the DM area boundary is exceeded. BCNTC(621) will not cause the
Error Flag to go ON in these cases.
Precautions An error will occur if N is not BCD between 0001 and 9999, or the result
exceeds 9,999.
Example 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 1000 through CIO 1009 and
writes the result to D100.
3-33-6 GET VARIABLE ID: GETID(286)
Purpose Outputs the FINS command variable type (data area) code and word address
for the specified variable or address. This instruction is generally used to get
the assigned address of a variable in a function block.
Ladder Symbol
Variations
S+(N–1)
R
to
N words
BCD result
Counts the number
of ON bits.
Name Label Operation
Error Flag ER ON if N is not within the range 0001 to 9999 BCD.
ON if result exceeds 9999 BCD.
OFF in all other cases.
Equals Flag = ON if the result is 0000.
OFF in all other cases.
R:D100
0.00
#0010
1000
D100
N
S
R
BCNTC
1000
1001
1009
to to
Counts the number
of ON bits (35).
0035 BCD
35
GETID(286)
S
D1
D2
S: Source data
D1: Variable code
D2: Word address
Variations Executed Each Cycle for ON Condition GETID(286)
Executed Once for Upward Differentiation @GETID(286)
Executed Once for Downward Differentiation Not supported.
Immediate Refreshing Specification Not supported.