LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple FTP connections

I'm using Labview 8.2 with Internet toolkit. I'd like to connect to multiple FTP sites, and download files from all sites simultaneously. I would simply use parallel cycles to do that, but it's not possible because the toolkit's FTP VIs are not reentrant, so for example i can't run two "FTP Get File.vi" at the same time. Do you think i could modify those VIs, making them reentrant, or there is some technical limit that allows only one FTP download at a time?
0 Kudos
Message 1 of 10
(4,209 Views)
I am not sure, but if you place FTP Get File.vi into an reentrant wrapper VI, you will be able to use it simultaneously.
0 Kudos
Message 2 of 10
(4,208 Views)
You can use a non-reentrant wrapper for a reentrant VI, not viceversa...
0 Kudos
Message 3 of 10
(4,204 Views)
I made something like this with TCP/IP, not with FTP. I started for every TCP client a new reentrant thread with VI Server and 8-option and could read TCP simultaneously from all clients. I think it should work.
0 Kudos
Message 4 of 10
(4,198 Views)
The time expensive job is done by TCP Read Stream.vi (which is reentrant). If you set as reentrant the whole direct call chain from FTP Get File.vi to TCP Read Stream.vi, I believe it should work. It seems that the only vi in the FTP toolkit keeping internal data is FTP Registry.vi, which is not part of that chain.
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 5 of 10
(4,181 Views)
Thanks Paolo, i tried to set as reentrant all the call chain to TCP Read Stream.vi; i also tried to set as reentrant all the FTP VIs, except FTP Registry.vi which looks like a functional global. It seems to work, i can download from two FTP sites simultaneously, but the gain in performance is very low. Parallel downloading (two groups of files from two sites) takes only 10% less time than serial downloading (one site at a time). Where's the bottleneck? Maybe total network speed?
0 Kudos
Message 6 of 10
(4,147 Views)

Hi,

I was trying to FTP to multiple devices and I had problems. I came across your posting on ni.com. I tried making the FTP vi from the Internet toolkit reentrant, but it gave TCP/IP error. Do you have any suggestion ?


Thanks,

LJ

0 Kudos
Message 7 of 10
(4,055 Views)
We need more details.
What's error code and location?
What's LV version? I used 8.2
0 Kudos
Message 8 of 10
(4,042 Views)
I got a TCP/IP open connection error from FTP open session.vi. I am using Labview 8.2.1.
 
Thanks,
LJ
0 Kudos
Message 9 of 10
(4,034 Views)
In my version there was a little bug in FTP open session.vi: the error out of Create semaphore.vi was not connected to the error in of FTP registry.vi. Try to fix it...
0 Kudos
Message 10 of 10
(4,029 Views)