Configure High-Speed Capture

NI-Motion VI

Configure High-Speed Capture

Configures the high-speed capture input for the appropriate signal behavior.

Details     Remarks

Device Compatibility

DeviceCompatibility
7330
Y
7340
Y
7344
Y
7350
Y
7390
Y
NI SoftMotion Controller for CANopen—Accelnet
N
NI SoftMotion Controller for CANopen—Xenus
N
Operation (Single) selects between single and buffered high-speed capture.
Capture Mode selects among the following values to specify the manner in which the incoming high-speed capture signal is interpreted:
Non-Inverting Level
Inverting Level
Low-to-High Edge
High-to-Low Edge
Non-Inverting Digital Input
Inverting Digital Input


Non-Inverting Level, Inverting Level, Low-to-High Edge, and High-to-Low Edge modes define the state of the input signal that results in a high-speed capture event. Non-Inverting Level means that an active high input causes a capture to occur. Conversely, Inverting Level means that an active low input causes a capture to occur. Notice that if the signal is already at the specified level when high-speed capture is enabled, the capture occurs immediately. Low-to-High Edge requires that the signal make a transition from low to high to trigger a capture; High-to-Low Edge requires that the signal make a transition from high to low to trigger a capture.

Non-Inverting Digital Input and Inverting Digital Input modes allow you to configure the high-speed capture input as a simple digital input independent of the high-speed capture circuitry. You use the Read High-Speed Capture Status VI to read this state of the digital input. This functionality is useful when you do not need the high-speed capture capability, but need an extra digital input for general-purpose use. When configured in these modes, there is no need to enable the high-speed capture input.

Note  The mode set by Configure High-Speed Capture does not take effect until Enable High-Speed Capture is called.
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 Encoder selects the axis or encoder 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.

Using This VI

After configuring the high-speed capture input, you enable the high-speed capture circuitry with the Enable High-Speed Capture VI. The Read High-Speed Capture Status VI tells you when the capture event has occurred. Finally, you read the captured value with the Read Captured Position VI.

High-speed capture inputs are an integral part of the encoder resources. You can execute this VI indirectly on axes or directly on encoder resources.

The controller captures the instantaneous encoder position when the input becomes active, as defined in the Capture Mode parameter.

High-speed capture functionality is available in both single and buffered mode. In single high-speed capture, the input trigger is configured to capture a single encoder position, and must be re-enabled after each capture. You can use buffered high-speed capture to support higher capture frequencies. Buffered high-speed capture allows captures positions to be stored into a buffer and automatically re-enabled by the controller. To configure a buffer for high-speed capture, refer to the Configure Buffer VI.

You can use a high-speed capture input as a general-purpose input and read its status with the Read High-Speed Capture Status VI. In Non-Inverting Level, Inverting Level, Low-to-High Edge, and High-to-Low Edge modes, the input has latching behavior, meaning that after the high-speed capture input is enabled, if the input signal ever becomes active (as defined by the Capture Mode parameter), the high-speed capture status is true until the input is reenabled. In Non-Inverting Digital Input and Inverting Digital Input modes, the inputs simply reflect the current state of the input signal. The input does not need to be enabled or reenabled at any time in these modes.

Note  NI-Motion does not support breakpoint and high-speed capture functionality on an axis when the primary feedback for that axis is used as analog feedback.
Note  When configured as a digital input, Enable High-Speed Capture and Read Captured Position have no effect. The high-speed capture input is used as a general-purpose digital input. Refer to Read High-Speed Capture Status for information about reading the input status.
Note  National Instruments suggests that you do not change the capture mode when the high-speed capture is already enabled. Doing so might cause a false capture immediately after the Configure High-Speed Capture VI is invoked.

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:

  • You can synchronize NI 73xx motion controllers with other National Instruments devices using the RTSI bus. Refer to the Select Signal VI for information about using the RTSI bus as the high-speed capture trigger.
  • NI 73xx controllers do not support multiple simultaneous high-speed captures per axis.

NI SoftMotion Controller Considerations

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

  • The NI SoftMotion Controller supports multiple simultaneous high-speed captures per axis.

    To use this VI to configure the NI SoftMotion Controller for multiple high-speed captures on an axis, set the upper four bits of the resource ID to the following.

    TypeValue
    Primary HS Capture0X0
    Secondary HS Capture0XA0


    For example, to configure primary high-speed capture on axis 1, set the resource ID to 0X01. To configure secondary high-speed capture on axis 1, set the resource ID to 0XA1.
  • The NI SoftMotion Controller does not support buffered high-speed captures.
  • The NI SoftMotion Controller for the Copley Controls CANopen devices, Accelnet and Xenus, does not support high-speed captures.
  • The NI SoftMotion Controller does not support RTSI synchronization.