From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reading data files saved using FTP Append

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.

0 Kudos
Message 1 of 14
(3,335 Views)

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.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 14
(3,330 Views)

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

0 Kudos
Message 3 of 14
(3,322 Views)

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.

0 Kudos
Message 4 of 14
(3,306 Views)

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.

0 Kudos
Message 5 of 14
(3,288 Views)

Fair enough,

 

Although I thought hte problems were unique enough that they deserved a seperate thread.

 

I'll stick to this thread.

 

Dom

0 Kudos
Message 6 of 14
(3,283 Views)

Here is the file read code I have been using.

 

Dom

0 Kudos
Message 7 of 14
(3,278 Views)

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.

0 Kudos
Message 8 of 14
(3,267 Views)

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

0 Kudos
Message 9 of 14
(3,265 Views)

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.

0 Kudos
Message 10 of 14
(3,260 Views)