B/--bl, Applicable program areas operands, Flags function – Omron SYSMAC CP CP1E-N@@D@-@ User Manual
Page 192: 2 instructions, Operand specifications
![background image](/manuals/204951/192/background.png)
2 Instructions
2-156
CP1E CPU Unit Instructions Reference Manual(W483)
--B/--BL
Applicable Program Areas
Operands
Operand Specifications
Flags
Function
Instruction
Mnemonic
Variations
Function
code
Function
DECREMENT BCD
--B
@--B
596
Decrements the 4-digit BCD content of the speci-
fied word by 1.
DOUBLE DECREMENT BCD
--BL
@--BL
597
Decrements the 8-digit BCD content of the speci-
fied words by 1.
Symbol
--B
--BL
Area
Step program areas
Subroutines
Interrupt tasks
Usage
OK
OK
OK
Operand
Description
Data type
Size
--
--L
--
--L
Wd
--B: Word
--BL: First word
WORD
DWORD
1
2
Area
Word addresses
Indirect DM addresses
Constants
CF
Pulse
bits
TR
bits
CIO
WR
HR
AR
T
C
DM
@DM
*DM
Wd
OK
OK
OK
OK
OK
OK
OK
OK
OK
---
---
---
---
Name
Label
Operation
Error Flag
P_ER
• ON if the content of Wd/Wd+1 and Wd is not BCD.
• OFF in all other cases.
Equals Flag
P_EQ
• ON if the result is 0000/0000 0000 after execution.
• OFF in all other cases.
Carry Flag
P_CY
• ON if a digit in Wd/Wd+1 or Wd went from 0 to 9 during execution.
• OFF in all other cases.
--B
The --B(596) instruction subtracts 1 from the BCD
content of Wd. The specified word will be decre-
mented by 1 every cycle as long as the execution
condition of --B(596) is ON. When the up-differenti-
ated variation of this instruction (@--B(596)) is used,
the specified word is decremented only when the exe-
cution condition has gone from OFF to ON.
--BL
The --BL(597) instruction subtracts 1 from the 8-digit
BCD content of Wd+1 and Wd. The content of the
specified words will be decremented by 1 every cycle
as long as the execution condition of --BL(597) is ON.
When the up-differentiated variation of this instruction
(@--BL(597)) is used, the content of the specified
words is decremented only when the execution condi-
tion has gone from OFF to ON.
Wd: Word
--B(596)
Wd
Wd: First word
--BL(597)
Wd
-1
Wd
Wd
Wd
Wd+1
Wd+1
Wd
-1