LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS write error

Hello All,

 

I need to export certain measurement values from LabView into Excel and for this am using TDMS. I have the Excel Plug-In installed on the desktop.
However, when I run the program, nothing happens in the TDMS file. The file Sensorwerte.tdms is created but has no groups or channels with it, so no measurement values.

I tried everything possible but with no luck. Is there something that I am missing?? The data values are coming from a queue. I tried doing with local variables as well, but no luck.

 

Attached the pic of the way I am writing into TDMS file.

0 Kudos
Message 1 of 10
(3,051 Views)

First of all, what is the local variable for?  You have some other logic there that doesn't make any sense, but I also don't get so see the rest of your program.

 

Are you getting an error from the queue?  That seems to be the only obvious possibility I see.  Also, make sure you pass your TDMS file reference through the Error case.


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

Hello Crossrulz,

 

It not a mentioned error. The program runs fine and even after I stop the program, no errors show up.
But when I go to the '.tdms' file and view it in Excel, it is absolutely blank: No grps, no channels (though I have 4 channels).
What I tried was taking the four variables (Kraftstoffvordruck, Schmieröl, Raildruck and Drehmoment) as local variables from another part of the program and passed them to the TDMS Write after merging them as an array.

 

have attached the enqueuing which I do. Am sorry but cannot give the entire program.

Download All
0 Kudos
Message 3 of 10
(3,042 Views)

Put a probe on the Dequeue Element's error output.  Make sure an error is not coming out of there.  Even with Auto Handle Errors, the error will not "pop up" since you technically are handling the 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
0 Kudos
Message 4 of 10
(3,036 Views)

Did as u said, no errors !! 😞

0 Kudos
Message 5 of 10
(3,025 Views)

What about the error coming from the tdms write ?

 

Try to probe the error wire out of TDMS Write, and also your 2-D array of data.

 

My best guess is that you need to rotate the 2D array.

0 Kudos
Message 6 of 10
(3,021 Views)

Hello,

 

Ok I have solved the problem after a little bit of playing around doing different stuffs.
I just put the TDMS file write within my 'measurement while loop' and not as a seperate while loop. i.e I did not collect in queues and send it to a different while loop as earlier. It works perfectly now. 🙂

Now my next problem is that everytime I run the VI again after stopping it, the TDMS file gets overwritten. Looking through other discussions to see if this is solved. But any inputs from your side will be helpful.

Thanks for your help!!

0 Kudos
Message 7 of 10
(3,012 Views)

@pr2189 wrote:

Hello,

 

Ok I have solved the problem after a little bit of playing around doing different stuffs.
I just put the TDMS file write within my 'measurement while loop' and not as a seperate while loop. i.e I did not collect in queues and send it to a different while loop as earlier. It works perfectly now. 🙂

Now my next problem is that everytime I run the VI again after stopping it, the TDMS file gets overwritten. Looking through other discussions to see if this is solved. But any inputs from your side will be helpful.

Thanks for your help!!


That sounds like there was a problem with the queue then.

 

What do you want to happen with the TDMS file with each execution?  Append?  Create a new file?  Right now, you have the file option set to "Create or Replace", so of course your file is being overwritten.


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 8 of 10
(3,008 Views)

Yes looks like...but tnx for the suggestions. Guess it helped me to think to get rid of the queue and do it directly 🙂

I am trying to create a new file for every run. For eg: Sensorwerte-1; Sensorwerte-2 and so on, so that I have the earlier measurements also in another '.tdms' file.
Will create do the trick? or does this only append?

0 Kudos
Message 9 of 10
(2,989 Views)

@pr2189 wrote:

Yes looks like...but tnx for the suggestions. Guess it helped me to think to get rid of the queue and do it directly 🙂

I am trying to create a new file for every run. For eg: Sensorwerte-1; Sensorwerte-2 and so on, so that I have the earlier measurements also in another '.tdms' file.
Will create do the trick? or does this only append?


You need to use Create.  But if you try to create a file that is already there, you will get an error.  You need to add in code to append something to the file name for each run.  A date/time string is a common suffix.


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 10 of 10
(2,981 Views)