Go to Post More to the point, stop worrying about whether your "Atlanta bot" got screwed over or whatever. Worry about whether you've got an "Atlanta team." - RebelWithARobot [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 Rating: Thread Rating: 7 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 14-02-2009, 07:56
Bomberofdoom's Avatar
Bomberofdoom Bomberofdoom is offline
Biggest FIRST addict in Israel
AKA: Nir Levanon
FRC #2230 (Zcharia's Angels)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Israel
Posts: 471
Bomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond repute
Send a message via MSN to Bomberofdoom
Saving files on the cRio

How is that done?

Thanks,
__________________
TEAM 2230 ZECHARIA'S ANGELS

2009 Microsoft Israel FRC Regional Winners!
2009 Microsoft Israel FRC Regional Chairman's Award Winners!!!
---------------------------------
2008 Microsoft Israel FRC Regional semi-finalist.
2008 Microsoft Israel FRC Regional Delphi's "Driving Tommorow's Technology" Award winner.
2008 Robot Driver
---------------------------------
2007 GM/Technion Israel FRC Regional semi-Finalist.
2007 GM/Technion Israel FRC Regional Xerox Creativity Award winner.
2007 Robot Driver.
Reply With Quote
  #2   Spotlight this post!  
Unread 14-02-2009, 07:59
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,748
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: Saving files on the cRio

If you want to do it from the PC, the easiest is to ftp files to the cRIO.

If you want to programmatically produce files, use the file I/O palette functions. The one that looks like a blue floppy disk. You should be able to find examples using file I/O for text and binary files. And if you need more advanced stuff you can ask.

Greg McKaskle
Reply With Quote
  #3   Spotlight this post!  
Unread 14-02-2009, 08:04
Bomberofdoom's Avatar
Bomberofdoom Bomberofdoom is offline
Biggest FIRST addict in Israel
AKA: Nir Levanon
FRC #2230 (Zcharia's Angels)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Israel
Posts: 471
Bomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond repute
Send a message via MSN to Bomberofdoom
Re: Saving files on the cRio

Well, the more specific question is what is the address I need to save to? If it were to save files to the PC, I'd do: "c:\Program Files\..."

How does it work on the cRio?
__________________
TEAM 2230 ZECHARIA'S ANGELS

2009 Microsoft Israel FRC Regional Winners!
2009 Microsoft Israel FRC Regional Chairman's Award Winners!!!
---------------------------------
2008 Microsoft Israel FRC Regional semi-finalist.
2008 Microsoft Israel FRC Regional Delphi's "Driving Tommorow's Technology" Award winner.
2008 Robot Driver
---------------------------------
2007 GM/Technion Israel FRC Regional semi-Finalist.
2007 GM/Technion Israel FRC Regional Xerox Creativity Award winner.
2007 Robot Driver.
Reply With Quote
  #4   Spotlight this post!  
Unread 14-02-2009, 08:41
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,748
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: Saving files on the cRio

LV uses a path datatype that makes most paths work between platforms. On the PC you enter in a PC path, and that gets converted to a unix path for the cRIO. I think you can use c:\temp\.... Don't use strings with the whole path in it or all of it is up to you to get right.

The stuff that doesn't work for paths are the funny characters that different OSes doen't let you use, Windows has a lot of them.

Greg McKaskle
Reply With Quote
  #5   Spotlight this post!  
Unread 14-02-2009, 08:43
Bomberofdoom's Avatar
Bomberofdoom Bomberofdoom is offline
Biggest FIRST addict in Israel
AKA: Nir Levanon
FRC #2230 (Zcharia's Angels)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Israel
Posts: 471
Bomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond repute
Send a message via MSN to Bomberofdoom
Re: Saving files on the cRio

"c:\temp\..." = the address to save files on the cRio?
__________________
TEAM 2230 ZECHARIA'S ANGELS

2009 Microsoft Israel FRC Regional Winners!
2009 Microsoft Israel FRC Regional Chairman's Award Winners!!!
---------------------------------
2008 Microsoft Israel FRC Regional semi-finalist.
2008 Microsoft Israel FRC Regional Delphi's "Driving Tommorow's Technology" Award winner.
2008 Robot Driver
---------------------------------
2007 GM/Technion Israel FRC Regional semi-Finalist.
2007 GM/Technion Israel FRC Regional Xerox Creativity Award winner.
2007 Robot Driver.
Reply With Quote
  #6   Spotlight this post!  
Unread 14-02-2009, 19:33
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,748
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: Saving files on the cRio

Sorry for the big delay. There was a scrimmage today.

To your question, the best way to find out is to put in a probe. The original LV RT wasn't VXWorks based, but pharlap, and perhaps I am not remembering correctly. If that doesn't work, use the unix path. I don't have a cRIO near me.
Reply With Quote
  #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
  #8   Spotlight this post!  
Unread 15-02-2009, 10:23
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,748
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: Saving files on the cRio

My windows machine is being a dog. In trying to answer this question about how RT does paths I was clearly guessing, and to continue that. The error indicates that /foo/ is considered to be a relative path. I think that means that my initial guess was at least closer to the way that RT works, using c:\ to represent root.

The test I'd do is to drop the Temporary Directory path constant on the diagram of your Robot Main. Wire it to an indicator and run the program. The syntax it uses to display the result is what you should use. In fact, the temp directory is a good place to put your files anyway.

Please post the resulting syntax if you would.

Greg McKaskle
Reply With Quote
  #9   Spotlight this post!  
Unread 16-02-2009, 08:33
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

Quote:
Originally Posted by Greg McKaskle View Post
My windows machine is being a dog. In trying to answer this question about how RT does paths I was clearly guessing, and to continue that. The error indicates that /foo/ is considered to be a relative path. I think that means that my initial guess was at least closer to the way that RT works, using c:\ to represent root.

The test I'd do is to drop the Temporary Directory path constant on the diagram of your Robot Main. Wire it to an indicator and run the program. The syntax it uses to display the result is what you should use. In fact, the temp directory is a good place to put your files anyway.

Please post the resulting syntax if you would.

Greg McKaskle
Hey Greg,

That sounds like a reasonable plan. I'll try it out next time I get access to the cRIO.

I spent all yesterday letting the kids drive the wheels off of the thing in the cafeteria so I could tune the driver controls to their liking, but we're keeping all of the control electronics so we can put them on another 'bot chassis to try fun things like the vision control.

8 hours of driving on the tile seems to have really widened up the contact patch.

Regards,
Sten

P.S. For anyone who is using some of the smaller motors like window motors to do any substantial amount of work, and don't want them burning out while you run during long practice sessions, try zip-tying a length of stripped battery cable from the metal motor housing to an aluminum frame member. Works as a fast, simple heat sink.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
cRIO output files aoconnor Programming 2 09-02-2009 17:59
Converting step files to inventor files GMAdan Inventor 4 01-01-2007 20:09
CAD Help needed. Mech Desktop 6 files backwards to AutoCAD 14? (2d files) Elgin Clock Inventor 0 30-08-2004 23:06
Limited seat-saving at the competition? Rich Wong Rumor Mill 11 09-12-2002 09:41
not saving one of the preferences Joe Ross CD Forum Support 3 12-05-2002 13:02


All times are GMT -5. The time now is 08:32.

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