User guide

Chapter 5. Custom Profiling
169
Compiled Motion Versus On-The-Fly Motion
The two basic ways of creating a complex profile are with compiled motion or with on-the-fly
pre-emptive GO commands. With compiled motion, portions of a profile are built piece by
piece, and stored for later execution. Compiled motion is appropriate for profiles with motion
segments of pre-determined velocity, acceleration and distance. Compiled motion profiles
allow for shorter motion segments, which results in faster cycle times because there is no
command processing and execution delay. The axes may perform their own motion control
and coordination, freeing program flow for other tasks, such as I/O, machine control, and host
requests. The disadvantages to pre-defined compiled motion profiles are the amount of memory
use and limited run-time decision making and I/O processing.
With pre-emptive GO moves, the motion profile underway is pre-empted with a new profile
when a new GO command is issued. The new GO command constructs and launches the pre-
empting profile. Pre-emptive GOs are appropriate when the desired motion parameters are not
known until motion is already underway.
The table below summarizes the differences between the use of compiled motion and on-the-fly
motion.
Command/Issue Compiled Motion On-The-Fly Motion
GOBUF Constructs motion segment and appends to
previously constructed segment
N/A
PRUN Used to launch previously compiled motion N/A
GO GO causes move during PCOMP GO Constructs & launches profile,
even if moving
Direction changes Only if previous motion segment comes to rest
(MCØ & VFØ or MC1 & ), else compile error
Not allowed during motion, else
AS.3Ø, ER.1Ø
Insufficient room for
AD (decel) value
Same as on-the-fly Decel is modified (steppers);
Motion is killed, AS.3Ø (servos)
Related Commands
GOBUF Store a Motion Segment in Compiled Memory:
The GOBUF command creates a motion segment as part of a profile and places it in a segment
of compiled memory, to be executed after all previous GOBUF motion segments have been
executed. An individual axis profile is constructed by sequentially appending motion segments
using GOBUF commands. Each motion segment may have its own distance to travel,
velocity, acceleration, and deceleration.
The end of a GOBUF motion segment in preset mode is determined by the distance or position
specified. The end of a GOBUF motion segment in continuous mode is determined by the goal
velocity specified. In both cases, the final velocity and position achieved by a segment will be
the starting velocity and position for the next segment. If either type of segment is followed
by a GOWHEN command, the segment’s final velocity will be maintained until the GOWHEN
condition becomes true.
PLOOP & PLN Loop Start & Loop End (Compiled Motion only):
The PLOOP and PLN commands specify the beginning and end of an axis-specific profile loop,
respectively. All segments defined between the PLOOP and PLN commands are included within
that loop.
VF & FOLRNF Final Velocity & Numerator of Slave-to-Master Final Ratio:
The VF and FOLRNF commands are used to designate that the motor will move the load the
distance designated in a preset GOBUF motion segment, completing the move at a final speed
of zero. The VF command is used when the Following mode is disabled (FOLENØ). The
FOLRNF command is used when the Following mode is enabled (FOLEN1).