Operation and Setup
MN1277 04.2001
63
Mint splits motion keywords into 2 categories; motion variables and motion commands. Motion
variables are keywords that set axis parameters. These can be read or written (although not
necessarily both). Motion commands initiate motion. For example:
SPEED[0,1] = 10,20 : REM Set slew speed on axes 0 and 1
ACCEL[0,1] = 100,200 : REM Set acceleration on axes 0 and 1
MOVER[0,1] = 50,100 : REM Load positional moves
GO[0,1] : REM Start motion
The use of the square brackets controls 2 axes in the system, where axis 0 is the first axis followed
by axis 1 and so on. The use of the square brackets is optional as Mint is very flexible in its multiaxis syntax. In this example, axis 0 is set up with a speed of 10 units/s, acceleration of 100 units/s
2
and a relative move of 50 units. Axis 1 is set up with a speed of 20 units/s, acceleration of 200
units/s
2
and a relative move of 100 units.
SPEED, ACCEL
and
MOVER
are all motion variables. The
motion command GO is used to initiate motion. Most motion keywords can be abbreviated to 2 or 3
letters, for example,
SPEED
can be replaced with SP and
MOVER
replaced with MR. This saves both
on code space and typing. The example above could be abbreviated to:
SP[0,1]=10,20 : REM Set slew speed on axes 0 and 1
AC[0,1]=100,200 : REM Set acceleration on axes 0 and 1
MR[0,1]=50,100 : REM Load positional moves
GO[0,1] : REM Start motion
The utility called Squash within Mint WorkBench enables programs to be compressed by replacing
keywords with their abbreviated counterparts.
At any time during motion, the position of the motor can be printed using:
PRINT POS.0 : REM Print position of axis 0
Position can also be monitored using the WatchWindow in the Mint WorkBench.
See the Mint v4 Programming Guide for more details on Mint syntax.
Engineering units can be applied to an axis. In a linear table for example, there may be 1000
encoder counts per mm. The keyword
SCALE
(or SF for short) can be used to set the new scale
factor of the axis:
SCALE = 1000
This enables positions to be specified in mm and speeds in mm/s.
Mint programs consist of two files. The Configuration Buffer stores information relating to the
machine set-up, for instance the servo loop gains. The Program Buffer stores the actual motion
control program. The two files can contain the same instructions, except that the Configuration
Buffer is only 8K maximum size, while the Program Buffer can be up to 1Mb.
4.8.1 The Configuration File
The Configuration buffer is used to store information about a system such as IO configuration, motor
tuning values and scale factors. If a part of the system is modified, then only the Configuration
Buffer should require modification.