Select Signal

NI-Motion VI

Select Signal

Specifies the source and destination for various motion signals:

  • trigger inputs
  • high-speed capture circuits
  • breakpoint outputs
  • RTSI lines
  • RTSI software ports

Details

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
Source is the source of the signal to route to Destination.

For a Destination value of High-speed Capture[1..8], the valid Source values are as follows.

Source  Comments
RTSI[0..7]  RTSI lines 0 through 7
PXI Star Trigger          PXI star trigger line
Trigger Input  Trigger input for the corresponding axis


Note  You must route signals from the RTSI lines before you enable high-speed capture.

For a Destination value of RTSI[0..7], the valid Source values are as follows.

Source  Comments
Breakpoint[1..8]  Breakpoint outputs
RTSI Software Port  Corresponding bit in RTSI software port
Don't Drive RTSI Line  Sets RTSI pin back to input state
Phase A[1..8]  Encoder Phase A for axes 1–8
Phase B[1..8]  Encoder Phase B for axes 1–8
Index[1..8]  Index signal for axes 1–8
Destination is the destination of the signal coming from Source. Valid destinations are high-speed capture and RTSI/PXI Star Trigger lines.
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.
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.
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

When the destination is RTSI[0..7] or PXI Star Trigger, the motion controller drives the RTSI line as an output. When the destination is High-speed Capture[1..8], the RTSI line serves as an input for the high-speed capture circuitry. This VI is used to set the direction of the RTSI lines. The RTSI lines can always be read using the Read I/O Port VI, regardless of the way they are currently configured.

To manually set the state of the RTSI lines, set the Source for the RTSI line to be RTSI Software Port. Use the Set I/O Port MOMO VI to set the state of the lines.

The signal seen on the RTSI 4 pin is a high pulse of 120 to 150 ns duration. The action specified in the Enable Breakpoint Output VI only applies to the breakpoint output pin on the motion I/O connector, not to RTSI pins.

Example 1

To use the signal coming in on RTSI pin 3 to trigger the high-speed capture on encoder/axis 1, connect Destination to High-Speed Capture 1 and Source to RTSI 3.

The polarity of the high-speed capture input is specified by the Configure High-Speed Capture VI.

Example 2

To output the breakpoint signal for axis 2 on RTSI pin 4, connect Destination to RTSI 4 and Source to Breakpoint 2.

Example 3

To drive RTSI pin 5 with the corresponding bit (bit 5) of the RTSI software port, connect Destination to RTSI 5 and Source to RTSI Software Port. To set the state of the RTSI software port, use the Set I/O Port MOMO VI.

Example 4

When writing to the RTSI software port by using the Set I/O Port MOMO VI, only those RTSI lines that are configured to be controlled by the RTSI software port are affected. To set the RTSI line back to an input, connect Destination to RTSI 5 and Source to Don't Drive RTSI Line.