6-111
6 Programming
NJ-series CPU Unit Software User’s Manual (W501)
6-5 Programming Languages
6
6-5-3 Structured Text Language
Instructions
that last
multiple
task periods
With the TON instruction, multiple cycles are
required from the start of instruction execution
to the end and the instruction is reset when the
power flow is FALSE. Therefore, you need to
declare only one instance to both execute the
instruction and reset it.
You must declare two instances, one for
execution and one to reset, as shown below.
IF (start = TRUE) THEN
TON_instance(In:=TRUE, omitted);
// Start timer.
ELSE
TON_instance(In:=FALSE, omitted);
// Reset timer.
END_IF;
Func-
tion/func-
tion block
argument
NOT speci-
fications
Add a circle to indicate NOT at the intersection
of the BOOL argument and the function/function
block.
Add a NOT operator to the argument.
* You can add NOT operators to any BOOL
variable, not just arguments.
IF (NOT emergency) THEN
Func();
END_IF;
Multi-stage
connections
IF(start=TRUE) THEN
Func2( in := Func1());
END_IF;
Post-con-
necting lad-
der
instructions
You can connect only other Out instructions
after an Out instruction.
You cannot continue the ladder diagram after
inline ST.
Program
divisions
You can create sections. You cannot create sections.
Item Ladder diagram ST (including inline ST)