LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS DAQmx data logging issue

Hi NI community,

I am using NI cDAQ module for datalogging, the file format for datalogging is TDMS. samples is 1kS/s. I want to datalog 1 analog input and 1 analog output both at the same time and the data needs to have a time stamp. i chose TDMS files for datalogging but i am getting only one file saved not all the datas are saved as a multiple TDMS file. Help me solve this issue guys.

0 Kudos
Message 1 of 4
(1,322 Views)

Hi Abraham,

 


@Abraham11 wrote:

I want to datalog 1 analog input and 1 analog output both at the same time and the data needs to have a time stamp. … but i am getting only one file saved not all the datas are saved as a multiple TDMS file.


Several "interesting" things in that little VI:

  • You create some array data from your "INPUT" array in this FOR loop: what exactly do you want to create here?
  • You use a local variable of "INPUT" for your AO task: why don't you use the control terminal and a wire?
  • Your producer and consumer loop are coupled due to DATAFLOW: this way the consumer (aka logging) loop will only run AFTER the producer loop has finished!
  • Your queue transports two DBL arrays, but in the logging loop you try to create timestamp arrays from them: where do you think will the timestamp data come from?
  • You don't use a shift register for your TDMS file reference…
  • What's wrong with getting "only one file saved"? You create just one file!?
Best regards,
GerdW


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

Hi GerdW

Thank you for reply.

I would like to answer for your questions accordingly.

1.In the for loop i will be giving inputs for analog output and adding each input element into a 1D array.
2.I can use:)
3.I'll rewire, thank you for our input
4.I don't know.
5.Sure
6.Ya you are right but my requirement is to log data for every 5minutes.

 

P.S. I some how modified the codes accordingly. PFA

0 Kudos
Message 3 of 4
(1,272 Views)

Hi Abraham,

 


@Abraham11 wrote:

3.I'll rewire, thank you for our input

 

P.S. I some how modified the codes accordingly.


Until now there still is a DATAFLOW dependency between the producer and consumer loop, so you did not modify your code accordingly!

Best regards,
GerdW


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