|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
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
|
|
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 |
|
#3
|
||||
|
||||
|
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
|
|
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 |
|
#5
|
||||
|
||||
|
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
|
||||
|
||||
|
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).
|
|
#7
|
||||
|
||||
|
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
|
|||
|
|||
|
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
|
||||||
|
||||||
|
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
|
||||
|
||||
|
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
|
|||
|
|||
|
Re: Help saving current code
Quote:
If you have any questions, feel free to email me. (my last name) @berkeley.edu Austin Schuh |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |