Go to Post P.S. we are a rookie team.P.P.S. we really don't know what we are doing - Carter12s [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 03-02-2011, 21:23
Dfontana Dfontana is offline
Registered User
AKA: David Fontana
FRC #3039 (Wildcat Robotics, Team Predator)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Destrehan, LA
Posts: 9
Dfontana is an unknown quantity at this point
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.
__________________
FIRST Team 3039 - Wildcat Robotics, Team Predator - Destrehan, LA.
Reply With Quote
  #2   Spotlight this post!  
Unread 04-02-2011, 12:22
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Autonomous Recording

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:\tmp, and the file I/O should work. The extension has no effect, and .txt should work fine.

Greg McKaskle
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:12.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi