Appendix B
06/2005
Danaher Motion
184 Rev
E
M-SS-005-03
Point Assignment
Point assignment uses the following syntax:
<
variable_name
> = (<
expr1
>,<
expr2
>,<
expr3
>,…,<
expr
n>)
() = #{} for location
() = {} for joint
The expression can be a constant or other vector variable of the same robot type, but the
size of the right side of the expression must equal the left side. If you try to assign a point
with a point of other robot type, an error is received.
Single Coordinate Point Assignment
The syntax for assigning a single coordinate of a point is:
<
variable_name
>{<
expression
>} = <
expression
>
Point Query
The syntax for querying a point is:
?<
variable_name
>
Single Coordinate Point Query
The syntax for querying a single coordinate of a point is:
?<
variable_name
>{<
expression
>}
Example1:
Common shared P1 as location of XYZR 'declaration of a vector (global)
P1 = #{1,2,3,4} 'assign the whole vector
P1 = #{1,2} 'return a translation error
?P1 'read the whole vector
?P1{2} 'read the second coordinate of the vector
Example2:
Common shared P2[5] as location XYZ 'declare a global array of vectors
P2[1] = #{1,2,3} 'assign the whole vector
P2[2] = #{5,2} 'return a translation error
?P2[1] 'read the whole vector
?P2[2]{2} 'read the second value of the vector
Operators
Like any other data type, you can use operators for points. The system only defines the
equal operator (plus, minus, multiplication and division). Operations between points can only
be performed between points of the same type and robot type (or size). All operations can
also be performed between points and long or double type expressions.
A
SSIGNMENT
Point variables and read-write properties can be assigned by point variables, vectors and
point properties compatible in type and size (or robot type).