Help with FTPing files to the cRIO

Hey guys,

My team wants to create an ambiguous autonomous that we can use on almost any robot if our auton fails. We planned on doing this by FTPing tab-delimited text files that describe vectors to drive along to a specific folder on the cRIO using filezilla and then retrieving them using a file path constant in labview.

We tested this by putting a file named “autontest1.txt” into the /ni-rt/startup directory, making our file path in labview “/ni-rt/startup/autontest1.txt” but when we run our code, labview throws error 1430 “The path is empty or relative. You must use an absolute path”

I’ve already done a lot of research on how the file paths work on the cRIO (it’s linux) and how to fix error 1430 on various platforms, but to no avail.

Thanks ahead of time!!
John :smiley:

No, it is VxWorks.

I’ve successfully been able to read stuff (C++ at least) thats on the root. I have’t tried putting it in folders though.

Assuming that you’re able to view the file tree in filezilla, could it be a permissions issue? You might also want to check out the ant scripts that get run when Netbeans deploys the code. I remember poking around in them last year and seeing some ftp commands.

when calling it in code, its

/c/foldername/filename.ext

idk why the c is important

From what I remember from trying something similar in 2009, the best place to put the files, oddly enough, is in the “temp” folder. They do not get deleted.

Hope that helps.

Thanks for the info, byteit!! I will try using VxWorks tonight at robots.

GGCO - I don’t think it’s a permissions issue, I don’t have any type of security on the cRIO and filezilla does not have any security issues. I am using labview, not netbeans (I wish we could use java, tho)

Zingerman - I will try it in the temp, too.

Thanks all!! I will keep you posted on how things go :slight_smile:

You don’t say how the path is built. LV contains a path datatype, but often newcomers will use a string instead, or will put in their own delimiters. Because LV is a cross-platform language, the path you will enter uses the local delimeters and they will automatically be mapped between unix, windows, and mac.

You may want to open up a path or file I/O example to see how it is often done.

Greg McKaskle

I resolved the problem after reading an article on the NI website about file io in VxWorks controllers. I was using the path datatype, but it wasn’t working for me, and the article said that if you type cast a string to a file data type and use “/c/” as the root directory, things will work out, and, well, they did!

Because I was not aware of the way that labview automatically delimits the path datatype, I have been misusing it. thanks for the info, Greg!!

Thanks all,
John