11-27-2014 11:21 PM
Hi,
I'm using a CompactRIO and writing to a text file underneath the C drive.
I'm running into an unexpected situation when I am trying to error check my file handling. I assumed that if the underlying file being written to that was created by open/create/replace vi and written to with the "Write to Text File" vi, would return an error if I delete the file from underneath it in the file system., yet there is no reported error and the function carrys on seemingly successfully writing to a file that has been deleted.
Anyone know why this happens and how to potentiallly remedy?
11-28-2014 02:29 AM
How you will delete file when your reference is live?
11-28-2014 05:02 AM
Ouch, this obviously isn't ideal but is probably down to the filesystem on the CompactRIO.
I would consider putting in a check - doing something like getting the file position from the file might return an error if the file no longer exists.
12-11-2014 10:58 AM
Thanks for the idea. I'll try that and let you know how it goes.