Begin Move By

Text Language Definition

procedure TNAxis.BeginMoveBy(XDelta:double; YDelta:double....);

Description

The Begin Move By command initiates a relative move by the specified position parameters but does not wait for the move to finish before continuing. The motion is performed with a trapezoidal velocity profile based on parameters set with the Set Accel , Set Decel , and Set Speed methods. These parameters apply to the vector path motion of the coordinated group rather than to any particular axis. Begin Move By is a nonblocking command. The execution continues immediately allowing other commands to be performed while the motion is occurring. It is often necessary at some point to wait for the motion to finish which is accomplished with the Move Is Finished command. If there is nothing to do during the motion it is simplest to use the Move By blocking form of the command. Begin Move By can be used on an axis that is already in motion. The target will be changed to the current position of the motor when the block is executed plus the parameter value. The Stop, Begin Stop, and Abort commands will end the motion before it reaches the target position.

Escapes

Begin Move By will produce an Axis Is Busy Escape Code if the group is already in motion.

A single axis can be directed to a new destination while in motion as long as the destination is still ahead of the motion and obtainable with the current decel setting. If not a Motion Overrun Escape Code will occur.

If the destination of the move is beyond the positive and negative software limits, the Begin Move By block will produce a Position Limit Escape Code and the move will not be attempted.

Examples

This procedure initiates motion when the Bump Sensor first turns on and moves the motor a distance of 5 past the location where the last Bump Sensor transition on occurred:

The Bump Sensor will start a new move on every activation with the axis, in motion, re-targeting to its current position plus 5.

This set of button events steps the motor whole steps if the button remains down, or stops early if the button is released early:


By using Begin Stop instead of Stop the option is available for the button to be pushed again before the motor comes to a full stop and for the motor to accelerate and continue.

This procedures performs a coordinated move:

Related Topics

Begin Move To
Move By
Set Speed
Set Accel
Set Decel
Move Is Finished