Go to Post When teams work together to design things rather than going it alone, you can really come up with magnificent machines. - JesseK [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 09-08-2009, 20:59
VEI Dude's Avatar
VEI Dude VEI Dude is offline
Mentor 4024, 4013
AKA: Neil the Real Deal
FRC #4013 (Jokers & Clockwork Mania)
Team Role: Mentor
 
Join Date: Sep 2008
Rookie Year: 2008
Location: Orlando, FL
Posts: 54
VEI Dude has a spectacular aura aboutVEI Dude has a spectacular aura about
Help saving current code

Hi,

I'm new to all the software/controls, but our current programmer is out of town and I want to start writing some code. Before I do that do, I want to use save/backup the code that is currently on the cRio, and be able to put it back. That is in LabView, btw. Assistance or pointers to docs/links on how to do this much appreciated.

FWIW, I intend to program in WindRiver C/C++, so I haven't installed any LabView stuff. Do I need to install any of that for saving/backing up the LabView code, or is there some code flash/retrieval tool that would to that?

Thanks,
-Neil.
  #2   Spotlight this post!  
Unread 09-08-2009, 21:05
biojae's Avatar
biojae biojae is offline
Likes Omni drives :)
AKA: Justin Stocking
FTC #5011 (BOT SQUAD) && FTC#72(Garage bots)&& FRC#0399 (Eagle Robotics)
Team Role: College Student
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Lancaster
Posts: 276
biojae is a jewel in the roughbiojae is a jewel in the roughbiojae is a jewel in the rough
Re: Help saving current code

if you are working with the same laptop, and have the project, you dont have anything to worry about.
but you can FTP into the crio from explorer, then you can copy all of the .vis to your desktop.
once you have all of the files backed up, you can safely develop in C
__________________
FTC Team 72 - No site
FRC Team 399 - http://www.team399.org
2010 Rockwell Collins Innovation in Control Award - (Use of the CAN bus, among other reasons) Phoenix, Arizona!
  #3   Spotlight this post!  
Unread 09-08-2009, 21:16
VEI Dude's Avatar
VEI Dude VEI Dude is offline
Mentor 4024, 4013
AKA: Neil the Real Deal
FRC #4013 (Jokers & Clockwork Mania)
Team Role: Mentor
 
Join Date: Sep 2008
Rookie Year: 2008
Location: Orlando, FL
Posts: 54
VEI Dude has a spectacular aura aboutVEI Dude has a spectacular aura about
Re: Help saving current code

Therein lies the problem -- I have none of the original software/code/files/docs/anything -- just the control system I pulled off the robot.

So let's say I FTP all the VI's, use some Windriver/C++ code on the cRio, then say I want to restore the original code, do I just copy the VI's back? Or will the be something else I need to install on the cRio first? I guess what I'm asking here is if the cRio understands VI's directly, or if there's some interpreter I need to put on to go back to the using the original LabView code.

BTW, can you tell me where to look for the ftp info? Or is it as simple as 192.168.0.1 and anonymous login, etc? Thanks!
  #4   Spotlight this post!  
Unread 09-08-2009, 21:28
biojae's Avatar
biojae biojae is offline
Likes Omni drives :)
AKA: Justin Stocking
FTC #5011 (BOT SQUAD) && FTC#72(Garage bots)&& FRC#0399 (Eagle Robotics)
Team Role: College Student
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Lancaster
Posts: 276
biojae is a jewel in the roughbiojae is a jewel in the roughbiojae is a jewel in the rough
Re: Help saving current code

no, you dont have to install labview to get them off, the vis are just on the crio in one of the folders (not sure as i dont have access to crio right now)
the ftp ip is almost the same as the one you enter into your computer,
10.team.num.2
i am not sure how labview puts the program onto the robot, so installing labview may be necessary to put the program back on the CRIO
__________________
FTC Team 72 - No site
FRC Team 399 - http://www.team399.org
2010 Rockwell Collins Innovation in Control Award - (Use of the CAN bus, among other reasons) Phoenix, Arizona!
  #5   Spotlight this post!  
Unread 09-08-2009, 22:14
VEI Dude's Avatar
VEI Dude VEI Dude is offline
Mentor 4024, 4013
AKA: Neil the Real Deal
FRC #4013 (Jokers & Clockwork Mania)
Team Role: Mentor
 
Join Date: Sep 2008
Rookie Year: 2008
Location: Orlando, FL
Posts: 54
VEI Dude has a spectacular aura aboutVEI Dude has a spectacular aura about
Re: Help saving current code

Gotcha. I also just found some blurbs on this in some of the install/setup docs, so I guess I'll go do some reading.

Much thanks,
-Neil.
  #6   Spotlight this post!  
Unread 09-08-2009, 22:53
ATannahill ATannahill is offline
Registered User
AKA: Alex Tannahill
no team
 
Join Date: Feb 2008
Rookie Year: 2008
Location: Southfield, Michigan
Posts: 3,259
ATannahill has a reputation beyond reputeATannahill has a reputation beyond reputeATannahill has a reputation beyond reputeATannahill has a reputation beyond reputeATannahill has a reputation beyond reputeATannahill has a reputation beyond reputeATannahill has a reputation beyond reputeATannahill has a reputation beyond reputeATannahill has a reputation beyond reputeATannahill has a reputation beyond reputeATannahill has a reputation beyond repute
Re: Help saving current code

The address is 10.18.89.2, you need to build before you can load the code, that requires labview(as far as my knowledge extends).
__________________

- Arizona North
  #7   Spotlight this post!  
Unread 10-08-2009, 01:27
VEI Dude's Avatar
VEI Dude VEI Dude is offline
Mentor 4024, 4013
AKA: Neil the Real Deal
FRC #4013 (Jokers & Clockwork Mania)
Team Role: Mentor
 
Join Date: Sep 2008
Rookie Year: 2008
Location: Orlando, FL
Posts: 54
VEI Dude has a spectacular aura aboutVEI Dude has a spectacular aura about
Re: Help saving current code

Thanks. Yes, I've been reading the docs, and seems I may need to install LabView to get the imaging tool. Still not clear on what parts of the system image contains, or if Windriver will overwrite that image, but getting the imaging tool and latest image can't hurt. Gotta go beg/borrow a copy.

I'm going to test this (hopefully) tomorrow, as I'm charging a battery now, and need to get an ethernet cable from the office. From what I've read so far, I don't need a crossover cable, and I can plug into either port on the cRio. I haven't seen anything re: userid/pass for the cRio, so I'm assuming there's none.
  #8   Spotlight this post!  
Unread 10-08-2009, 08:42
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,756
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: Help saving current code

I believe the imaging tool is installed with either development tool. In LV it is exposed in the Tools menu, and I assume in WR in the Start menu. The imaging tool goes through a sequence of setting IPs of the computer and cRIO and ftp-ing files down. The files include drivers to allow peek and poke and other modifications, drivers for configuring the backplane and flashing the FPGA. It includes the runtime libraries for LV, for vision, for the OS itself. It includes the bitfile of the FPGA.

You will not need a crossover cable as long as the PC has an auto-sense port, most do. You will probably want to plug into port 1 on the cRIO. The ports will be on different subnets with different IP addresses, so as long as the computer matches, it would work, but for adding the camera or getting used to the routine, use one.

As for how LV works, the files on the cRIO are PPC code attached to some other pieces of the VI. If you were to ftp Intel files to the cRIO, they wouldn't run. If you upload them to the PC, they may or may not open, it depends on if elements such as the panel or diagram were stripped during the build. A VI is a collection of elements such as panel, diagram, description and settings, and executable code. What you can do with a VI depends on what the author left in it.

Greg McKaskle
  #9   Spotlight this post!  
Unread 10-08-2009, 12:09
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,602
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Help saving current code

Now's a great chance to set some ground rules for what to do with code in the future to keep this from happening again. Even if you can recover the compiled code, that won't help you if you need to tweak something later.

The most robust option is to use a source control program such as subversion to keep track of the code and versions. You can read a lot about it and other source control programs in the following thread: http://www.chiefdelphi.com/forums/sh...ad.php?t=70880
  #10   Spotlight this post!  
Unread 12-08-2009, 13:03
VEI Dude's Avatar
VEI Dude VEI Dude is offline
Mentor 4024, 4013
AKA: Neil the Real Deal
FRC #4013 (Jokers & Clockwork Mania)
Team Role: Mentor
 
Join Date: Sep 2008
Rookie Year: 2008
Location: Orlando, FL
Posts: 54
VEI Dude has a spectacular aura aboutVEI Dude has a spectacular aura about
Re: Help saving current code

Okay, I was able to do this -- FTP'ed into the cRio and copied *everything*, retaining the directory structure. I didn't see an imaging tool under WindRiver, but I did install LV and see it there. At this point, I'll assume I have all I need to recover these files if necessary.

What's complicated this whole process is that my regular setup is Win2K/Linux dual-boot, so for this robotics stuff, I got a new HD, installed WinXP on that, and then WR and LV there. Since I'm always working, it's been tough to get time to swap out the HD to do any work on the cRio stuff. But I'm getting there. And another complication is that I'm out of the country every other week now.

Joe, I'm very good about keeping backups and code revisions, but this situation has been caused by other issues (internal mess with our club that I will not discuss on this forum), so I've taken over the software and trying to deal with what I've got. I don't plan to modify the LV code, but start fresh with WR (I'm more familiar with C/C++ and prefer non-visual programming environments).

Much thanks everyone! The ball's in my court now to get some time to read through the docs and get some code developed.

Cheers,
-Neil.
  #11   Spotlight this post!  
Unread 12-08-2009, 13:17
AustinSchuh AustinSchuh is offline
Registered User
FRC #0971 (Spartan Robotics) #254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 1999
Location: Los Altos, CA
Posts: 803
AustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond repute
Re: Help saving current code

Quote:
Originally Posted by VEI Dude View Post
What's complicated this whole process is that my regular setup is Win2K/Linux dual-boot, so for this robotics stuff, I got a new HD, installed WinXP on that, and then WR and LV there.
FYI, the compiler suite runs just fine under Linux. When I did it, I installed WindRiver under XP, and learned how it worked. I highly recommend learning how the basics work under XP first. I then figured out that I could go get a trial version of the linux version of WindRiver, and install that. I then copied over my XP key for WindRiver to the correct place under Linux, and also one or two of the config files that it complained it couldn't find (the cRio isn't a standard target). Some other hacking might be required. 971 wrote the code for the robot this year entirely from under Linux and compiled and downloaded using Makefiles.

If you have any questions, feel free to email me. (my last name) @berkeley.edu

Austin Schuh
Closed Thread


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
Help||Saving data to Flash memory & Encoder Nimrod Beker Programming 5 11-02-2009 09:27
LABVIEW CODES NOT SAVING!!!!!!! PLEASE HELP!!!!!!!!!!!! GrammarNazi Programming 3 06-02-2009 14:26
problems saving code GrammarNazi Programming 1 06-02-2009 09:58
Current Clamping Code and Hardware Bochek Electrical 6 14-01-2008 07:48
Navigate.c Current Sense code=only one polarity Dale(294engr] General Forum 1 05-02-2004 16:25


All times are GMT -5. The time now is 13:14.

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