View Single Post
  #7   Spotlight this post!  
Unread 15-02-2009, 03:35
anyheck anyheck is offline
Registered User
FRC #2242 (Cougars)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2009
Location: New Orleans
Posts: 26
anyheck is on a distinguished road
Re: Saving files on the cRio

I have a related question and rather that start a new discussion, I'll ask it here:

The idea is to log driver inputs for a 15s duration that will be played back during autonomous to let the team come up with some pre-loaded programs to run depending on their initial position.

Theoretically, the path that they record would be the path auto-driven if there aren't collisions as it would replicate the driver's inputs in approximately the same time resolution.

We haven't had time to get the camera running, nor any of the playing surface to practice on, so this was my idea to make something simpler to create than reading sensor values and whatever on their practice day before the competition.

I've saved a file to the cRIO using logging as /data_log/test.dat

using the 'Picture_Write.png' code pictured.

Then I try to load the file back in (stored on the cRIO ) using the 'Picture_Read.png' code pictured, but I get an error:

Error 1430 occurred at Open/Create/Replace Datalog in Autonomous Independent.vi

Possible reason(s):

LabVIEW: The path is empty or relative. You must use an absolute path.

/data_log/test.dat


so the same path works in write, but not in read.

I've run this in a stand-alone vi and it seems to work fine. The values seem fine 'replaying' the files on a PC indicating that it actually logged OK.

All I need is to know how to correctly reference the files to create the 'absolute path' when in playback mode.

Thanks for the help.

Regards,
Sten
Attached Thumbnails
Click image for larger version

Name:	Picture_Write.png
Views:	119
Size:	26.3 KB
ID:	7453  Click image for larger version

Name:	Picture_Read.png
Views:	136
Size:	15.1 KB
ID:	7454  
Reply With Quote