LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Labview to download a data file

I have a time-critical problem that I'm hoping some of the experts here can help me fix. In the file download_c.vi, I am trying to download a file from a remote computer over a serial port to my Labview control computer. The file works great when the file size is small(500-700KB). Anything over this, and I have to increase the bytes for the visa read to read, and then I lose data. Eventually the file that I will be downloading will be about 600MB. I know that the way the .vi is set up, this will never work for large files, and I throw myself on the mercy of the experts here in the forums for help.
Can anyone take a look at the file that I've attached and show me how i can make this work for large files, more efficiently, and without losing my data.

Advance thanks from a beginner that is getting slightly desperate.

JDM
0 Kudos
Message 1 of 6
(4,084 Views)
Well, my first question would be - do you have to use serial?
600 MB sounds like an awful lot for a serial connection.

Second, I have never done anything like this, and I'm not sure I understood why you're losing data and where it's being "vanishing". If you're asking the port for X bytes and the timeout is too short, you will lose your data. You might need to play with it.

But let's start with the first question I asked - does it have to be serial?

___________________
Try to take over the world!
0 Kudos
Message 2 of 6
(4,064 Views)
Sadly enough, it does.... the system i'm working with only has a serial interface available. My customer knows that it will take hours to transfer the data file, but that's not a problem for them.... It's strange. as my file size goes up, I have to keep increasing the bytes that my serial port reads at a time. my transfer rate doesn't ever change(115200), but i still have to increase the bytes read. I'm completely out of ideas, so i've turned for help...... I've been looking over the GigaLabview posts/kb's/examples, but just flat don't know how to implement it for my application........

Thanks for any help everyone.
0 Kudos
Message 3 of 6
(4,058 Views)
One thing I forgot to mention.....

I'm only losing one byte of data every 2MB or so.. there's no pattern as to the byte i'm losing, just a random byte every now and then......
0 Kudos
Message 4 of 6
(4,059 Views)
Can the remote computer insert a checksum or other error checking code about every MB or so? RS-232 serial does not have any built-in error checking beyond the optional parity bit per byte. So to insure data integrity you will need to do something at a higher level. If you can insert an encoder between the source (file) and the serial link at the remote transmitter, look at some of the turbo codes. They have low computational overhead and good error recovery capabilities.

Lynn
0 Kudos
Message 5 of 6
(4,038 Views)
turbo codes?
0 Kudos
Message 6 of 6
(4,036 Views)