Appendix B
06/2005
Danaher Motion
182 Rev
E
M-SS-005-03
Declaration
A point must be declared before you can use it. The declaration of points is defined
according to the type of robot (XYZR, XYZ, etc.). The MC enables the declaration of point
variables, which can be scalar or arrays. Point arrays may have up to 10 dimensions. Point
variables are designed to hold a list of 2 to 10 double-type coordinates. A point variable is
declared in relation to a robot type. Therefore, declaring a point variable must include the
name of a valid robot type. The dimension of the point is the same as the dimension of the
type of robot. The syntax is:
(COMMON SHARED|DIM {SHARED}) <
variable_name
> AS JOINT OF <
robot_type
>
(COMMON SHARED|DIM {SHARED}) <
variable_name
> AS LOCATION OF <
robot_type
>
<
robot_type
> can be:
XYZR – Three cartesian axes + roll
XY – two axes XY table
XYZ – three axes XYZ system
For example:
Common Shared JointXYZ As Joint Of XYZ
Common Shared JointXYZR As Joint Of XYZR
Common Shared LocXYZ As Location Of XYZ
JointXYZ = LocXYZ
Æ
Error – type mismatch
Variables
Two new variable types are defined for point variables in the translator: LOCATION and
JOINT. For the translator, a point variable differs from any other type of variable (Long,
Double, etc.) only by its type. A point variable is inserted to the expression tree as a variable
leaf. The variable leaf retains data related to the point variable, including its context (system,
program or local), its offset (taken from the symbol table), and its type (LOCATION or JOINT,
also taken from the symbol table).
D
ECLARATION
When declaring a point variable, data corresponding to this variable is entered into the
correct symbol table (depending on whether it is a system variable, a program variable, or a
local variable). A point variable is defined in the symbol table by its name, its type
(LOCATION or JOINT) and an offset of the data segment. Each offset of the data segment
corresponds to the address of the point variable. The robot type string is sent to a special
function that gives the robot-type value and the number of coordinates.
Constant Points
Constant points are location or joint vectors with an undefined robot type. The constant
point’s subtype is defined by the shape of its brackets (#{ } for location, { } for joint). In the
translator, each of these two vector types is considered an expression. Each expression-
related command and manipulation (such as print commands, mathematical operators, etc.)
can be applied for the joint and location vectors.
While executing a vector expression, each vector element is pushed separately into the
stack as a double type expression (by executing the left side of the JOINT or LOCATION
node). Long type vector elements are converted to double type expressions (in the
coordinate node) after the execution of the expression at the right side of each coordinate
node).