
61
#a1 is a integer array variable, has a length of 8 and is initialized to 0.
a2 = Array(8, FLO);
# a2 is a floating-point array variable, has a length of 8 and is initialized to 0.0.
a3 = Array(7, INT, [1,2,3,4,5]);
# a3 is a integer array variable, has a length of 7 and is initialized to [1,2,3,4,5,0,0].
a4 = Array(3, INT, [1,2,3,4,5]);
# a4 is a integer array variable, has a length of 3 and is initialized to [1,2,3].
a5 = Array(4, FLO, [1,2,3]);
# a5 is a floating-point array variable, has a length of 4 and is initialized to
[1.0,2.0,3.0, 0.0].
a6 = Array(a1);
# copies the content of a1 (an array variable) into a6, which is an array variable.
8.3 Expression
An expression in the system refers to a set of operations with some return values. It
is a recursive definition.
In this document, expression is represented by exp, and operator is represented by
op.
8.3.1 Arithmetic Operation Expression
The system supports four types of arithmetic operations, namely addition (+),
subtraction (-), multiplication (*) and division (/). An arithmetic operation
expression returns arithmetic constants.
8.3.2 Relational Operation Expression
The system supports relational operations. The relational operators in the system
are >, <, >=, <=, == and !=. A relational operation expression returns constant 0 or
1.
8.3.3 Logical Operation Expression
The system supports logical operations. The logical operators in the system are and,
or and not.
exp1 and exp2
#if exp1 !=0 and exp2 != 0, the expression returns 1. Otherwise, the expression
returns 0.
exp1 or exp2
#if exp1 !=0 or exp2 != 0, the expression returns 1. Otherwise, the expression
returns 0.
not exp1
Содержание GCR Series
Страница 41: ...37 6 Robot Programming 6 1 Create program Click Create Program and enter a program name ...
Страница 47: ...43 The functions illustrate below are functions for IO The function illustrate below are logic function ...
Страница 51: ...47 6 6 Example Add a movej and movel node respectively Then add a MoveC node and set it s sub nodes position ...
Страница 53: ...49 ...
Страница 86: ...82 signal_name It represents the name of the modbus node Return Value none Example modbus_delete_signal mbus1 ...