328
Special Instructions Section 5-26
Flags ER: A subroutine does not exist for the specified subroutine number.
An operand has exceeded a data area boundary.
Indirectly addressed DM word is non-existent. (Content of *DM word
is not BCD, or the DM area boundary has been exceeded.)
A subroutine has called itself.
An active subroutine has been called.
5-26-5 BIT COUNTER – BCNT(67)
Note BCNT(67) is an expansion instruction for the SRM1. The function code 67 is
the factory setting and can be changed for the SRM1 if desired.
Limitations N cannot be 0.
DM 6144 to DM 6655 cannot be used for R.
Description When the execution condition is OFF, BCNT(67) is not executed. When the
execution condition is ON, BCNT(67) counts the total number of bits that are
ON in all words between SB and SB+(N–1) and places the result in R.
Flags ER: N is not BCD, or N is 0; SB and SB+(N–1) are not in the same area.
The resulting count value exceeds 9999.
Indirectly addressed DM word is non-existent. (Content of *DM word
is not BCD, or the DM area boundary has been exceeded.)
EQ: ON when the result is 0.
5-26-6 FRAME CHECKSUM – FCS(––)
Limitations This instruction is available in the CQM1/SRM1 only.
The 3 rightmost digits of C must be BCD between 001 and 999.
DM 6143 to DM 6655 cannot be used for D.
N: Number of words (BCD)
IR, SR, AR, DM, HR, TC, LR, #
SB: Source beginning word
IR, SR, AR, DM, HR, TC, LR
Operand Data Areas
R: Destination word
IR, SR, AR, DM, HR, TC, LR
Ladder Symbols
BCNT(67)
N
SB
R
@BCNT(67)
N
SB
R
C: Control data
IR, SR, AR, DM, HR, LR, #
R
1
: First word in range
IR, SR, AR, DM, HR, TC, LR
Ladder Symbols
Operand Data Areas
D: First destination word
IR, SR, AR, DM, HR, LR
FCS(––)
C
R
1
D
@FCS(––)
C
R
1
D