LabVIEW Embedded

Showing results for 
Search instead for 
Did you mean: 

reading and writing datas in CRio memory space ?

Go to solution

Hello, everybody,

I am working with LabVIEW 2013 and CRio 9792. I have some questions with my CRio:

I know how to use Write to Spreadsheet File / Read from Spreadsheet File to write and read datas from a file in the disk C:\ of my computer. But if I want to write to a file in the CRio. what should I modify ? I noticed that we could not open the CRio memory space like a USB memory in "my computer". After writing to a file in the CRio, how could I get this data file out of the CRio? Any if I want that VI deployed in the CRio read a file in the CRio, how could I put this file in the CRio ?

In fact, I notice that my CRio has a USB memory port. I want to realize this fonction: I insert my USB memory to the CRio, and my VI deployed in the CRio can write and read with files in my USB memory. Is this realizable ? And could I still use Write to Spreadsheet File / Read from Spreadsheet File in changing only the file adress ?

Thank you very much !



0 Kudos
Message 1 of 5

Hi Chuan,

first if you want to write to c-RIO you have to deploy the writing functions whatever they are in YourProject--->c-RIO Target, means the VI of Read/Write functions should be in the c-RIO Target.

reading the files from c-RIO

You have to type in your Windows explorer ftp://<c-RIO Target IP-Address>

USB memory port function i have to check first, i am not sure how it works.

Hope it helps!



0 Kudos
Message 2 of 5

VxWorks supports FAT32. You can connect a FAT32 formated USB stick to your cRIO and use it to read/write data. The USB stick will be drive U on your real time system. The path usually looks like this: /u/<your directory name>/<your filename>

If you prefer to use the internal cRIO memory, it will be drive C, i.e./c/<your directory name>/<your filename>

You can still use FTP to transfer the data to another computer. I prefer a FTP client like FileZila instead of web browser.  I think there is also a possibility to initiate file transfer from MAX, but right now I don't have a real time target and cannot test it.

Message 3 of 5

The USB drive will appear as u:

If you want to ftp to it you need to use ftp://<c-RIO Target IP-Address>/u:

If you write to the u drive in your code and the USB drive is not present it will create a folder in the c: drive named "u".

I read a config file from a usb drive all the time and write log data to it.

In previous versions you needed to be careful with VXWorks targets and use of the forward versus backslash when building a path. I believe that is fixed in 2014.


Casey Lamers

Phoenix, LLC

CLA, LabVIEW Champion

Check Out the Software Engineering Processes, Architecture, and Design track at NIWeek. 2018 I guarantee you will learn things you can use daily! I will be presenting!

0 Kudos
Message 4 of 5

Hi Chuan,

You can still use the Read/Write to spreadsheet file VIs, just make sure they are not in your high-priority loop, but instead in a lower priority loop, as shown in this tutorial, because they are non-deterministic and can add jitter to that loop's timing.

You can use FTP to view/transfer files, but I would highly recommend WebDAV, because it's a secure protocol and also allows you to map the target like a network drive in Windows 'My Computer', as you asked above. Here's the how-to doc: Using WebDAV to transfer files to your RT Target

Hope this helps!


Deborah Burke
Senior LabVIEW Product Manager
Certified LabVIEW Architect
National Instruments
Message 5 of 5