Autonomous Recording

So since our fabrication team has been a bit groggy the past couple of weeks, me and my fellow programmer have had some time to do some experimental (and hopefully useful) implementation.

One of our ideas, amongst many, was to create a VI capable of recording a practice Teleop session to be used as autonomous guidelines. For example, we are storing the joystick values for each iteration of Teleop, along with a gyro angle.

Currently, we are using some of Labview’s data storage VI’s (Write to spreadsheet, mainly) to store these values in a file. However, we are running into a couple of problems.

First, we cannot seem to get the file reference to work. We’ve tried multiple approaches, including one using Labview’s GetDefaultDataDirectory VI in combination with a file path concatenation in which we inserted supplementary strings of “Left.txt”, “Right.txt”, and “Gyro.txt”.

This approach spit out errors something to the effect of: File path invalid or file not created.

Note that we are using the WriteToSpreadsheet VI which should, as is documented, create the file if it was not found. This brings me to my next two questions…

  1. Is the .txt extension the right one to use for a Labview Spreadsheet?

  2. We are completely clueless as to the cRIO’s file system. For example, where can (should) we store these files. I would like for them to persist across deployments (i.e. not be erased when deploying a new build).

We are thankful for any help we can get. This is the first time we’ve really gotten stumped by a programming issue.

In order to do file I/O on the cRIO, use the path control and use DOS style C:\ paths. In reality, the path control parses the path on windows, stores it platform independent as a list of names, and reassembles it on vxWorks, mac or other computers. So, use something like c: mp, and the file I/O should work. The extension has no effect, and .txt should work fine.

Greg McKaskle