1 Instruction Set
1-2
NJ-series Instructions Reference Manual (W502)
Instruction Set
Type Instruction Name Function Page
Ladder Diagram
Instructions
LD Load Reads the value of a BOOL variable. 2-14
LDN Load NOT Reads the inverse of the value of a BOOL vari-
able.
2-14
AND AND Takes the logical AND of the value of a BOOL
variable and the input value.
2-16
ANDN AND NOT Takes the logical AND of the inverse of the
value of a BOOL variable and the input value.
2-16
OR OR Takes the logical OR of the value of a BOOL
variable and the execution condition.
2-18
ORN OR NOT Takes the logical OR of the inverse of the value
of a BOOL variable and the execution condi-
tion.
2-18
Out Output Takes the logical result from the previous
instruction and outputs it to a BOOL variable.
2-20
OutNot Output NOT Takes the inverse of the logical result from the
previous instruction and outputs it to a BOOL
variable.
2-20
ST Statement
Instructions
IF If Uses the evaluation result of a specified condi-
tion expression to select one of two statements
to execute.
2-24
CASE Case Selects the statement to execute based on the
value of a specified integer expression.
2-28
WHILE While Repeatedly executes a statement as long as
the evaluation result of a specified condition
expression is TRUE.
2-32
REPEAT Repeat Executes a statement once and then executes
it repeatedly until a specified condition expres-
sion is TRUE.
2-34
RETURN Return Ends a function or function block and returns
processing to the calling instruction.
2-36
FOR Repeat Start Marks the starting position for repeat process-
ing of statements between the FOR and
END_FOR statements and specifies the
repeat condition.
2-37
EXIT Break Loop Cancels repeat processing from the lowest
level FOR statement to the END_FOR state-
ment.
2-38
Sequence Input
Instructions
R_TRIG (Up) Up Trigger Outputs TRUE for one task period only when
the input signal changes to TRUE.
2-40
F_TRIG (Down) Down Trigger Outputs TRUE for one task period only when
the input signal changes to FALSE.
2-40
TestABit Test A Bit Outputs the value of the specified bit in a bit
string.
2-43
TestABitN Test A Bit NOT Outputs the inverse of the value of the speci-
fied bit in a bit string.
2-43
Sequence Out-
put Instructions
RS Reset-Priority
Keep
Retains the value of a BOOL variable. It gives
priority to the Reset input if both the Set input
and Reset input are TRUE.
2-46