LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx Configure Logging (TDMS) - Bug/odd-behavior

I'm trying to do a simple DAQmx acquisition task w/ logging to a TDMS file.  My program  is basically identical to the 'Voltage - Continuous Input.vi' example; but with the addition of scanning at two separate rates.  When configuring 'DAQmx Configure Logging (TDMS)' if I use 'Open or Create' I get the data from both scan rates in the TDMS file.  However, if I use 'Create or Replace' I only get the data from the second scan rate in the TDMS file and the first scan rate data goes missing. - In both cases the vi is creating a new TDMS file, not opening an existing file.

I can work around this by doing some file manipulation ahead of calling DAQmx Configure Logging (TDMS), but seems like a bug or at least odd behavior that should be explained in documentation. - Took me a long time to figure out why sometimes I had data loss.

Can anyone explain this behavior from 'DAQmx Configure Logging (TDMS).vi'

0 Kudos
Message 1 of 4
(78 Views)

Hi djb,

 


@djb wrote:

I'm trying to do a simple DAQmx acquisition task w/ logging to a TDMS file.  My program  is basically identical to the 'Voltage - Continuous Input.vi' example; but with the addition of scanning at two separate rates.


How can one DAQmx task scan at two different sample rates??? Maybe showing your code might help…

 


@djb wrote:

When configuring 'DAQmx Configure Logging (TDMS)' if I use 'Open or Create' I get the data from both scan rates in the TDMS file.  However, if I use 'Create or Replace' I only get the data from the second scan rate in the TDMS file and the first scan rate data goes missing. - In both cases the vi is creating a new TDMS file, not opening an existing file.


In case you have two tasks then using "create or replace" the 2nd task might replace the TDMS file of the 1st one - just a possible explanation for the behaviour you see…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(47 Views)

To answer the question asked by GerdW, I'm stopping a higher rate acquisition and then starting a slower rate one.

As suggested, I've uploaded a snippet of the code; and in the zip file is the VI itself along with the TDMS files it produced.  The only difference between settings for the two TDMS file results is that in one case the operation input was set to 'Create or Replace' and in the other to 'Open or Create'; and as I mentioned earlier in both cases a new TDMS file was created.

Download All
0 Kudos
Message 3 of 4
(39 Views)

Hi djb,

 


@djb wrote:

As suggested, I've uploaded a snippet of the code;


Thanks!

 

As I wrote before: with "Create or Replace" the TDMS file will be "created or replaced" (as requested by YOU) whenever you start the task using DAQmxStart!

Using the "Open or Create" mode will reuse an already existing TDMS file with the 2nd DAQmxStart call…

 

Why do you wonder about this behaviour?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(20 Views)