05-06-2013 07:50 AM
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.
05-06-2013 07:57 AM
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.
05-06-2013 08:13 AM
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.
05-06-2013 08:22 AM
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.
05-06-2013 08:49 AM
Did as u said, no errors !! 😞
05-06-2013 09:37 AM
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.
05-06-2013 10:16 AM
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!!
05-06-2013 10:26 AM
@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.
05-07-2013 03:00 AM
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?
05-07-2013 07:22 AM
@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.