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: 

Time logging to tdms

Solved!
Go to solution

Hi to all of you out there, I'm fairly new to Labview and had a problem that hard to figure out.

I have acquired an Usb-6343 device, and I'm receiving voltage inputs from it. I am just using the voltage(continuous Input) code

that is provided as an example.

Right now I'm trying to figure out how to log time data with the voltage data on a tdms file. I'm thinking of a way using the 'tick' function, but I really haven't figured it out yet.

My final goal would be logging voltage inputs and time data on the same tdms file, but on different columns.

If anybody knows how to do this, it would be really helpful if you could kindly give me some advice.

Thank you all for reading this, and have a great day^^!

0 Kudos
Message 1 of 5
(1,590 Views)
Solution
Accepted by topic author Koon123

Hi,

 

This link might help : https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000PAUbSAO&l=en-US

 

You can wire the waveform output to write to measurement file VI and follow the steps in the link to log timestamps with data.

 

 

Message 2 of 5
(1,571 Views)

Assuming you are reading the data as a waveform, you can use the Waveform To Time Array function (dig around in the Waveform palette) to get an array to timestamps. You can then write this to the same group (but different channel) as your data.


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
Message 3 of 5
(1,566 Views)

If you are working with DBL array for your data instead of a waveform, you can build your own time array using timestamps and a shift register.  Convert both the timestamps and DBL values to strings and build a 2D array.  The TDMS file will accept the 2D array.

Message 4 of 5
(1,527 Views)

Oh my god, thank you all for giving me excellent advice.

I'll try everything you guys suggested me to do.

Thank you so much^^!!!

0 Kudos
Message 5 of 5
(1,471 Views)