Find Reference

NI-Motion VI

Find Reference

Executes a search operation to find a reference position:

Details     Remarks

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
Search Type is the type of search executed by the Find Reference VI.

Value  Definition  Description
Find Home   Executes a Find Home on the given set of axes.
Find Index   Executes a Find Index on the given set of axes.
Find Center   Finds the center of travel on a given set of axes.
Find Forward Limit   Finds the forward limit on a given set of axes.
Find Reverse Limit   Finds the reverse limit on a given set of axes.
Run Sequence   Runs the loaded Find Sequence.
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/VS Map (Disabled) is the bitmap of axes or vector spaces (coordinate spaces) to use with this VI. It is only required when multiple axes or vector spaces are selected with the Axis or Vector Space parameter. Otherwise, this parameter is ignored.

When searching on multiple axes (Axis or Vector Space = Axis Control):

Axis 1—If TRUE, start the find on the specified axis. If FALSE, do not start the find on the specified axis.
Axis 2—If TRUE, start the find on the specified axis. If FALSE, do not start the find on the specified axis.
Axis 3—If TRUE, start the find on the specified axis. If FALSE, do not start the find on the specified axis.
Axis 4—If TRUE, start the find on the specified axis. If FALSE, do not start the find on the specified axis.
Axis 5—If TRUE, start the find on the specified axis. If FALSE, do not start the find on the specified axis.
Axis 6—If TRUE, start the find on the specified axis. If FALSE, do not start the find on the specified axis.
Axis 7—If TRUE, start the find on the specified axis. If FALSE, do not start the find on the specified axis.
Axis 8—If TRUE, start the find on the specified axis. If FALSE, do not start the find on the specified axis.

When searching on multiple vector spaces (Axis or Vector Space = Vector Space Control):

Vector Space 1—If TRUE, start the find on the specified vector space. If FALSE, do not start the find on the specified vector space.
Vector Space 2—If TRUE, start the find on the specified vector space. If FALSE, do not start the find on the specified vector space.
Vector Space 3—If TRUE, start the find on the specified vector space. If FALSE, do not start the find on the specified vector space.
Vector Space 4—If TRUE, start the find on the specified vector space. If FALSE, do not start the find on the specified vector space.
Axis or Vector Space can select an axis (1 through 15), vector space (0x11 through 0x14), multiple axes (0), or multiple vector spaces (0x10). When simultaneously starting multiple axes or vector spaces, the Axis/VS Map parameter indicates which axes or vector spaces are involved.

To start a find on 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 a find on multiple axes, the Axis or Vector Space selector is set to 0 and the Axis/VS Map bitmap defines the axes to start. Similarly, to start a find on multiple vector spaces, the Axis or Vector Space selector is set to 16 and the Axis/VS Map bitmap defines the vector spaces to start.

Note  It is not possible to combine a Find Reference on an axis and 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 Find Reference.

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.
Axis or Vector Space Output is the Axis or Vector Space you wired into the VI. Use Axis or Vector Space 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 returns immediately after starting the given find operation. Use this VI in conjunction with Wait Reference to determine when the find operation completes and if the find was successful.

You can manually stop a search operation using MAX or by calling the Stop Motion VI. When encountering a limit or home input, a search operation performs a halt stop and then continues based on the Search Type. An unexpected limit condition during a find stops the sequence and generates a modal error. Refer to Errors and Error Handling for information about errors.

Note  You must set unused limit and home inputs to their inactive state using MAX or with the Enable Limits and Enable Home Inputs VIs.
Note  Forward is defined as the direction of increasing position. The Forward and Reverse Limits must be located at the proper ends of travel for Find Reference to function properly.

You can access settings for Find Reference through MAX, Load Reference Parameter and Get Reference Parameter. For a detailed description on how these settings affect a given Search Type, refer to the section on each type. Most of these settings are on a per-Search Type basis.

Note  If you start a coordinate (vector) space, Find Reference actually starts the axes individually, so it is not a coordinated vector move.

Search Types

Find Home

Find Index

Find Center

Find Forward and Reverse Limits

Run Sequence

Remarks

This section includes information about how the behavior of this VI differs among the controllers that support it.

NI 73xx Controller Considerations

The following list includes considerations you must make when you are using this VI with a 73xx motion controller:

  • If your application includes a high-speed capture that takes place after a Find Reference move that finds an index, you must enable the high-speed capture after the find reference move. If your application includes a buffered high-speed capture, you must also configure the buffer after the find reference move.
  • When performing a reset position as part of a Find Reference operation, add at least one of the following to the move complete criteria to ensure that the motor is not moving when the reset position executes:
    • Add a delay after the profile complete status is true to allow sufficient time between the output and reset position for the motor to stop. Use Configure Move Complete Criteria to configure a delay.
    • Use the in-position signal as a criteria for move complete. The NI PCI-7390 controller uses this signal by default. To add this signal to the move complete criteria for controllers other than the NI PCI-7390, use Configure Motion I/O Map to map the signal to a pin and then use Write Trajectory Data to add in-position to the move complete criteria. In addition, configure the in-position range on the drive to a small enough number to ensure that the target position is reached. Refer to your drive documentation for information about configuring the in-position range on the drive.