LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reading data files saved using FTP Append

Actually,

 

As a Zipped file it is REALLY SMALL!!!

 

16MB down to 19KB - That is pretty impressive.

 

Here it is

0 Kudos
Message 11 of 14
(672 Views)

Hi Dom,

 

I've had a look at your FTP stream file read code and the issue appears to be with the datatype being fed to the Read binary file vi. LabVIEW treats strings as a 32 bit integer datum followed by the string data itself. The 32 bit integer states the length of the string which will follow it and LabVIEW then reads that many elements. This is demonstrated by this article with a couple of examples. 

 

If you wish to read the data back as 8 bit words, this can be achieved by wiring a U8 integer to the data type of the Read binary file vi. You can also programatically determine the number of 8 bit elements in the file by performing a division on the file length by 8 and feeding the quotient into the count input.

 

Let me know if this helps you out.

 

Kind Regards,

0 Kudos
Message 12 of 14
(648 Views)

Hi Paul,

 

I'll try and have a look at this solution tomorrow.

 

Dom

0 Kudos
Message 13 of 14
(644 Views)

Hi Dominic,

 

You just copy constant at input of Initialize array(0 is not good-it can came out right when something else wouldnt) and connect it to data type terminal of Read from binary file vi. Of course you must wire -1 to channel count.

You can write cluster of arrays of truly anything, create constant from vire at data terminal on Write to binary file vi an connect it to data type at reading side.

 

 

 

Reader.jpg

 

Damir Krevelj

0 Kudos
Message 14 of 14
(623 Views)