Start Motion

NI-Motion VI

Start Motion

Starts motion on a single axis, single vector space, multiple axes, or multiple vector spaces.

Details     

Device Compatibility

DeviceCompatibility
7330
Y
7340
Y
7344
Y
7350
Y
7390
Y
NI SoftMotion Controller for CANopen—Accelnet
Y
NI SoftMotion Controller for CANopen—Xenus
Y
Axis/VS Map is the bitmap of axes or vector spaces (coordinate spaces) to wait on. It is only required when multiple axes or vector spaces are selected with the Axis or Vector Space parameter.

When starting axes (Axis or Vector Space = 0):

Axis/VS Map 1 —If true, start axis. If false, do not start axis.
Axis/VS Map 2 —If true, start axis. If false, do not start axis.
Axis/VS Map 3 —If true, start axis. If false, do not start axis.
Axis/VS Map 4 —If true, start axis. If false, do not start axis.
Axis/VS Map 5 —If true, start axis. If false, do not start axis.
Axis/VS Map 6 —If true, start axis. If false, do not start axis.
Axis/VS Map 7 —If true, start axis. If false, do not start axis.
Axis/VS Map 8 —If true, start axis. If false, do not start axis.

When starting vector spaces (Axis or Vector Space = 0x10):

Axis/VS Map 1 —If true, start vector space. If false, do not start vector space.
Axis/VS Map 2 —If true, start vector space. If false, do not start vector space.
Axis/VS Map 3 —If true, start vector space. If false, do not start vector space.
Axis/VS Map 4 —If true, start vector space. If false, do not start vector space.

To start a single axis or vector space, set the Axis or Vector Space selector to the appropriate axis or vector space. The Axis/VS Map bitmap is ignored.

To start multiple axes, the Axis or Vector Space selector is set to 0 (zero) and the Axis/VS Map bitmap defines the axes to start. Similarly, to start multiple vector spaces, the Axis or Vector Space selector is set to 0x10 and the Axis/VS Map bitmap defines the vector spaces to start.

Note  It is not possible to combine the start of an axis and the start of a vector space in a single use of this VI. To accomplish this, create a single-axis vector space and then execute a multi-vector space start.
Board ID is a unique number assigned by Measurement & Automation Explorer (MAX) used to send and receive commands and data to or from a specific NI motion controller.
Axis or Vector Space can select an axis (1 through 15), vector space (0x11 through 0x14), multiple axes (Axis Control), or multiple vector spaces (Vector Space Control). When simultaneously acting on multiple axes or vector spaces, the Axis/VS Map parameter indicates which axes or vector spaces are involved.
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.
Bd ID Out is provided for flow control. You can string together NI-Motion VIs by wiring the Bd ID Out terminal of one VI to the Board ID terminal of the next VI.
Resource Output is the Axis, Vector Space, ADC, or Encoder you wired into the VI. Use Resource Output to pass the resource to another VI and/or to display information about the device.
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

The Start Motion VI is used to start a motion profile on axes or vector spaces, either simultaneously or individually. A start is preemptive and uses the most recently loaded values of acceleration, velocity, target position, s-curve, operation mode, and so on to generate the motion profile.

Note  If a stepper axis is in a killed state (not energized), halt the axis using the Stop Motion VI, with Stop Type set to halt stop, before you execute a Start Motion or Blend Motion VI. After you halt the axis, you might need to wait before executing a Start Motion or Blend Motion VI, so that the stepper drive comes out of reset state. If the stepper drive does not come out of reset state before you execute the VI, the stepper axis might lose some steps during acceleration. To determine whether you need to wait before executing the VI, refer to the stepper drive documentation or vendor.

You also can use the Start Motion VI to update trajectory parameters to a move that is already in process. Trajectory parameters loaded after the start take effect immediately upon the next start without requiring the motion to come to a stop. You can use this feature for velocity profiling and other continuous motion applications. The execution of a preemptive start depends on the parameters entered, the type of move, and the controller. Refer to the following table for more information.

Move Type Controller Type Same Direction Opposite Direction
Single Axis Move 73xx Controller Move starts immediately1 Motion decelerates to a stop, then starts2
NI SoftMotion Controller Move starts immediately Motion decelerates to a stop, then starts2
Vector Space Move 73xx Controller Motion decelerates to a stop, then starts2 Motion decelerates to a stop, then starts2
NI SoftMotion Controller Move starts immediately Motion decelerates to a stop, then starts2
1 In most cases, the move starts immediately. However, if the new target position is closer to the current position than the previous target position, the move decelerates to a stop, then starts. Refer to the figures below for more information.

2 The time required to start the next move depends on the deceleration time. If the deceleration time is very slow, the next move may take longer than expected to start.

The first image demonstrates the case where Start Motion is called with a new target position on the same side of the original target position as the current position. In this case, motion decelerates to a stop, then starts again. The second image demonstrates the case where Start Motion is called with a new target position on the opposite side of the original target position as the current position. In this case, the move continues to the new target position without stopping.

Motion starts on properly configured and enabled axes. If motion on any axis involved in a start is illegal due to a limit or other error condition, the entire Start Motion VI is not executed and a modal error is generated. None of the axes are started or updated. Refer to Errors and Error Handling for information about errors and error handling.

Example 1

To execute a multi-axis start on axes 2 and 4, call the Start Motion VI with the following parameters:

Axis or Vector Space = Axis Control (0)
Axis/VS Map corresponds to the following.

Axis/VS Map 1  Axis/VS Map 2  Axis/VS Map 3  Axis/VS Map 4  Axis/VS Map 5  Axis/VS Map 6  Axis/VS Map 7  Axis/VS Map 8 
False  True  False  True  False  False  False  True  

Example 2

To start motion on vector space 2, call the Start Motion VI with the following parameters:

Axis or Vector Space = Vector Space 2 (0x12)
Axis/VS Map = do not care