LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

simultaneous read and write on a tdms file

Solved!
Go to solution

I found similar discussions on here, but none that satisfied my problem. I am running multiple loops inside of one vi, one of which writes data to a .tdms file continuously. Another loop finishes its task early on in a test, and I would like to transition this loop so that it accesses the file being written to and begins writing it across a network. This will also allow me to verify that data is being written to the file and that it is uncorrupted.

 

I started with just the basics, but when I transition the second loop to read the file that is being written to, it always errors out, saying that it encountered the end of the file. It does this if I set count to 1, -1, or anything in between. It does not, however, illuminate the end of file output.

 

I have the tdms file input on the tdms read wired to a local variable just as I do the tdms write, they both read the same and I get one iterations worth of data out of the read, so apparently accessing the file is no problem. And for anybody that cringed at the local variables, I do ensure that the read and write are not turned on until the local variable is updated.

0 Kudos
Message 1 of 3
(3,274 Views)
Solution
Accepted by topic author deskpilot

Try setting the "group name" input on "TDMS Read". If you write multiple groups, you might want to use "TDMS List Contents" in order to get a list of groups.

 

Herbert 

Message 2 of 3
(3,251 Views)

Set the group name and that will fix the problem I've been messing around with for two days. Ya right, likes its that simple. DOH! Smiley Surprised How'd you do that?

 

Many thanks!Smiley Very Happy

0 Kudos
Message 3 of 3
(3,236 Views)