LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronizing TDMS-Stream (using delta sigma and analog module)

Hey everyone,

i want to acquire data from different modules (NI 9239  (delta sigma module) , NI 9215 (analog module)) using the "DAQmx configure logging (TDMS).vi" and an external start trigger (see attachments for a short example code).

For synchronization, both modules run in the same task, so the delta sigma module could share the sample clock.  However, the delta sigma module (NI 9239) has a constant delay  to the NI 9215 analog module (see link below). The delay is 40 samples in my case.

I have found a solution to clear the delay (see this link: (http://digital.ni.com/public.nsf/allkb/F989B25FF6CA55C386256CD20056E27D?OpenDocument), but the suggestion to pre-read the 40 samples of the NI 9215 is not possible when using the "DAQmx configure logging (TDMS).vi" to stream the data directly to a tdms-file.

So my questions are;


- Is there a possibility to synchronize (same sample clock, no delay) a delta sigma module and an analog module when using the "DAQmx configure logging (TDMS).vi" ?

- Or is the solution to pre-read the samples the only possibility to sync the modules?


I want to use the "DAQmx configure logging (TDMS).vi" because i have to acquire data from multiple devices and multiple modules and I think I will reach a better performance by streaming the data directly to hard disk. (Link:  http://www.ni.com/white-paper/9574/en/ )

Thanks for your help



0 Kudos
Message 1 of 5
(1,237 Views)

Hi!

 

I would go by just logging the data anyway and write the delay to the property of the channel and remove it in a post-processing step?

Is that a feasible alternative for you?

 

Best regards,

Christoph

Staff Applications Engineer
National Instruments
Certified LabVIEW Developer (CLD), Certified LabVIEW Embedded Systems Developer (CLED)


Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved
0 Kudos
Message 2 of 5
(1,195 Views)

hi,

 

thank you for your answer. Remove the data in the post-processing is possible, but not very comfortably. When i have got a hugh among of data, it costs a lot of time and performance to read the hole file tdms file, delete the samples and re-write the data into the tdms-file afterwards. It's not a good solution especially on older pc's.

 

Best regards,

 

Marvin

0 Kudos
Message 3 of 5
(1,158 Views)

Hi Marvin,

 

first of all please check/benchmark if you really need the maximum performance for the acquisition. Perhaps a standard approach with easier configuration works for you and you don't need to worry about the DAQmx configure logging (TDMS) function.

 

I had a closer look at the DAQmx configure logging (TDMS) function and there are 2 additional properties (Relative To and Offset). I never used these settings, but perhaps you can tweak two Logging functions so that the delay is taken care of.

 

Or another possiblity: Use two differently timed start triggers, so that the faster task is started at a later point in time.

 

Best regards,

Christoph

Staff Applications Engineer
National Instruments
Certified LabVIEW Developer (CLD), Certified LabVIEW Embedded Systems Developer (CLED)


Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved
0 Kudos
Message 4 of 5
(1,143 Views)

Hi Christoph,

 

i have tried the properties (Relative To and Offset) and also the delay function offered this way. The "Relative To" function doesn't work with DAQmx configure logging. The offset function works fine, both channels start synchron, but some samples got lost during the measurement. The delay functions shows the same.

 

As conclusion, i think it's the best and easiest way to clear the first samples in the post processing.

 

Thanks for your help.

 

 

0 Kudos
Message 5 of 5
(1,056 Views)