From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

TDMS File Save Not Working: Error 6

Solved!
Go to solution

Hi,

 

I'm currently trying to read off of two instruments simultaneously. I've included the VI I've written for this purpose - it has custom VIs for the instrument I'm using (RBD 9103 Picoammeter) but those shouldn't be too important for what I need help with. I have the data collection in a while loop. The data comes out as a double which I collect into a cluster in order to plot in a waveform chart. I then convert the cluster to an array in a small loop, and send the array to the TDMS write. It seems to me that this is what I want; however, I'm not sure if I have it structured properly. Currently it takes a long time for any data to be plotted and this may have to do with the cluster-to-array loop. I put the TDMS close in the last frame of my flat sequence but I'm not sure if that's right. I've tried running this and have consistently gotten "Error 6" but I'm having a hard time discerning exactly what's wrong with my code. Error 6 is typically caused by too much data in one file directory, but this only seems to produce maybe 10 data points when I run it for a couple of minutes. Any help would be appreciated! Thanks.

Download All
0 Kudos
Message 1 of 7
(3,928 Views)

1. The FOR loop is not doing anything.  You can actually right-click on it and choose to "Remove FOR Loop".

2. You really should open the TDMS file before your loop and don't close it until after the loop.

3. Are you supplying a valid path?

 

My suspicion is that #2 will fix your error.  The reason being that you create the file on the first iteration and close it.  But on the second iteration, you are trying to create a file that already exists, giving you an error.


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 2 of 7
(3,911 Views)

Hey, thanks so much for your response. I tried everything you suggested and it seems to work, but I have somehow created a new problem. When I open the TDMS file it for some reason opens in excel, and only displays the number of data points taken... but no data. I've attached the file and my updated code.

Download All
0 Kudos
Message 3 of 7
(3,895 Views)

@astroLaura wrote:

When I open the TDMS file it for some reason opens in excel, and only displays the number of data points taken... but no data.


Look on the bottom of the Excel window.  There is a tab for your group.  That is where the data is displayed.

 

Also, you need to name your second channel for the TDMS Write.  You are currently not saving your second channel.


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
0 Kudos
Message 4 of 7
(3,888 Views)

I've named my second channel, and placed an indicator on the array to make sure it's producing an array of the correct size, which it is. Searched around on the web for a solution but it's still outputting only one channel when it should be recording two. Is there something obvious I'm missing?

 

Thanks

Download All
0 Kudos
Message 5 of 7
(3,880 Views)
Solution
Accepted by topic author astroLaura

I think it needs to be a 2-D array.  So just add a Build Array with only 1 input.  You may need to transpose the array (been too long to recall immediately).


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 6 of 7
(3,866 Views)

Omg, duh. I had to go the extra step and make a second build array to make it 2D. I was just being silly. Thanks for all your help!

0 Kudos
Message 7 of 7
(3,863 Views)