Stop Motion

NI-Motion Help

Edition Date: August 2012

Part Number: 372134F-01

»View Product Info
Download Help (Windows Only)

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

Three types of stops can be executed:

Details     

Device Compatibility

DeviceCompatibility
NI 7330
Y
NI 7340
Y
NI 7344
Y
NI 7350
Y
NI PCI-7390
Y
Stop Type (Decel) is the type of stop to execute, as follows.

Value Definition
0 Decelerate
1 Halt
2 Kill
Axis/VS Map is the bitmap of axes or vector spaces to stop. It is only required when multiple axes or vector spaces are selected with the Axis or Vector Space parameter. NI-Motion ignores additional axes for controllers that operate less than eight axes.

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

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

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

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

To stop 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 stop multiple axes, the Axis or Vector Space selector is set to 0 (zero) and the Axis/VS Map bitmap defines the axes to stop. Similarly, to stop multiple vector spaces, the Axis or Vector Space selector is set to 0x10 and the Axis/VS Map bitmap defines the vector spaces to stop.

Note  It is not possible to combine the stop of an axis and the stop 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 stop.

The Stop Motion VI is used to stop a motion profile on axes or vector spaces, either simultaneously or individually.

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 8), 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 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

This VI is used to stop a motion profile on axes or vector spaces, either simultaneously or individually. You can execute three different types of stops with the Stop Motion VI: decelerate stop, halt stop, and kill stop.

Decelerate Stop

When a decelerate stop is executed (decelerate to stop), the axis, axes, or vector space(s) immediately begin to follow the deceleration portion of their trajectory profile as controlled by previously loaded deceleration and s-curve parameters. The actual stopped position is therefore dependent upon this deceleration trajectory.

Halt Stop

In contrast, a halt stop has the following behavior depending on the state of the axis:

Kill Stop

On servo axes, a kill stop disables the control loop and zeros the output DAC, allowing frictional forces alone to stop the motion. On stepper axes, a kill stop ceases the stepper pulse generation as soon as the command is received by the motion controller. On both axis types, there is no trajectory profile during a kill stop. If enabled, the inhibit output is activated to inhibit (disable) the servo amplifier or stepper drive. You can enable the inhibit outputs and set their polarity to active high or active low with the Configure Inhibit Outputs VI.

Caution  When an axis is killed, the motor is allowed to freewheel, and will move if external forces are acting on it. If the axis moves into an enabled limit switch, the axis is energized and held in position. If you do not wish for the axis to become energized under any circumstances, you must disable the axis after killing it.

The Stop Motion VI may or may not affect the motion of other axes that are not explicitly referenced in the VI. If an axis that is part of a vector space is individually killed, the other axes in the vector space are decelerated to stop. If a slave axis is killed, master-slave gearing is automatically disabled. Finally, if a program attempts to start axes that have been manually stopped by the host computer, the program is overruled and put into the paused state.

Example 1

To execute a multi-axis kill stop on axes 1 through 4, call the Stop Motion VI with the following parameters:

Axis or Vector Space = Axis Resource (0)
Stop Type = Kill stop
Axis/VS Map corresponds to the values shown in the following table.

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 
True  True  True  True   False  False  False  False 

Example 2

To decelerate stop motion on vector space 1, call the Stop Motion VI with the following parameters:

Axis or Vector Space = Vector Space 1 (0x11)
Stop Type = Decelerate to stop
Axis/VS Map = do not care

WAS THIS ARTICLE HELPFUL?

Not Helpful