Chapter 2 Syntax
2-4
(2) Conditional expressions
The table below lists the conditional expressions that can be used for the <condition> parameters in program control instructions.
Instruction
name
Instruction format
Description
Mnemonic code
Parameter 1
Parameter 2
Parameter 3
Parameter 4
Parameter 5
Comparison
<variable 2 /
constant>
=
<variable 3/
constant>
“True” when <variable 2/constant> is equal
to <variable 3/constant>
<variable 2 /
constant>
<
<variable 3/
constant>
“True” when <variable 2/constant> is less
than <variable 3/constant>
<variable 2 /
constant>
<=
<variable 3/
constant>
“True” when <variable 2/constant> is not
greater than <variable 3/constant>
<variable 2 /
constant>
>
<variable 3/
constant>
“True” when <variable 2/constant> is
greater than <variable 3/constant>
<variable 2 /
constant>
>=
<variable 3/
constant>
“True” when <variable 2/constant> is not
less than <variable 3/constant>
<variable 2 /
constant>
<>
<variable 3/
constant>
“True” when <variable 2/constant> is not
equal to <variable 3/constant>
Note : <variable 1> and <variable 2> can be constants ranging from 0 to 127.
(3) Operational instructions
Instruction
name
Instruction format
Description
Mnemonic code
Parameter 1
Parameter 2
Parameter 3
Parameter 4
Parameter 5
Arithmetic
operation
<variable 1> =
<variable 2/
constant>
<variable 3/
constant>
Adds <variable 2/constant> and <variable
3/constant> and assigns the result to
<variable 1>.
<variable 1> =
<variable 2/
constant>
<variable 3/
constant>
Subtracts <variable 3/constant> from
<variable 2/constant> and assigns the
result to <variable 1>.
<variable 1> =
<variable 2/
constant>
<variable 3/
constant>
Multiplies <variable 2/constant> by
<variable 3/constant> and assigns the
result to <variable 1>.
<variable 1> =
<variable 2/
constant>
<variable 3/
constant>
Divides <variable 2/constant> by <variable
3/constant> and assigns the result to
<variable 1>.
Remainder
<variable 1> =
<variable 2/
constant>
mod
<variable 3/
constant>
Divides <variable 2/constant> by <variable
3/constant> and assigns the remainder to
<variable 1>.
Absolute
value
<variable 1> =
abs
<variable 3/
constant>
Assigns the absolute value of <variable
3/constant> to <variable 1>.
Substitution
<variable 1> =
<variable 3/
constant>
Assigns <variable 3/constant> to <variable
1>.
Logic
operation
<variable 1> =
<variable 2/
constant>
or
<variable 3/
constant>
Assigns the OR of <variable 2/constant>
and <variable 3/constant> to <variable 1>.
<variable 1> =
<variable 2/
constant>
and
<variable 3/
constant>
Assigns the AND of <variable 2/constant>
and <variable 3/constant> to <variable 1>.
<variable 1> =
<variable 2/
constant>
xor
<variable 3/
constant>
Assigns the XOR of <variable 2/constant>
and <variable 3/constant> to <variable 1>.
<variable 1> =
not
<variable 3/
constant>
Inverts the bits of <variable 3/constant> and
assigns the inverted bits to <variable 1>.
Note 1 : <variable 2> can be a constant ranging from 0 to 127.
Note 2 : <variable 3> can be a constant ranging from 0 to 2
31
-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 ...