06-30-2011 03:07 AM
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?
07-01-2011 02:44 AM
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.
07-01-2011 08:01 AM
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.
07-01-2011 08:09 AM
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 😃
07-01-2011 08:32 AM
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
07-04-2011 04:23 AM
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.