Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Triggering NI Motion Controllers (High-Speed Capture) Using Encoder Lines

Primary Software: Driver Software>>NI-Motion/FlexMotion
Primary Software Version: 8.0
Primary Software Fixed Version: N/A
Secondary Software: LabVIEW Development Systems>>LabVIEW Professional Development System
Hardware: Motion Control>>Controllers>>PCI-7344

Problem:
I would like to use an encoder line (Phase A, Phase B, Phase Z) to trigger a High Speed Capture on my NI 7330, 7340, or 7350 motion controller card. How can I do this?

Solution:
With NI-Motion and National Instruments hardware, you can use the encoders on your motors to send triggers both external and internal to the motion controller. The most direct way to do this is to physically connect the encoder line that you want to use as a trigger to the trigger input line that you want to trigger. This method requires a Universal Motion Interface (UMI) which provides easy access to these terminals. For example, if you want to use the index line on Axis 1 to trigger High-Speed Capture on Axis 2, you should wire INDEX1 to TRIG2.

If a UMI is not available to you, you can use the RTSI port on your motion controller card to connect the signals. To do this, you will need to use the Select Signal VI, which can be found on the Functions Palette by going to Vision and Motion»NI-Motion»Analog & Digital. This VI allows you to internally connect a source terminal to a destination terminal on the motion controller. 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.

There are some caveats to using the Select Signal VI. For each Destination input, there are only a few valid Source inputs. Valid connections are shown in the following table. For the Destinations or High-Speed Capture[1..8] and RTSI[0..7], shown in each header, valid Sources are listed.

Table 1. Valid Sources for Selected Destination Inputs in the Select Signal VI
High-Speed Capture[1..8] RTSI[0..7]
RTSI[0..7] Breakpoint[1..8]
PXI Star Trigger RTSI Software Port
Trigger Input Don't Drive RTSI Line
  Phase A[1..8]
  Phase B[1..8]
  Index[1..8]


As you can see, it is not valid to connect an encoder line directly to a High Speed Capture line. You will need to use two Select Signal VIs together, and physically connect two RTSI lines with a custom jumper. For example, you will route the Phase A 1 (phase A of encoder 1) to RTSI 0. Then you will route RTSI 1 to High Speed Capture 1. You will then need to physically connect RTSI 0 and RTSI 1. Refer to the figure below for which RTSI pins to connect.

Figure 1. RTSI Connector Diagram for PCI Card


Table 2. RTSI Connector Pin Assignments
RTSI Bus NI PCI Motion Controllers
RTSI_OSC (clock) Pin 34
RTSI 6 Pin 32
RTSI 5 Pin 30
RTSI 4 Pin 28
RTSI 3 Pin 26
RTSI 2 Pin 24
RTSI 1 Pin 22
RTSI 0 Pin 20
Unused Pins 1-18 (all)
Ground Pins 19-33 (odd)


Note: When using the Select Signal VI with High Speed Capture, always be sure to route signals before you enable your High Speed Capture.

Related Links:
Developer Zone Tutorial: Quadrature Encoder Fundamentals
Developer Zone Tutorial: High-Speed Capture
KnowledgeBase 351A22YB: Using High Speed Capture with RTSI in NI-Motion
KnowledgeBase 2QK7TGLT: Can I Use Both RTSI and an External Signal to Trigger the High Speed Capture Lines at the Same Time?

Attachments:





Report Date: 10/09/2007
Last Updated: 04/24/2009
Document ID: 4E8A7BQ7

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit