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.

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

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!

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

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. :ahh:

Much thanks,
-Neil.

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).

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.

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

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/showthread.php?t=70880

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.

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