3. Instructions
170
CS/CJ/NSJ Series Instructions Reference Manual (W474)
SET/RSET
Applicable Program Areas
Operands
z Operand Specifications
*1 CJ2 CPU Units only.
Flags
No flags are affected by SET and RSET.
Function
Instruction Mnemonic Variations
Function
code
Function
SET SET
@SET, %SET, !SET,
!@SET, !%SET
---
SET turns the operand bit ON when the execution
condition is ON. After this, the specified contact
will remain ON regardless of ON/OFF of the input
condition.
RESET RSET
@RSET, %RSET,
!RSET, !@RSET,
!%RSET
---
RSET turns the operand bit OFF when the
execution condition is ON. After this, the specified
contact will remain OFF regardless of ON/OFF of
the input condition.
Symbol
SET RSET
Area
Function block
definitions
Block program areas Step program areas Subroutines Interrupt tasks
SFC action or transition
programs
Usage OK OK OK OK OK OK
Operand Description Data type Size
BBit BOOL ---
Area
Word addresses
Indirect DM/EM
addresses
Con-
stants
Registers Flags
Pulse
bits
TR
bits
CIO WR HR AR T C DM EM
@DM
@EM
*DM
*EM
DR IR
Indirect
using IR
TK CF
B OKOKOKOK--- ---
OK*
1
OK*
1
--- --- --- --- --- OK --- --- --- ---
z SET
SET turns the operand bit ON when the execution
condition is ON, and does not affect the status of the
operand bit when the execution condition is OFF. Use
RSET to turn OFF a bit that has been turned ON with
SET.
z RSET
RSET turns the operand bit OFF when the execution
condition is ON, and does not affect the status of the
operand bit when the execution condition is OFF. Use
SET to turn ON a bit that has been turned OFF with
RSET.
SET
B
B: Bit
RSET
B
B: Bit
Status of B
Execution condition
of SET
Execution condition
of RSET
Status of B