LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Large File Serial Transfer

I am trying to transfer a large data file using labviews serial_file_transfer vi. The .vi works great for small text and other files, but when I try to transfer a larger binary file(or any other type of file) I get a VISA write time out. No matter what I set my timeout to be, it still happens. Can anyone help with suggestions, etc?

jimmy
0 Kudos
Message 1 of 12
(4,422 Views)
Hi Jimmy,

Have you tried breaking the file into smaller segments and monitor the serial port buffer to trigger the sending of the next segment?

You can also be creative and by knowing the file size and the number of segments, you can use a progress bar to show how much of the file is transferred. You can also become fancier by adding a throttle feature to adapt the file transfer based on the target's ability to receive the data. ... oops... I think i got carried away... 😉

Try breaking the file into smaller segments and place a small delay between each segment.

😄
Message 2 of 12
(4,403 Views)
Are you talking about VISA Write From File? I can't find a VI called serial_file_transfer. I had a similar problem with Write From File. I solved it by first reading the file and then using the regular VISA Write. I'm not sure what the issue with Write From File is.
0 Kudos
Message 3 of 12
(4,396 Views)
Right now, i'm using this .vi to test out the visa read/write. i'm using a loopback connector connected to my serial port so I can send and recieve from the same port. whenever i send a file, if it's a text file under about 10kb, it works, but any other file, i get a timeout on the visa write and only an empty file recieved. I've tried increasing the timeout, but get only a timeout later on.....any help would be greatly appreciated. I'm getting a little on the desperate side to get this working......


JImmy
0 Kudos
Message 4 of 12
(4,387 Views)
I agree with Dennis.

I've never sent data directly from the file. I've always read it first.
Try that first...

Questions:
Will the target provide any handshaking messages such as "Rx-ok", "Ready", etc?
In the loopback, you can look at the receive buffer and not continue to transmit until it is empty (or purged). Basically simulate handshake messages.

What is the file? Is it one large message (data) or is it a series of instructions? In other words, is it something you could break up in 1kb blocks and send one after the other with a small delay between blocks.
This is not the best approach, mind you, but I can't see why you would have problems transferring an approx. 10kb file.

JLV
Message 5 of 12
(4,372 Views)
*** sorry, I could not look at your vi..
*** LV is not installed on my work PC..
Message 6 of 12
(4,371 Views)
I don't have a loopback handy so I can't test your VI. I'm using the exact same technique for writing a 1.4 MB file to a device. I use a 300 second timeout and that works just fine. You have only a 10 second timeout. Changing the timeout on the VISA Open does not effect the I/O timeout.
Message 7 of 12
(4,364 Views)
Is "VISA Set I/O Buffer Size" related to the problem you're trying to solve? I've been working with this VI to be able to transfer large serial files. I guess you would get a transfer size error instead of a timeout error if this was your problem...
0 Kudos
Message 8 of 12
(4,339 Views)
I tried your VI with a loopback connector, it works fine with a long timeout(over 200 seconds). I'd break up the file into smaller pieces to save time.
Message 9 of 12
(4,310 Views)
The data files that I'm recieving will be 500-750MB, so spliting wouldn't really be an option. I'm recieving the files from a dos-based system that just writes the data out to a serial card.
0 Kudos
Message 10 of 12
(4,300 Views)