385
Special Instructions
Section 5-28
Indirectly addressed EM/DM word is non-existent.
(Content of
*
EM/
*
DM word is not BCD, or the EM/DM area boundary
has been exceeded.)
A subroutine has called itself.
An active subroutine has been called.
5-28-5 BIT COUNTER – BCNT(67)
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 EM/DM word is non-existent.
(Content of
*
EM/
*
DM word is not BCD, or the EM/DM area boundary
has been exceeded.)
EQ:
ON when the result is 0.
5-28-6 FRAME CHECKSUM – FCS(– –)
Limitations
The 3 rightmost digits of C must be BCD between 001 and 999.
DM 6143 to DM 6655 cannot be used for D.
Description
FCS(––) can be used to check for errors when transferring data through com-
munications ports.
When the execution condition is OFF, FCS(––) is not executed. When the exe-
cution condition is ON, FCS(––) calculates the frame checksum of the speci-
fied range by exclusively ORing either the contents of words R
1
to R
1
+N–1 or
N
:
Number of words (BCD)
IR, SR, AR, DM, EM, HR, TIM/CNT, LR, #
SB
:
Source beginning word
IR, SR, AR, DM, EM, HR, TIM/CNT, LR
Operand Data Areas
R
:
Destination word
IR, SR, AR, DM, EM, HR, TIM/CNT, LR
Ladder Symbols
BCNT(67)
N
SB
R
@BCNT(67)
N
SB
R
C
:
Control data
IR, SR, AR, DM, EM, HR, LR, #
R
1
:
First word in range
IR, SR, AR, DM, EM, HR, TIM/CNT, LR
Ladder Symbols
Operand Data Areas
D
:
First destination word
IR, SR, AR, DM, EM, HR, LR
FCS(
−−
)
C
R
1
D
@FCS(
−−
)
C
R
1
D