Showing results for 
Search instead for 
Did you mean: 

FTP File transfer from NI 9802

Go to solution

Hi all,


I am trying to transfer data files stored in a NI 9802 module (using 2x2GB Transcend SD cards) mounted on a cRIO 9074. I am experiencing a very frustrating problem with my FTP, TCP/IP connection. I will try to be as comprehensive as possible.


First of all, I know I can successfully save data in the SD card(s) as I am able to fully access them via, where u is the drive letter assigned to my card. While on windows ftp explorer I can read, save, move, delete the files in my SD card with no problems at all.


My problems occur when I try to do this programmatically using the Labview 2009 FTP intermediate functions. I have attached my test VIs for your attention.


The (running on my cRIO) is the one mounting the SD card, it then waits till I press the stop button, without unmounting the card. I am pointing this out just to show that while I am trying to tranfer my files the card IS mounted. The is the one running in the local pc, and is used to transfer my files through TCP/IP connection. I have set all FTP connections to passive (had this active-passive problem before). I am running this VI after I have ran the RIO one... Note that while the RIO vi has mounted the SD card, I can easily perform all sorts of file operations in the SD cards either from windows FTP or from MAX FTP.


My works fine when it comes to just listing the files in my SD cards (using, FTP Directory Listing VI, please see attachments), however if I try to copy my files (using FTP Retrieve Multiple VI, see attachments) from the SD cards to my local PC I get the following error.


Error 66: TCP Write in NI_InternetTK_FTP_VIs.lvlib:FTP>NI_InternetTK_FTP_VIs.lvlib:FTP [TYPE].vi->NI_InternetTK_FTP_VIs.lvlib:FTP Open Data>NI_InternetTK_FTP_VIs.lvlib:FTP Data>NI_InternetTK_FTP_VIs.lvlib:FTP [RETR].vi->NI_InternetTK_FTP_VIs.lvlib:FTP Retrieve>


I searched for this error and people seem to agree that this error is related to problems with Windows TCP/IP connection.. Apparently windows are trying to establish a connection but after not getting any data back for some time they hang up. However, why am I able to list my files with no problems???  


Has it got to do with permissions?? If yes, then how can I change the permissions options for the SD cards in the NI 9802 module. Your help would be extremely appreciated...


Thanks very much for your time,










0 Kudos
Message 1 of 7

Hi charmand79,

do you know where you get the error and why? I had something similar and there it was an acquired semaphore.


Hope it helps.


0 Kudos
Message 2 of 7
Accepted by topic author charmand79

Hi Mike,


thanks for yet another fast reply. I have just managed to solve my problem. I am not sure whether it was related to your suggestion. Here is how I solved it. 


Being used to working with the intermediate FTP functions, I did not even bother checking the as-is ones. So basically using the "library" FTP get multiple files function I have now a fully functional system. For future references I have added my final vi. Note that in this VI I am firstly transferring my files using the library get FTP files function and then I use the intermediate FTP sequence of Open FTP - Logon - Delete files - Close FTP to get rid of all unwanted files in my card. For some reason, deleting the files works this way; but copying them didnt..


Thanks again Mike,


0 Kudos
Message 3 of 7



I don't suppose you could post the VI again but in version 8.6 for me could you. This is the exact issue I'm working on at the moment myself and would be vvery helpful to see how you solving it.


All the best



0 Kudos
Message 4 of 7



no probs at all.. I have included two versions of my VI for Labview 8.6 (hopefully the conversion has worked OK..).


The first version ( works for transferring data from an SD card mounted on the NI 9802 module. Note that the large "for loop" contains some string editing to get the filenames correct wrt to Windows-FTP naming rules (the std \ and / differences). Having used the "library type" function for files transfer (i.e. not the intermediate FTP steps) in the main for loop, I then had to use the intermediate FTP ones to delete my files stored in the SD card (smaller for loop). I did that because I could not find a library type function for deleting files. You can obviously skip this step if you dont want your files to be deleted from the card.


Because I am not sure if you are actually transferring files from an NI 9802 module or you just want to transfer them from the cRIO hard drive I have also included a v2 of the VI ( Note that the first version of the vi could not work for me in this case. To transfer data from the rio hard drive I had to solely rely on the intermediate FTP functions. Not sure why transferring directly from the rio or from an SD card on an NI 9802 module required these slightly different approaches but at the end of the day this is how it worked for me.


Hope this helped. Let me know if you need any additional help wrt the VIs or if you still cannot open the files..



Download All
0 Kudos
Message 5 of 7

Hi Stuart,

do you know where you get which error?



0 Kudos
Message 6 of 7

Hey, Mike


Although it's been 8+ years, I'm wondering whether you still remember this "Acquire Semaphore" issue? I'm running into the same issue seldom.




0 Kudos
Message 7 of 7