2 Instruction Descriptions
2-50
NJ-series Instructions Reference Manual (W502)
Set and Reset
z Set
The Set instruction changes Out to TRUE if the input is TRUE. If Out is TRUE, the Set instruction will
not change it to FALSE even if the input changes to FALSE. Use the Reset instruction to change Out
to FALSE.
z Reset
The Reset instruction changes Out to FALSE if the input is TRUE. If Out is FALSE, the Reset
instruction will not change it to TRUE even if the input changes to FALSE. Use the Set instruction to
change Out to TRUE.
The operation is as shown below if you do not specify upward or downward differentiation.
Set: Changes a BOOL variable to TRUE.
Reset: Changes a BOOL variable to FALSE.
Instruction Name FB/FUN Graphic expression ST expression
Set Set --- None
Reset Reset --- None
Variables
Name Meaning I/O Description Valid range Unit Default
Out Output Output Output Depends on data type.
--- ---
Boolean
Bit strings Integers
Real
numbers
Times, durations,
dates, and text strings
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
Out OK
Function
Instruction Input Output value
Set
TRUE TRUE
FALSE Not changed.
Reset
TRUE FALSE
FALSE Not changed.
Out
Out Out
S
PS
NS
Downward
differentiation
Upward
differentiation
Out
Out Out
R
PR
NR
Downward
differentiation
Upward
differentiation