Danaher Motion
06/2005
BASIC Moves Development Studio
M-SS-005-03 Rev
E
17
MC-Basic has two
UEA
(user error assertion)
data types
(severities): Error
and Note. Each UEA is defined with a string-type error message given by the
user and a unique exception number, which might be determined either by
the user or by the system. The SERVO
STAR
®
MC
handles UEAs similar to
internal exceptions.
Type
Description
Range
Error
An ASCII message string and a
unique integer exception
number
20001-20499 for user determined
exception number
20500-20999 for system determined
exception number
Note
An ASCII message string and a
unique integer exception
number
20001-20499 for user determined
exception number
20500-20999 for system determined
exception number
MC-Basic provides
generic element data types
designed to serve as a
reference to real axes and groups. Through a simple assignment statement,
the generic element gets the element identifier (see below) of a real motion
element, thus acquiring all its properties. Afterwards, all activities preformed
on the generic element identically affect the real element. The referenced
element can be changed, through recurring assignments, as many times as
the user wishes.
Type
Description
Range
Generic Axis
An integer element
identifier
0 (before first assignment)
1 to number of axes in system (up
to 32)
Generic Group
An integer element
identifier
0 (before first assignment)
33 to number of groups in system
(up to 64)
Each real motion element gets a unique element identifier from the system
during its declaration. Axes get successive element identifiers ranging from 1
to 32 according to axis number. Groups get successive identifiers ranging
from 33 to 64 according to declaration order. Value of element identifier can
be queried directly through
ELEMENTID
.
SYS.NUMBERAXES = 2
Common Shared G2 As Group AxNm = A1 AxNm = A2
Common Shared G1 As Group AxNm = A1 AxNm = A2
? A1.ELEMENTID
1
? A2.ELEMENTID
2
? G2.ELEMENTID
33
? G1.ELEMENTID
34
MC-BASIC uses integers to support
Boolean (logical)
operations.
Logical
variables have one of two values: true or false. MC-BASIC uses type Long to
support logical expressions. The value 0 is equivalent to false. Usually, 1 is
equivalent to true, although any non-zero value is taken to be true. Boolean
expressions are used in conditional statements such as If…Then, and with
Boolean operators like And, Or, and Not.
Arrays
can be any data type. Arrays may have from 1 to 10 dimensions. The
maximum number of elements in any dimension is 32,767. Array dimensions
always start at 1.