LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS File Error

Solved!
Go to solution

Hey Guys,

 

I just started with LabVIEW. I need to acquire data from different temp. sensors and write them into a tdms file. I already read that i should not use express VI's to get a better understanding of LabVIEW. So i tried without.

 

Here is a Picture of my Code and the error that appears. I searched the internet but all the solutions for this code didn't apply for me.

 

Is somebody able to help?

 

Thank you and please dont destroy me, as is sad i'm new to this stuff 😉

 

Lucas

 

 

Download All
0 Kudos
Message 1 of 6
(584 Views)
Solution
Accepted by topic author FlyNI

Hi Fly,

 

what is the filepath you are using? Is it valid? (Folders do exist? You have access rights in the specified folder? …)

Why do you need to open and close the TDMS file with each iteration of your loop? Do it once before and after the loop!

And why do you need a local variable of the file path? Use more wire…

Best regards,
GerdW


using LV2020 on Win8.1+cRIO
0 Kudos
Message 2 of 6
(581 Views)

Hi Gerd,

 

my path is: C:\Users\Desktop\Test2 and yes it exists and i have Access. The file is also created cause i can see it on my Desktop afterwards.

 

To be honest i don't know. You meen i should open it, go into the loop, write inside, and close it after the loop?

Ok did all the things, Problem still exists.

 

Thank you

0 Kudos
Message 3 of 6
(576 Views)

Perhaps your should upload your entire project (preferably in a zip file containing the lvproj and all VIs and ctl files).  I see you are using nodes that point to you using a cRIO or myRIO, which will break the file IO as you have it defined.


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 4 of 6
(553 Views)
Solution
Accepted by topic author FlyNI

Look at your open file. It is inside the loop (you should open the file before starting and close it afterward) and it is set to create. Assuming the file is created in the first iteration of the loop it cannot be created on the second iteration (and if you're using the same filename from before and didn't delete the previous file it won't even run the first time).

 

On a side note, why are you converting your data to dynamic data? Just build an array.

0 Kudos
Message 5 of 6
(492 Views)

Hey,

 

thank you! Deleting the file that was created the first time, putting the open/close vi outside the loop and Setting the open tdms to create or replace solved my issue.

 

Thank you all

0 Kudos
Message 6 of 6
(458 Views)