- 10 -
Chapter 2. MC Programming
Division
Command
Function
Type
Example of use
.NE
Used for the comparison of ‘not equal
to(!=)’in an IF condition comparing sentence
IF <variable> .NE
<variable>
<label name>
IF <variable> .NE <number>
<label name>
IF L0 .NE L1
LB1
IF L0 .NE 0 LB1
Variable
manipula
tion
=
Used for the movement of manipulation results
in a variable manipulation sentence
<variable> = <variable>
<variable> = <number>
<variable> = <operation
sentence>
L0 = L1
L0 = 1234
L0 = L0 + 1
+
Used for addition in a variable manipulation
sentence
<variable> + <variable>
<variable> + <number>
<variable> + <operation
sentence>
<operation sentence> +
<operation sentence>
L0 = L1 + L2
L0 = L0 + 1
L0 = L1 + (L2-
1)
(L1*2) + (L2*4)
-
Used for subtraction in a variable manipulation
sentence
<variable> - <variable>
<variable> - <number>
<variable> - <operation
sentence>
<operation sentence> -
<operation sentence>
L0 = L1 - L2
L0 = L0 - 1
L0 = L1 - (L2-
1)
(L1*2) - (L2*4)
*
Used for multiplication in a variable
manipulation sentence
<variable> * <variable>
<variable> * <number>
<variable> * <operation
sentence>
<operation sentence> *
<operation sentence>
L0 = L1 * L2
L0 = L0 * 2
L0 = L1 * (L2-
1)
(L1+2) *
(L2/4))
/
Used for division in a variable manipulation
sentence
(used to obtain the ‘quotient’ of a division
result)
<variable> / <variable>
<variable> / <number>
<variable> / <operation
sentence>
<operation sentence> /
<operation sentence>
L0 = L1 / L2
L0 = L0 / 100
L0 = L1 / (L2-
1)
(L1*2) / (L2*4)
%
Used for division in a variable manipulation
sentence
(used to obtain the ‘remainder’ of a division
result)
<variable> % <variable>
<variable> % <number>
<variable> % <operation
sentence>
<operation sentence> %
<operation sentence>
L0 = L1 % L2
L0 = L0 % 100
L0 = L1 % (L2-
1)
(L1*2) % (L2*4)
(, )
Used to adjust the priority of operation in a
variable manipulation sentence(available up to
5 nesting)
(handle the operation sentence in the
parenthesis() first)
(((<operation sentence>)))
((L1+2)*(L2-4))
Summary of Contents for MCU 2 Axis
Page 1: ...User s Manual 2 AXES...