Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Help with FTPing files to the cRIO (http://www.chiefdelphi.com/forums/showthread.php?t=89339)

Birdlives 17-01-2011 11:27

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 :D

byteit101 17-01-2011 11:52

Re: Help with FTPing files to the cRIO
 
Quote:

Originally Posted by Birdlives (Post 1001889)
cRIO (it's linux)

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.

GGCO 17-01-2011 11:55

Re: Help with FTPing files to the cRIO
 
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.

Robototes2412 17-01-2011 16:02

Re: Help with FTPing files to the cRIO
 
when calling it in code, its
Code:

/c/foldername/filename.ext
idk why the c is important

Nadav Zingerman 17-01-2011 16:13

Re: Help with FTPing files to the cRIO
 
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.

Birdlives 17-01-2011 17:00

Re: Help with FTPing files to the cRIO
 
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 :)

Greg McKaskle 17-01-2011 19:16

Re: Help with FTPing files to the cRIO
 
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

Birdlives 17-01-2011 23:16

Re: Help with FTPing files to the cRIO
 
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


All times are GMT -5. The time now is 03:42.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi