Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS Logging - Can I add some values manually?

I have an analog input task and I am using TDMS logging for this task.

 

Is there any possibility to add data (from withing my software) to this TDMS file during runtime?

 

 

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

Hi,

you can add a parallel loop to your loggin loop and pass the same tdms reference. In the second loop you can write to the same tdms file like you're logging.

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

Sorry, I can't follow your thougths.

 

At the moment I just use

myAnalogInputTask.ConfigureLogging(filePath, TdmsLoggingOperation.OpenOrCreate, LoggingMode.LogAndRead)

 

Then I continuously acquire the anlog input ports and afterwards I have a TDMS file with the logged analog input values.

 

During logging/runtime I do some calculations and so on. At least one calculated value I would like to add to the TDMS logging.

 

I couldn't find any solutions yet with DAQmx.

 

Do I need the TDMS DLL? ( http://zone.ni.com/devzone/cda/tut/p/id/8032 )

If yes, then you probably mean that I have to add a new group to the TDMS file, right?

 

Actually my big wish was to add to each analog input line another software calculated value (so that the values are synchronized). But that's  not possible I guess.

So there is probably no other solution than synchronizing the values manually afterwards.

 

 

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

I think you can synchronize the values, can you add a screenshot or attach the vi? I want to be sure that we're talking about the same thing 😃

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

Screenshot of what?

 

As we are in the .NET forum I only have some code which looks similar to the TdmsContAcqVoltageSamples:

C:\Dokumente und Einstellungen\All Users\Dokumente\National Instruments\NI-DAQ\Examples\DotNET3.5\Analog In\Measure Voltage\TdmsContAcqVoltageSamples_IntClk\CS

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

Hello Camell,

 

since DAQmx TDMS Logging happens on Kernel "Level" there is no way to add Data during the streaming process.

There are two ways to solve this problem:

 

-Dont use TDMS Logging Functionality of DAQmx and read the Data to your Application and then use TDMS API to write this Data and your additional Data to the TDMS File. (simple DAQmx Read)

 

-Use TDMS Logging Functionality of DAQmx and reopen the File your Data was logged to after Logging is complete and add your additional Data.

 

I hope this information helps you creating your Application.

 

Regards

 

Moritz M.

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