LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

File I/O Not Working on cRIO

I've been working on a cRIO based DAQ system, and suddenly one day all my file I/O either comes up with an error or runs fine but does not output a file. I've tried with read, write, and most of the built-in I/O functions.

I put together some dummy code, and stuck identical versions under either 'My Computer' or under the 'cRIO' in the project explorer. The former works, the latter doesn't.

 

Details below, thanks for any help!
Elizabeth

 

  • Hardware: RT CompactRIO 9074
  • Software: LabView v11
  • I'm using absolute paths (i.e. C:\folder\file.txt) 
  • The cRIO is connected, and can send/receive data and commands just fine (i.e. the rest of the code executes properly)
  • The file I/O on the cRIO had worked fine up until yesterday, but I/O still won't work even in different VIs and different projects
  • Resetting the cRIO doesn't help, nor does rebooting the computer/restarting LabView.
  • The error is in the Open/Create/Replace File function- Error 7 file cannot be found (even if it exists, or if the function is set to create new file)
  • Screen capture attached- Untitled 3.vi (filed under 'My Computer') outputs the file just fine. Untitled 4.vi (filed under the cRIO) does nothing.

 

 

0 Kudos
Message 1 of 3
(2,729 Views)

Hi ecb,

 

that's the most common error of users new to cRIO...

 

You use the same path on the PC and on the cRIO to write a file. But:

- the cRIO has it's own file system and it's own directory structure. You cannot copy the path...

- the cRIO has NO access to the PC's harddrive. You/the cRIO CANNOT write a file on the PC's harddrive!

 

The cRIO is a "target" in the project explorer. Can you think of all the implications that come by using a different "target"?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 3
(2,722 Views)

To add to Gerd's comments.  Think of the cRIO as a computer (since it really is one).  Now my computer can't access your harddrive.  So why should the cRIO be able to access another computer's harddrive?  The cRIOs are their own entity.  They were designed to run without being connected to another computer.  It has been awhile since I played with one, but they do have their own directory structure.  You should save to the FTP location so that you can get to the files on you computer using FTP.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 3
(2,714 Views)