06-06-2015 04:22 AM
Hello. Im using LabVIEW 2013 for myRIO on Windows 7. Im trying to perform a simulation for sensor readings from 0-5 and then log the data. Ive used the random number generator to obtain readings. So my code runs fine (almost), Ive used Notifiers to stop multiple loops with one Stop button. I've put timers too. Im using TDMS files to log the data. Ive opened one common TDMS file in which i want to log 4 different groups of readings. Im getting the "-2501" error, "Invalid File Reference" .. How do i get rid of it ? My VI is attached below.
Thanks in advance 🙂
Solved! Go to Solution.
06-07-2015 10:37 PM
Hi,
In your attachment VI, you wired 1 "TDMS Open" with 4 "TDMS Close". If any of "TDMS Close" was executed, the other 3 reference became invalid. That's why you meet error -2501 and it is expected behavior.
Actually, 1 "TDMS Open" should only be wired to 1 "TDMS Close" and make sure "TDMS Close" is invoked after all the TDMS operation. You could put it in a "Flat Sequence Structure" to solve the problem. I've modified your VI in the attachment.
Thanks.
06-08-2015 01:26 AM
Thank You so much !! 🙂
12-16-2015 09:43 AM
I would avoid Flat Sequence Structures unless absolutely necessary, and this is not the case.
08-30-2016 10:35 AM
I know this is an old thread, but I just came up with another cause for this error and I wanted to leave a record for someone else who might encounter it. Running LabVIEW 2016 RT with a cDAQ-9133 (Linux OS) this error can occur if the file you are trying to access already exists, but is corrupted in someway.
The "fix" is to try saving to a different file.
Mike...