08-17-2011 09:52 AM
Hi All,
The code posted will write me a data file using FTP Append, which represents the data coming from a cRIO chassis.
However I do not seem to be able to write the code to pull the data back out of the saved files.
I have success in retrieving an isolated value (ie setting the count to 1 on the read binary file.vi), but as soon as I try to retrieve anything any bigger I have some serious issues. I have checked through the various different tutorials and I don't seem to be doing anything particularly wrong.
Any help would be good ta.
08-17-2011 03:22 PM
What exactly are you trying to accomplish? Are you using FTP to pass data around? If the data is relatvely low speed FTP will work but if you are trying to use it for data streaming it is not the way to go.
If you simply need to read data from the file that the cRIO is sending then you can use the File primitives to access and read the files. You will need to know the format of the data to interpret it correctly.
08-18-2011 03:22 AM - edited 08-18-2011 03:30 AM
Hi Mark,
There is a long long long saga this is related too, check my posts if you want to know more, this is just one of a number of solutions which I am trying.
I need to transfer 2 x 169KB data per second for a minimum of 10hours from a compact rio to a network accessible drive. The operating environment is such that a normal PC will not work / is not a compact enough solution hence the cRIO.
Ideally I would avoid writing to the cRIO hard drive as I believe they are solid state, and therefore have a finite life, I can replace the NAS drive (In this case an Addonics NAS USB port with a 16 GB memmory stick) as often as I want.
I have had it proven to me that the FTP stream is perfectly capable of transfering the data I need, however no matter what I try I cannot open the file to read it.
I have had a similar problem using another method, which is described here.
Cheers,
Dominic
08-18-2011 09:26 AM
Hi Dom,
Could you please provide some more details on how you are trying to retreve the data from the saved files and possibly provide the code you have created so far?
Thanks.
08-19-2011 03:54 AM
I've noticed a similar post has been made here - same problem, alternative methods explored. Please only post once for an issue so all progress towards a solution can be followed.
Thanks.
08-19-2011 04:12 AM - edited 08-19-2011 04:13 AM
Fair enough,
Although I thought hte problems were unique enough that they deserved a seperate thread.
I'll stick to this thread.
Dom
08-19-2011 04:17 AM
Here is the file read code I have been using.
Dom
08-19-2011 05:40 AM
OK thanks Dom.
I have a few things which you may consider trying in order to troubleshoot the issue.
In your FTP Strem File Read code, try setting the count input of the read binary file vi to -1 (read entire file) and see what the result is. It may be worth creating a new string indicator rather than an array for this.
Also I noticed you are performing a get file size function in parallel with the read binary vi. It is good practice to keep the flow of file reference and error cluster through these vi's sequentially in order to keep data flow and be sure of the execution order. In this case issues may occur if both vi's try to perform their functions concurrently.
Any chance you could send the file created by the FTP Stream vi so I could take a look?
Thanks.
08-19-2011 06:47 AM
I have tried setting it to -1, this is my default as I have a lot files with varying sizes, so I know that doesn't work.
I'll try putting everything in order and see if that changes anything.
The file is a 16MB file, it would probably be better if I emailed it to you, is your email of the standard NI variety?
Dom
08-19-2011 09:06 AM
OK Dom.
If you could send the file by FTP that would be best. Please upload it as a zip file to ftp://ftp.ni.com/incoming/ named 1054578.zip.
Thanks.