From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Synchronize NI 9401 and 9237 Measurements Using LabVIEW with DAQmx

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Hardware

  • Data Acquisition (DAQ)

    Software

  • LabVIEW

    Driver

  • NI DAQmx

Code and Documents

Attachment

Overview
This example illustrates how to synchronize strain measurements and encoder measurements using an NI 9237 and an NI 9401 with DAQmx.


Description

This example synchronizes strain measurements from an  NI 9237 and encoder measurements from an NI 9401.  Both are used in a cDAQ-9178, but will work in cDAQ-9174 as well.


Requirements

  • LabVIEW 2012 (or compatible)
  • DAQmx 9.5.5 (or compatible)

 

Steps to Implement or Execute Code

  1. Pick the proper channels.
  2. Run the VI.

 

Additional Information or References
VI Snippet

209.png

**This document has been updated to meet the current required format for the NI Code Exchange.**

Regards,
Jim Schwartz

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Not applicable
on

Hi JSchwartz,

Are you 100% sure the counter measurement sill be synch with the 9237?  My doubt is because of the oversampled clocked used by the 9237 because of the sigma-delta ADC..... In the code, the counter sampling clock is the AI/SampleClock...Will this be the final data rate (50kS/n where n=1-31) or the oversampled-clock that goes to the sigma-delta ADC of the 9237?

Thanks,

Vincent

Not applicable
on

Just to answer myself....

I was told that the AI/SampleClock is the actual sampling clock and the the oversampled-clock for the Sigma-Delta ADCs is given by the AI/timebase...

Vincent

griff32
Member
Member
on

Is the filter delay from the anti-aliasing filter by-passed in this code because you are using the ai-input trigger?

Thanks

Dammond

jschwartz
Active Participant
Active Participant
on

It has been quite a while since I posted this, but I don't believe that the ai input trigger would make a difference.  You may still need to account for the filter delay.  This can easily be done by following the steps in this Knowledgebase -

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P8toSAC&l=en-US

Regards,
Jim Schwartz