04-24-2009 02:17 PM - edited 04-24-2009 02:17 PM
The problem is that the 'TDMS Close' function is generating the following error:
-------------------------------------------
Error -2501 Occured at TDMS Close in host pc.vi
Possible Reasons: Invalid TDMS file reference.
------------------------------------------
What is so odd about this, as you can see from the screen shot, is that many other functions use the file reference with no problem whatsoever but when it gets to the close function an error is thrown. I have probed out the error wire at every step and there is no error occuring before the close tdms file function.
Just to help you understand the function: A temporary tdms file is created and all the data from the raw data file is stored on it. A list is generated of all the valid channel names (channels named something other than " * ") and then these valid channels only are read from the temporary tdms file and written to the final output file. The files are so large the read and write functions need to be placed into for loops so that data is read/written one row/column at a time and the whole 90 mb file isnt being loaded into RAM.
Can anyone help me? I really need to figure out what is going on. Code examples would be helpful.
Solved! Go to Solution.
04-24-2009 02:23 PM - edited 04-24-2009 02:31 PM
Change all of the tunnels you use for the refnum in those For loops to Shift Registers.
If the For loop iterates "0" times the refnum goes invalid.
Ben
04-24-2009 02:27 PM
04-24-2009 02:34 PM
04-24-2009 02:36 PM
rex1030 wrote:
Darn you are quick. Ok let me test it.![]()
Just because I posted a link to your image and a reply 3 minutes before the image was posted?
Pass your error cluster through shift register as well since you could loose error info the same way.
have fun,
Ben
05-05-2009 04:32 AM
Hi Ben,
I'm having the same problem like this. Could you please make it clear how to solve this problem.
Thanks.
Firdaus
05-05-2009 05:56 AM
What about my previous reply did you not understand?
Ben
05-05-2009 06:06 AM
"Change all of the tunnels you use for the refnum in those For loops to Shift Registers."
I'm not understand with this statement.
Attach together is my VI. Thanks.
Firdaus
05-05-2009 07:31 AM - edited 05-05-2009 07:33 AM
Your case is different but related.
You are loosing your file ref because you are using the "Use default if un-wired" option on the output of your case structure.
1) Replace the output tunnel of teh while loop with a shift register
2) Wire through the refernce in all of the other cases.
Have fun!
Ben
05-05-2009 07:56 AM
Its work!
Thanks Ben.
Firdaus