Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Synchronizing Analog Input in a DSP VI (DSP Module)

LabVIEW DSP 8.2 Help
September 2006

NI Part Number:
371299B-01

»View Product Info

Analog input on a DSP target is non-blocking, so the analog input continues to return old data from the buffer until the buffer obtains enough new data to fill the buffer. This means that the DSP target might process the old data multiple times and not be ready to process the new data as soon as the new buffer is available.

To make sure that the DSP application only processes new data from the analog input buffer, you can use the AI Property Node. The AI Property Node contains the new data? item that detects the occurrence of a new buffer of analog input data. Use the AI Property Node in time-critical applications to ensure that the DSP target does not repeatedly process the old data buffer while the DSP target collects a new buffer of analog input data.

Note  Because the DSP Elemental I/O Nodes use double buffering to achieve real-time data acquisition on the DSP target, you do not need to use the AI Property Node if the DSP VI contains both analog input and analog output.

Complete the following steps to synchronize analog input in a DSP VI.

  1. Create a new project with a DSP target.
  2. Add an analog input Elemental I/O item to the project in the Project Explorer window.
  3. Place an Analog Input Elemental I/O Node on the block diagram.
  4. Place the AI Property Node on the block diagram.
  5. Right-click the new data? item in the AI Property node and select Select item»Analog input»AIx to select an analog input resource.
  6. Create a Case structure on the block diagram.
  7. Place any VIs or functions you need to process the analog input signal in the True case of the Case structure.
  8. Wire the new data? terminal of the AI Property Node to the selector terminal of the Case structure.
  9. Wire the analog input terminal of the Elemental I/O Node to the objects in the True case.

Refer to the Analog Input Synchronization example VI in the labview\examples\EmbeddedDSP\ directory for an example of using the AI Property Node.


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit