User manual

PMAC User Manual
Getting Started with PMAC 19
Setting up a Coordinate System
In order to run a program on PMAC, first define a coordinate system. These motors execute a program.
For this example, set up coordinate system 1.
Defining an Axis
Type &1<CR>. This will address coordinate system 1. (Confirm which coordinate system is addressed by
typing &<CR> and PMAC will return the number of the currently addressed coordinate system.) Next, type
#1->X<CR> (the arrow between 1 and X is comprised of the minus sign and the greater- than symbol;
there should be no space before the arrow). This matches the X axis of coordinate system 1 (&1) to motor
1. As it is here, one unit in X is one encoder count.
Scaling an Axis
To scale the X units, place a scale factor before the X in the definition statement. (i.e., this axis definition
statement is what defines the scale of the user position units.) For instance, if using a 500-line encoder on
the motor, with 4X decoding (refer to I900), and a 5-pitch (five turns per inch) screw converting to linear
motion, yielding 10,000 counts/inch, use the command #1->10000X to define the X axis in inches.
Multiple Axes
Caution:
Every motor in the coordinate system must have its limit inputs held low in order for
any program to run in that coordinate system, even if the program does not use that
motor.
If another motor is set up, include it in this same coordinate system. For instance #2->10000Y matches
the second motor to the Y-axis in this coordinate system at 10,000 counts per user unit. This is about all
there is to defining a coordinate system. If a motor is assigned to a coordinate system, make sure that both
its limits are held low, either through switches or directly to AGND (nothing else for that motor needs to be
connected).
Define the time units to work in (I190 for coordinate system 1). This parameter holds the number of
milliseconds in the time units being used. For instance, to specify the velocity in user position units per
second (e.g., inches/sec), set I190 to 1000 (this should be the default). To work in minutes (e.g. rpm), set
I190 to 60,000.
Writing a Motion Program
With the coordinate system(s) defined, begin to write a program. Open a program buffer for entry by
typing OPEN PROG 1<CR>. and CLEAR<CR> to erase anything that might exist in the buffer. Now the
program lines entered will be held in program buffer 1. A program to do a simple back-and-forth
trapezoidal move will look like this (with comments):
LINEAR ; Linear interpolation mode
ABS ; Absolute move mode
F2.00 ; 2 inches/sec
X10.0 ; move to X = 10 inches
X0.0 ; move back to X = 0 inches
If the X-axis is defined with a 1-to-1 scaling {#1->X}, this program would only cause a 10 count move
over 5 seconds {and back}, which might not be noticeable.
The acceleration time for the moves is controlled by Ix87, and the S-curve portion of that acceleration time
is controlled by Ix88 (for the coordinate system x that is running the program).