EasyManua.ls Logo

Hitachi SJ700-2 Series - Page 56

Hitachi SJ700-2 Series
134 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 5 Instruction Words
5 - 2
(2) Conditional expressions
The table below lists the conditional expressions that can be used for the <condition> parameters in
program control instructions.
Instruction format
Instructio
n name
Mnemonic
code
First
argument
Second
argument
Third
argument
Fourth
argument
Fifth
argument
Description
<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>
Comparis
on
<variable 2/
constant>
<>
<variable 3/
constant>
"True" when <variable 2/constant> is not
equal to <variable 3/constant>
(3) Operational instructions
Instruction format
Instructio
n name
Mnemonic
code
First
argument
Second
argument
Third
argument
Fourth
argument
Fifth
argument
Description
<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>.
Arithmetic
operation
<variable 1>
=
<variable 2/
constant>
/
<variable 3/
constant>
Divides <variable 2/constant> by <variable
3/constant> and assigns the result to
<variable 1>.
Remainde
r
<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>.
Substituti
on
<variable 1>
=
<variable 3/
constant>
Assigns <variable 3/constant> to <variable
1>.
<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>.
Logic
operation
<variable 1>
=
not
<variable 3/
constant>
Inverts the bits of <variable 3/constant> and
assigns the inverted bits to <variable 1>.

Table of Contents

Related product manuals