Chapter 2 Syntax
2-3
2.2
List of Instructions
This section lists the instructions that can be used in a program.
(1) Program control instructions
Instruction
name
Instruction format
Description
Mnemonic code
Parameter 1
Parameter 2
Parameter 3
Parameter 4
Parameter 5
entry
statement
entry
Indicates the beginning of the main
program.
end
Indicates the end of the main program.
sub
statement
sub
<subroutine
name>
Indicates the beginning of a subroutine.
end sub
Indicates the end of a subroutine.
call
statement
call
<subroutine
name>
Branches processing to the subroutine
specified by <subroutine name>.
for loop
statement
for
<variable>
<start value>
<end value>
<incremental
value>
Executes <instruction set> repeatedly until
<variable> reaches <end value>. Note that
<variable>, which initially contains <start
value>, is incremented by <incremental
value> each time <instruction set> is
executed.
<instruction set>
Indicates the instructions to be executed
repeatedly.
next
Ends the “for” loop.
goto
statement
goto
<label name>
Branches processing unconditionally to the
step labeled with <label name>.
on trip goto
statement
on
trip goto
<label
name>
Branches processing to the step labeled
with <label name> when the inverter trips.
if statement
if <condition>
VJGP
<label name>
Branches processing to the step labeled
with <label name> when the <condition> is
met.
structured if
ifs <condition>
Starts the structured if statement.
then
Indicates the beginning of instructions to be
executed when <condition> is met.
<instruction set>
Indicates the instructions to be executed
when <condition> is met.
else
Indicates the beginning of instructions to be
executed when <condition> is not met.
<instruction set>
Indicates the instructions to be executed
when <condition> is not met.
end if
Ends the structured if statement.
select case
syntax
statement
select
<conditional
variable>
Executes the instructions specified after
“case” when the value of <conditional
variable> is <conditional value>.
case
<conditional
value>
Indicates the conditional value and the
beginning of instructions to be executed.
[case else]
Indicates the beginning of instructions to be
executed when the value of <conditional
variable> is not <conditional value>.
end select
Ends the select case syntax statement.
until loop
statement
until
<condition>
Executes <instruction set> repeatedly until
<condition> is met.
<instruction set>
Indicates the instructions to be executed
while <condition> is not met.
loop
Ends the “until” loop.
wait loop
statement
wait ***.**
Waits for “***.**” seconds.
<variable>
Waits for <variable> × 10ms.
<condition>
Waits until <condition> is met.
while loop
statement
while
<condition>
Executes <instruction set> while
<condition> is met.
<instruction set>
Indicates the instructions to be executed
while <condition> is met.
wend
Ends the “while” loop.
inc
statement
inc <variable>
Increments the value of <variable> by 1.
dec
statement
dec
<variable>
Decrements the value of <variable> by 1.
Summary of Contents for NT2021XA
Page 4: ... Safety Instructions ...
Page 8: ... Contents ...
Page 10: ...Chapter 1 Outline of EzSQ ...
Page 14: ...1 4 Chapter 1 Outline of EzSQ ...
Page 16: ...Chapter 2 Syntax ...
Page 68: ...2 52 Chapter 2 Syntax ...
Page 70: ...Chapter 3 Interface with the Inverter ...
Page 80: ...3 10 Chapter 3 Interface with the Inverter ...