Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot overwrite File IO in cRIO 9023

I'm using CompactRIO 9023 to log data during the operation. I'm writing the data to cRIO's drive and it works OK when the file is created the first time and the file name is brand new. However, I cannot append to or overwrite the file when I try to access it after the first time. Even deleting the file doesn't seem to always fix this problem; sometimes, after deleting the file, the new contents appear while, other times, the old data comes up.

 

I am accessing cRIO's data using Windows Explorer and am refreshing the page (just in case any refreshing is needed) before I copy the file to my desktop for viewing. I have also tried to close the explorer and navigating to the file's location on cRIO again to no avail. Just in case anyone's wondering, I have double-checked that the file is deleted before I run the script again by refreshing the page, but the results didn't change.

 

When I execute the code in LabVIEW, it appears that LabVIEW can read the updated data that was meant to be copied into the new file based on what I can see under "Read Text" section. However, when I open the file, the same old data shows up.

 

What I have noticed during my experimentation is that on the first write (when the file is created is used for the first time with a completely new name), I can write to the file to my heart's content. If I try to append to or rewrite the file, a subsection of the previously written data would appear, at best.

 

Please see the attached VI. The code is a modified example with which I was trying to see data appended to the file each time I execute it. It was working fine on PC until I added cRIO9023 target and it stopped appending to the file on both PC and cRIO. PC file updates fine, however.

 

What am I missing? Is cRIO-9023 unable to do what I want?

0 Kudos
Message 1 of 2
(1,019 Views)

Hi,

 

Could this article be of any help?

 

Why Do I See Old Data When I FTP to My File on a Real-Time Target?

 

Let me know if this is what you wanted to do.

0 Kudos
Message 2 of 2
(899 Views)