Motion Synchronization Using RTSI

Publish Date: Aug 24, 2016 | 5 Ratings | 4.60 out of 5 | Print | Submit your review

Overview

Many systems using motion control are required to integrate with other control systems using different elements such as image or data acquisition. One of the challenges in integrating different processes is getting them to synchronize and work together. RTSI is one of the keys to getting motion control to work in a coordinated fashion with these other control system elements.

Table of Contents

  1. What Is RTSI?
  2. Which Functions Are Available Over RTSI and How Is It Configured?
  3. How Is RTSI Used For Motion Control?
  4. References

1. What Is RTSI?

RTSI stands for Real-Time System Integration bus, a dedicated high-speed digital bus designed to facilitate systems integration by low-level, high-speed, real-time communication between National Instruments boards. Using RTSI, motion boards can share high-speed digital signals with data acquisition, image acquisition, or digital I/O boards with no external cabling and without consuming bandwidth on the host bus. The RTSI bus also has built-in switching which allows for programmatically routing signals to and from the bus through software.

For PCI boards, the physical bus interface is an internal 34-pin connector*; signals are shared via a ribbon cable inside the PC enclosure. RTSI cables are available for chaining two, three, four, or five boards together. PXI modules require no cabling at all because the built-in PXI Trigger Bus handles RTSI functions.

Note-Although the RTSI connector has 34 pins, only seven are available for user signals. The software-configurable RTSI switch is used to accommodate more than seven signal options for each board. The switch is a digital many-to-few selector switch and any available signal can be routed to any RTSI pin.

RTSI functionality varies depending on the board type. For example, on 73xx Series motion controller boards, you can directly read and write to the RTSI pins. You can also configure them as high-speed capture inputs or breakpoint outputs. High-speed capture inputs are used as a trigger to capture and store position or initiate motion events. Breakpoint outputs are used to trigger other devices by asserting at preset positions. On E Series DAQ boards, 15 timing signals are available to RTSI, including timebase, acquisition clock, and general-purpose counter signals. On National Instruments image acquisition devices, a variety of trigger and video synchronization signals are available.

RTSI provides high-speed, hardware-based synchronization capability to any automated measurement or machine control application, making it easy for you to:

  • Build high-axis-count motion control systems
  • Clock data or image acquisition based on position
  • Retrieve position information when an image or data point is acquired

Back to Top

2. Which Functions Are Available Over RTSI and How Is It Configured?

The functions available to RTSI vary by device type. Below is a list of popular National Instruments devices and the functions available on each. In the "Direction" column, output means from device to RTSI bus and input means from RTSI bus to device.

Function Direction Description LabVIEW VI
High-Speed Capture Input Capture position or trigger event when asserted Select Signal.flx
Breakpoint Output Assert at preset position Select Signal.flx
RTSI Software Port Input or output Read or write directly to RTSI bus Select Signal.flx
Table 1. RTSI Functionality for the PCI/PXI-73xx Motion Control Boards

Function Direction Description LabVIEW VI
TRIG1 Input or output Trigger for the analog input Route Signal.vi
TRIG2 Input or output Trigger for the analog input
CONVERT Input or output Convert signal for analog input
UPDATE Input or output Update clock for the analog output
WFTRIG Input or output Trigger for the analog output
GPCTR0_SRC Input or output Source for counter 0
GPCTR0_GATE Input or output Gate for counter 0
GPCTR0_OUTPUT output Output from counter 0
STARTSCAN input (both for PXI) Scan clock for analog input
AIGATE output Gate for analog input
SISOURCE output Sample clock for analog input
UISOURCE output Sample clock for analog output
GPCTR1_SRC output Source for counter 1
GPCTR1_GATE output Gate for counter 1
RTSI_OSC (20 MHZ) Input or output Timebase for all board clocks
Table 2. RTSI Functionality for E Series Data Acquisition Boards

Function Direction Description LabVIEW VI
Disabled none The trigger line is disabled IMAQ Trigger Drive VI
Acquisition in Progress output High when acquisition is in progress IMAQ Trigger Drive VI
Acquisition done output Asserted when the entire acquisition is finished IMAQ Trigger Drive VI
Pixel Clock output Pixel clock times the sampling of pixels IMAQ Trigger Drive VI
Unasserted output Write line to unasserted state IMAQ Trigger Drive VI
Asserted output Write line to asserted state IMAQ Trigger Drive VI
Horizontal Synchronization Signal output Horizontal synchronization signal produced at the beginning of each line by the camera IMAQ Trigger Drive VI
Vertical Synchronization Signal output Vertical synchronization signal produced at the beginning of each field by the camera IMAQ Trigger Drive VI
Frame start output High when a frame is being captured IMAQ Trigger Drive VI
Frame done output Asserted at the end of each frame that is captured IMAQ Trigger Drive VI
Disabled none Triggering is disabled IMAQ Trigger Configure VI
Trigger start of acquisition input When the assertion edge of the trigger is received, the acquisition is started IMAQ Trigger Configure VI
Trigger start of each buffer list input When the assertion edge of a trigger is received, the buffer list is acquired. If the acquisition is continuous, buffer index 0 will always wait on a trigger before acquiring IMAQ Trigger Configure VI
Trigger each buffer input Each buffer waits for a trigger before acquiring an image into the buffer IMAQ Trigger Configure VI
Trigger each line input Each line is triggered. This is useful when using an encoder to acquire line scan images IMAQ Trigger Configure VI
Table 3. RTSI Functionality for the PCI/PXI-14xx Image Acquisition Boards

Function Direction Description LabVIEW VI
REQ1 Input or output Handshaking request 1 Route Signal.vi
REQ2 Input or output Handshaking request 2 Route Signal.vi
ACK1 Input or output Handshaking acknowledge 1 or start trigger Route Signal.vi
ACK2 Input or output Handshaking acknowledge 2 or start trigger Route Signal.vi
STOPTRIG1 Input Stop trigger Route Signal.vi
STOPTRIG2 Input Stop trigger Route Signal.vi
PCLK1 Input or output Data clock Route Signal.vi
PCLK2 Input or output Data clock Route Signal.vi
Table 4. RTSI Functionality for the PXI-6533, PCI-DIO-32HS High-Speed Digital I/O Boards

Back to Top

3. How Is RTSI Used For Motion Control?

You can use RTSI signals to synchronize motion control applications with other processes such as data or image acquisition using three main synchronization methods. More detail on each of these methods is given in the following section.

Software Trigger

The most basic form of synchronization over RTSI is controlling the port directly from software.  This results in less deterministic behavior than other synchronization methods discussed in this document but has the advantage of not being limited to pre-defined events.  For example, you could drive a line on the RTSI port high while a motion profile is being executed as shown in Figure 1.

To control the RTSI port from software, configure the desired RTSI lines to read their values from the RTSI Software Port and control the level of the RTSI Software Port by addressing I/O port 9.


Figure 1. VI demonstrating how to control the RTSI port from software

Position Breakpoints

You can also use RTSI synchronization to clock your data or image acquisition tasks based on the position of an axis on the motion controller. The Breakpoint Output feature of the motion controller is used to assert a digital output at specific positions during the move. This digital output is routed over RTSI where it can be used by other National Instruments devices.  The breakpoint task can be configured for a single breakpoint or multiple.  Refer to the Downloads section for an example of each option.

A common use of this synchronization technique is using a breakpoint signal to trigger the start of a data acquisition task.  As the move profile is executed and the motor reaches a pre-defined breakpoint position, it will drive the RTSI line high.  The DAQ card will then receive the signal on the RTSI port and start its acquisition.  The use of breakpoints can also be applied to torque and force measurement systems, antenna directionality characterization, or any measurement system where data versus position is of interest.

Figure 2 shows how to implement the breakpoint output over RTSI. This program configures the RTSI line to carry the breakpoint signal and triggers the breakpoint at a specified point through the move. 


Figure 2. VI demonstrating how to configure a simple breakpoint task

High-Speed Capture Input

Another common application is to capture and record the position of a motion axis based on an external trigger.  When the high-speed capture task is enabled and receives a trigger, it immediately captures and holds the position value.  This value is then held in the controller's memory and is available to be read into software until the high-speed capture task is re-enabled.  The high-speed capture task can be configured to capture position information for a single trigger or multiple. Refer to the Downloads section for an example of each option.

Use of this synchronization method is similar to that of breakpoints but instead of sending trigger signals, high-speed capture sets up the motion controller to receive triggers and return position information.  An example of an application using this feature is performing stress testing on an object.  The motion system would push or pull on the object until some threshold is met, triggering the motion controller to retrieve the exact position of the motor at that time.

Figure 3 shows how to configure the High-speed Capture VIs to take a trigger on RTSI 0 and return the captured position of a motion axis at the time the trigger was received.


Figure 3. VI demonstrating how to configure a simple high-speed capture

For more information on these synchronization techniques, refer to the NI-Motion Help installed with the NI-Motion driver.  To see detailed examples of synchronizing motion and data acquisition using breakpoints and high-speed capture, view the examples in the Downloads section.

Back to Top

4. References

For more information about using RTSI with your National Instruments products, refer to the following documents:

NI-DAQ Function Reference Manual for PC Compatibles
NI-DAQ User Manual for PC Compatibles
Data Acquisition Basics Manual
NI-IMAQ Function Reference Manual
NI-IMAQ VI Reference Manual
PXI-1010 Chassis User Manual
E Series User Manual

 

Back to Top

Bookmark & Share



Ratings

Rate this document

Answered Your Question?
Yes No

Submit