Axis Straight Line Move

NI-Motion VI

Axis Straight Line Move

Performs a straight line move on an axis.

Details

Device Compatibility

DeviceCompatibility
7330
Y
7340
Y
7344
N
7350
Y
7390
Y
NI SoftMotion Controller for CANopen—Accelnet
N
NI SoftMotion Controller for CANopen—Xenus
N
axis straight line move data is a cluster containing straight line move information.
start mode is the start mode for the move:
  • do not start—Do no start the straight line move at this time.
  • start—Start the straight line move with the configured parameters.
position mode selects the position mode for the move. Refer to Details for more information about the available position modes.
  • absolute—Use absolute position mode in the move.
  • relative—Use relative position mode in the move.
  • velocity—Use velocity mode in the move.
target position is the target position for the straight line move in counts or steps.
move constraints is a cluster containing move constraint information:
velocity sets the velocity for the move in counts/s or steps/s.
acceleration sets the acceleration for the move in counts/s2 or steps/s2.
deceleration sets the deceleration for the move in counts/s2 or steps/s2.
acceleration jerk sets the acceleration jerk for the move in counts/s3 or steps/s3.
Note  acceleration jerk is not supported at this time. Use Load S-Curve Time or Load Move Constraints to configure S-curve values.
deceleration jerk sets the deceleration jerk for the move in counts/s3 or steps/s3.
Note  deceleration jerk is not supported at this time. Use Load S-Curve Time or Load Move Constraints to configure S-curve values.
board in is a unique number assigned by Measurement & Automation Explorer used to send and receive commands and data to or from a specific NI motion controller.
axis in is the axis to read with this VI.
error in (no error) describes error conditions that occur before this VI runs. The default input of this cluster is no error. If an error already occurred, this VI returns the value of error in in error out. The VI runs normally only if no incoming error exists. Otherwise, the VI passes the error in value to error out. The error in cluster contains the following parameters:
status is TRUE if an error occurred before this VI was called, or FALSE if not. If status is TRUE, code is a nonzero error code. If status is FALSE, code is zero or a warning code.
code is a number identifying an error or warning. If status is TRUE, code is a nonzero error code. If status is FALSE, code is zero or a warning code. Use the error handler VIs to look up the meaning of this code and display the corresponding error message.
source is a string that indicates the origin of the error, if any. Typically, source is the name of the VI in which the error occurred.
board out is provided for flow control. You can string together NI-Motion VIs by wiring the board out terminal of one VI to the board in terminal of the next VI.
axis out is provided for flow control. You can string together NI-Motion VIs by wiring the axis out terminal of one VI to the axis in terminal of the next VI.
error out contains error information. If error in indicates an error, error out contains the same error information. Otherwise, it describes the error status that this VI produces.
status is TRUE if an error occurred, or FALSE if not. If status is TRUE, code is a nonzero error code. If status is FALSE, code is zero or a warning code.
code is a number identifying an error or warning. If status is TRUE, code is a nonzero error code. If status is FALSE, code is zero or a warning code. Use the error handler VIs to look up the meaning of this code and display the corresponding error message.
source is a string that indicates the origin of the error, if any. Typically, source is the name of the VI in which the error occurred.

Using This VI

Use this VI to perform a straight line move on an axis. The position modes are described in the following sections:

Absolute Position Mode

In absolute position mode, target positions are interpreted with respect to an origin, reference, or zero position. The origin is typically set at a home switch, end of travel limit switch, or encoder index position. An absolute position move uses the specified values of acceleration, deceleration, and velocity to complete a trajectory profile with an ending position equal to the specified absolute target position.

Caution  Any single move is limited to between –231 and 231–1 counts or steps. An error is generated if you exceed this limit by specifying a target position too far from the current position.

The length of an absolute move depends upon the specified position and the current position when the move is started. If the target position is the same as the current position, no move occurs.

Relative Position Mode

In relative position mode, if a relative position move is started while motion is not in progress, specified target positions are interpreted with respect to the current position at the time the value is specified. A relative position move uses the specified values of acceleration, deceleration, and velocity to complete a trajectory profile with an ending position equal to the sum of the specified relative target position and the starting position.

If a relative move is started while motion is in progress, the new target position is calculated with respect to the target position of the move already in progress (considered to be the new starting position), as if that move had already completed successfully. Motion continues to the new relative position, independent of the actual position location when the new move is started.

Velocity Mode

In velocity mode, the axis moves at the specified velocity until you execute a Stop Motion VI, a limit is encountered, or a new velocity is specified and you execute a Start Motion VI. Specified target positions have no effect in velocity mode. The direction of motion is determined by the sign of the specified velocity.

You can update velocity at any time to accomplish velocity profiling. Changes in velocity while motion is in progress uses the specified acceleration and deceleration values to control the change in velocity. You can reverse direction by changing the sign of the specified velocity.

Note  Refer to VI Execution Times for benchmark timing information about your controller.