Write to Flash Drive on the RoboRio

Has anyone here developed a method to write to the flash drive through LabVIEW to the RoboRio flash drive?

Plug in a flash drive and open up the Rio web based configuration. Then in the file browser find what the flash drive directory is called. Ours was “/u”.

Once you know what the directory is called you can use the File I/O VI’s in the Programming section on the Function pallet.

An example file path would be: /u/auto_programs/Program-1.txt

/u is the flash drive
/auto_programs would be a user created folder in this case
/Program-1.txt would be a text file you are saving data to

Thank you for that information. It is an interesting way to think about what we could do.

I was actually thinking about writing tot he RoboRio drive. Has anyone done that through LabVIEW?

Same thing just start with the main directory of the Rio instead of the flash drive directory.

What are you using to do this? I tried the create file and it tells me that it does not exists. Are you using a standard LabVIEW function to do this?

Any chance you have example code. A picture would do.

See the attached example.





See “File IO” at http://wpilib.screenstepslive.com/s/4485/m/13811/l/292165-labview-porting-guide-2014-to-2015

You may need to use the base path /home/lvuser to write files to the roboRIO. Also, remember to use the Create Folder function BEFORE the Create File function if you are not sure that the folder has been created yet.

The File I/O functions are in the Programming\File I/O palette and the Create Folder function is in the Programming\File I/O\Advanced File Functions palette.

You can read and write to a simple text file or to your own binary file (as long as you keep track of the LabVIEW Data Type that the file uses). There is a subPalette that contains VIs for making .ini configuration files (caution: the configuration file is not actually saved until it is closed). Also, if you want to save a cluster of data in a human readable format, you can use the Flatten JSON or XML functions in the Programming\String\Flatten/Unflatten String palette.

Hey thanks Jonathan. That was helpful info.