Reference Guide

PMAC Quick Reference Guide
Motion Programs 47
5. When a RUN or STEP command is issued, PMAC checks the coordinate system to make sure it is in
proper working order. If it finds anything in the coordinate system is not set up properly, it will
reject the command, sending a <BELL> command back to the host. If I6 is set to 1 or 3, it will report
an error number as well telling the reason the command was rejected. PMAC will reject a RUN or
STEP command for any of the following reasons:
A motor in the coordinate system has both overtravel limits tripped (ERR010)
A motor in the coordinate system is currently executing a move (ERR011)
A motor in the coordinate system is not in closed-loop control (ERR012)
A motor in the coordinate system in not activated {Ix00=0} (ERR013)
There are no motors assigned to the coordinate system (ERR014)
A fixed (non-rotary) motion program buffer is open (ERR015)
No motion program has been pointed to (ERR016)
After a / or \ stop command, a motor in the coordinate system is not at the stop point (ERR017)
6. Before starting the program, issue a CTRL+A command to PMAC to ensure that all the motors will
be potentially in closed loop and that all previous motions are aborted. Also, if in doubt, the
functioning of each motor can be checked individually prior to running a program by means of JOG
commands. For example, #1J^2000 will make motor #1 move 2000 encoder counts and that would
confirm if the motors are able to run motion programs or not.
7. All motors in the addressed coordinate system have to be ready to run a motion program. Depending
on Ix25, even if one motor defined in the coordinate system is not closing the loop, all motors in the
coordinate system could be brought down to impede the running of any motion program.
8. Sometimes the feedrate override for the current addressed coordinate system is set at zero and no
motion will occur as a result of this. Check the feedrate override parameter by issuing a &1%
command on the terminal window (replace 1 for the appropriate coordinate system number). If it is
zero or too low, set it to an appropriate value. The &1%100 command will set it to 100 %.
9. For troubleshooting purposes, change the feedrate override to lower than 100% value. If the program
is run for the first time, a preceding %10 command could be issued to run the motion program in slow
motion. Running the program slowly will allow observing the programmed path more clearly, it will
demand less calculation time from PMAC and it will prevent damages due to potentially wrong
acceleration and/or feedrate parameters.
10. A motion program can be stopped by sending &1a or, for simplicity, a CTRL+A command which will
stop any motion.
11. If the motion of any axis becomes uncontrollable and it should be stopped, issue a CTRL+K command
to kill all the motors in PMAC (disabling the amplifier enable line if connected). However, the motor
might come to a stop in an uncontrollable way and proceed to move due to its own inertia.
12. A motion program can be stopped also by issuing a CTRL+Q command. The last programmed moves
in the buffer will be completed before the program quits execution. It can be resumed by issuing an
R command alone, without first pointing to the beginning of the buffer by the B command.
Subroutines and Subprograms
It is possible to create subroutines and subprograms in PMAC motion programs to create well-structured
modular programs with re-usable subroutines. The GOSUBx command in a motion program causes a
jump to line label Nx of the same motion program. Program execution will jump back to the command
immediately following the GOSUB when a RETURN command is encountered. This creates a subroutine.