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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx configure logging (TDMS) and counter

Hi,

I'm trying to stream analog data jointly with counter data to one TDMS file with use of DAQmx configure logging vi. This is quite new but powerful function but I can't manage with it successfully. I'm able to acquire analog data only and display no. of counts simultaneously (attached diagram). I have no idea how attach counter data to TDMS stream as separate channel group.

It is important for me to stream data with this VI bacause I'm sampling analog data with 95kHz per channel (PCI-6143 board).

 Could you post any ideas how to resolve this problem?

Best regards

Mark

0 Kudos
Message 1 of 6
(4,846 Views)

I think you might want to use the TDM Streaming functions to do this. Look at the example "TDMS - Write data (time domain)".

 

EricTDMS - Write data (time domain)_BD.png

 

 

0 Kudos
Message 2 of 6
(4,833 Views)

Hi,

Thanks for your hint. I’m able to acquire in this way. As I mention earlier I would like to use  DAQmx configure logging VI (implemented to new version of DAQmx drivers) which is optimized for streaming data directly to TDMS file. Such solution really improve application performance. My sampling rate is 250kHz/Ch (I was wrong earlier - 95kHz is a bandwidth) so if I take 4 channels and classic solution I have problems with data streaming. I can use of course method with two loops and queues but I see that application of  DAQmx configure logging VI gives better performance. I forgot add that simultaneously with data acquisition I also plot acquired signals, calculate some signal features (separate loop) and acquire images from 3 cameras (separate loops) - so effective data streaming is crucial for this application.

Best regards

Mark

0 Kudos
Message 3 of 6
(4,828 Views)

I'm assuming by saying "two loops and queues" you mean a producer/consumer pattern which seems like it would be very useful for your application.

 

I've never used the configure logging VI before. It appears as if it is intended for one task rather than multiple tasks so I don't know how to get around having separate TDMS files. Trying to combine the files after logging might be one possibility.

 

Maybe someone else has an idea???

0 Kudos
Message 4 of 6
(4,818 Views)

Eric, hear is short info about DAQmx configure logging http://zone.ni.com/devzone/cda/tut/p/id/9574.

Yes I thought about producer/consumer structure, It is first alternative way.

There is also another very simple way -  connecting encoder to analog input and acquire together with analog signals. Of course It will be neccasary to process sigal from encoder after recording. I'm also concerning such solution 🙂

Ok I have to sleep with this problem  🙂

Best regards

Mark

0 Kudos
Message 5 of 6
(4,815 Views)

Using a single device sounds like possible solution, especially since the NI documentation says Configure Logging VI will "stream data directly from the device buffer to the hard disk." Given the data path, it seems unfeasible to have different tasks writing to the same file using this method.

When you find a solution, let us know what you decided.

0 Kudos
Message 6 of 6
(4,811 Views)