Omron CP1E-N@@D@-@ Computer Hardware User Manual


 
2-31
2 Instructions
CP1E CPU Unit Instructions Reference Manual(W483)
Sequence Output Instructions
2
SETA/RSTA
SETA/RSTA
Applicable Program Areas
Operands
Operand Specifications
Flags
Function
Instruction Mnemonic Variations
Function
code
Function
MULTIPLE BIT SET SETA @SETA 530
SETA(530) turns ON the specified number of
consecutive bits.
MULTIPLE BIT RESET RSTA @RSTA 531
RSTA(531) turns OFF the specified number of
consecutive bits.
Symbol
SETA RSTA
Area Step program areas Subroutines Interrupt tasks
Usage OK OK OK
Operand Description Data type Size
D Beginning Word UINT Variable
N1 Beginning Bit UINT 1
N2 Number of Bits UINT 1
Area
Word addresses Indirect DM addresses
Constants CF Pulse bits TR bits
CIO WR HR AR T C DM @DM *DM
D
OK OK OK OK OK OK OK OK OK
---
--- --- ---
N1,N2 OK
Operand Description Data type
Error Flag P_ER ON if N1 is not within the specified range of 0000 to 000F (&0 to &15).
OFF in all other cases.
SETA
SETA(530) turns ON N2 bits, beginning
from bit N1 of D, and continuing to the left
(more-significant bits). All other bits are
left unchanged. (No changes will be
made if N2 is set to 0.)
Bits turned ON by SETA(530) can be
turned OFF by any other instructions, not
just RSTA(531).
SETA(530)
D
N1
N2
D: Beginning word
N1: Beginning bit
N2: Number of bits
RSTA(531)
D
N1
N2
D: Beginning word
N1: Beginning bit
N2: Number of bits
D
D+1
D+2
15 0
N1
111
1
111
N2 bits are set to 1 (ON).