Get Reference Parameter

NI-Motion VI

Get Reference Parameter

Gets the value for the specified find reference parameter.

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
Parameter Type is the type of parameter to get. Valid values are:
Initial Search Direction
Final Approach Direction
Edge To Stop On
Smart Enable
Enable Reset Position
Offset Position
Primary Reset Position
Secondary Reset Position
Approach Velocity Percent  
Sequence Search Order
Enable Search Distance
Search Distance
Phase A Reference State
Phase B Reference State
Search Type is the type of reference to get. Possible Search Type values are Find Home, Find Index, Find Center, and Find Forward & Reverse Limits.
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 is the axis to configure.
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.
Value is the output for Parameter Type. Use this to get the value of a parameter.

Using This VI

Use this VI to get the parameters for Find Reference.

  • Initial Search Direction—If 1, search reverse. If 0 (default), search forward.
  • Final Approach Direction—1 is true and 0 is false (default). The following table lists the behavior of the Final Approach Direction parameter for each type of find:

    Find Type Final Approach Direction is True (1) Final Approach Direction is False (0)
    Find Home reverse approach forward approach
    Find Center
    Find Forward Limit
    Find Reverse Limit
    opposite to direction of travel into limit same as the direction of travel into limit
    Find Index N/A N/A

    Note  For Find Center, this value refers to how the controller behaves when approaching and marking the position of the limits to find their center.
  • Edge to Stop On—Applies only to Find Home. If 1, reverse edge. If 0 (default), forward edge.
  • Approach Velocity Percent—The percent of the loaded velocity that a given axis uses to perform final adjustments. Refer to the Remarks section for valid values.

    Find Index uses this percent velocity throughout the entire search routine.
  • Smart Enable—If 1, appropriately enables or disables the limits and home input before executing a find. The limits and home input are returned to their original state after the find operation is complete. To determine what state Smart Enable sets the limits or home input to, refer to the appropriate Search Type description. If 0, you must manually enable or disable the limits or home input.
  • Enable Reset Position—If 1, after successfully locating the given reference, it resets primary and secondary positions to values indicated by Primary Reset Position and Secondary Reset Position. The reset is performed after the offset move if one is requested. If the find operation fails, the position is not reset. If 0, no reset is performed.
  • Offset Position—Performs an offset move of a given distance, in counts (steps), after successfully locating the given reference, but before resetting the position if a reset is requested. Valid inputs range from –231–1 to 231–1. An offset of 0 is equivalent to not performing an offset move. If the find operation fails, the offset move does not occur.
  • Primary Reset Position—The position to reset the primary position to. Resets the position only if the value for Enable Reset Position is 1. Valid values range from –231–1 to 231–1.
  • Secondary Reset Position—The position to reset the secondary position to. Resets the position only if the value for Enable Reset Position is 1. Valid values range from –231–1 to 231–1.
  • Sequence Search Order–The order number for a find sequence. Valid values range from 0 to 216–1. Refer to the Run Sequence description for more information.
  • Enable Search Distance—If 1, Find Reference uses the value loaded for Search Distance when searching for an index. If 0 (default), Find Reference uses a set distance of 1 1/16th revolution.
  • Search Distance—The distance Find Reference searches for an index before giving up. Valid values range from 0 to 231–1.
  • Phase A Reference State—The logical state of encoder phase A when an index is found. Use this in conjunction with the encoder polarity to configure the criteria for index status. Valid values are 1 for inactive or 0 for active.
  • Phase B Reference State—The logical state of encoder phase B when an index is found. Use this in conjunction with the encoder polarity to configure the criteria for index status. Valid values are 1 for inactive or 0 for active.

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:

  • The resolution of Approach Velocity Percent is approximately 0.4%
  • For the NI 73xx controllers, Approach Velocity Percent is a single-precision floating-point value from 0.4% to 150%. This value directly scales the programmed velocity. The default value is 20%.

NI SoftMotion Controller Considerations

The following list includes considerations you must make when you are using this VI with the NI SoftMotion Controller:

  • Secondary Reset Position is not supported by the NI SoftMotion Controller.
  • Phase A Reference State and Phase B Reference State are not supported on CANopen devices.
  • Primary Reset Position must be set to 0 when you are using the NI SoftMotion Controller for the Copley Controls CANopen drives, Accelnet and Xenus.
  • The NI SoftMotion Controller supports the full 64-bit floating point range for the Approach Velocity Percent parameter.
  • The NI SoftMotion Controller requires Search Distance, and thus, Enable Search Distance is always 1 (true).