01-13-2012 11:13 AM
Hi, I met some problem when I use shift register to store file reference, please refer to attachement.
I want to implent the function that every hour a new file would be create, and close the old file. but the close file.vi reported error message, said error source is can't close file. other parts in the diagarm works well.
Solved! Go to Solution.
01-13-2012 11:56 AM
Your not a refnum constant and the type on the SR are not the same. use the comparison "not a number/path/refnum" in place of the equal to
01-13-2012 12:07 PM
Are you testing this VI by itself or as a called subvi? LabVIEW will automatically close the file reference once the top level caller stops running, even if you don't close it in code. The ref info will remain in the shift register but it's no longer valid. This means it passes the not a ref test but Close File can't use it. I threw a loop around your code to keep it running(as if it were a subvi) and everything worked.