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.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx Logging New Features - Split files, non-buffered logging, and pause/resume

Sorry for the delay in replying.

Now that you mention it, I believe that in Log only mode, the buffer size needs to be evenly divisible by 4 or 8 times the file write size (I can't remember which). If you try playing around with those three values, hopefully you'll be able to get more fine-tuned control.

If this doesn't work for you, let me know and I'll play around with it tomorrow.
Thanks,

Andy McRorie
NI R&D
0 Kudos
Message 11 of 18
(1,951 Views)

I have made some working code. But not with all the feature.

I will share some code soon.

 

Thank you Andrew Mc and All,

 Yogesh Redemptor

Regards,
Yogesh Redemptor
0 Kudos
Message 12 of 18
(1,935 Views)

Hi Andy,

 

I have a little time right now to work on the new feature in DAQmx. However I have few questions that perhaps you could answer.

 

1. How to apply custom scales to each of the files saved every 60 seconds? Until now I applied it directly to opened TDMS file just after the logging. Can I get the TDMS file reference from the DAQmx?

2. Is it possible to change the TDMS file names in the way that will have the timestamp from the time where were created? As far as I understand the file name should be specified before the previous one is finished.

 

Thanks!

 

--

Łukasz

0 Kudos
Message 13 of 18
(1,803 Views)

1. How to apply custom scales to each of the files saved every 60 seconds? Until now I applied it directly to opened TDMS file just after the logging. Can I get the TDMS file reference from the DAQmx?

The best way to apply a custom scale is to use DAQmx custom scales.  When you call DAQmx Create Channel (or in the DAQ Assistant UI), you can specify a custom scale (linear, table, map, polynomial).  This scale will be applied automatically when you read the TDMS data.  Would this work for you?

 

2. Is it possible to change the TDMS file names in the way that will have the timestamp from the time where were created? As far as I understand the file name should be specified before the previous one is finished.


Your understanding is correct.  I honestly can't think of a good way to do this now.  I would recommend create an idea exchange feature for that idea.

Thanks,

Andy McRorie
NI R&D
0 Kudos
Message 14 of 18
(1,799 Views)

Hi Andy,

 

Thank for your fast reply.

 

In that case I will think about other naming possibilities or just use already implemented data logging layer based on producer-consumer design pattern.

 

Actually I also have another question in my mind. In case of data acquisition into split files I sometimes have significant data footprint (many channels and high sample rate) to be stored on external drives. Is there any way to track and expand if needed the circular buffer implemented in DAQmx logging?

 

Thanks,

--

Łukasz

 

http://lukasz.kocewiak.eu

0 Kudos
Message 15 of 18
(1,787 Views)

Hi, Andy

I want to save data in multiple TDMS files with no data loss between two contiguous files. I don't know how to achieve that with DAQmx Start New File, and I choosed  the producer-consumer pattern and I setted the time length for each file to 60-s. The problem is that there is about 0.2-s data loss between two files, which means the start time of a file is not equal  to the end time of the previous file, the length between them is about 0.2s. As I reduce  the lengh of each file , the data loss  also decreases.  Do you know how to  make the data to be continously saved with no loss. I am not sure whether I have expressed myself clearly,  thanks.

Download All
0 Kudos
Message 16 of 18
(1,651 Views)

Hi shalala,

 

You posted on a thread that is almost ten months old. To ensure faster responses from other customers and from other engineers at National Instruments, it is typically good to create a new thread if one hasn't been touched in awhile.

 

If you are using a producer/consumer model, there should be no data loss. The actual time of saving may include a delay, but there should be no delay in the samples.

 

Check out this example that implements data logging with TDMS file splitting.

 

David B.
Applications Engineer
National Instruments
0 Kudos
Message 17 of 18
(1,640 Views)

Also posted here:http://forums.ni.com/t5/Multifunction-DAQ/DAQmx-Start-New-File/m-p/2483472#U2483472


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 18 of 18
(1,627 Views)