05-25-2016 03:58 AM
Hello,
I'm trying to copy files in a directory on a cRIO 9066.
The method that I'm using is to map a drive in Windows 7 and I want to copy files with CopyFile function in CVI.
The drive is define as \\ni-crio-9066-030c6bf1.local\files (I also tryed http:\\ni-crio-9066-030c6bf1.local\files).
With this method I can transfer files to this drive with the CopyFile function but the transfer rate is extremely slow.
For a 300ko file, it take approximately 25-30s.
During this time, my application is break, there are no more values in the controls or UIRs until the copy is finished.
I tried to disable "Automatically detect settings" in Internet Explorer in Tools>>Internet options>>LAN settings>>Connections as I have seen in a KnowledgeBase (http://digital.ni.com/public.nsf/allkb/4EBE45E8A816B19386257B6C0071D025).
The copy is a lot faster about 1-1.5s but I have some transfer failures. Windows said me that the transfer failed in a popup, and the file in the cRIO is a 0ko file (and CopyFile doesn't return an error).
In the KnowledgeBase, they alert about the transfer failures but I hoped to have an error code in the CopyFile function.
I also tried to execute cmd.exe copy "source file name" "target file name" with LaunchExecutableEx but I had the same results.
I am in a deadlock for the moment.
Do you have any idea about how I can transfer files between CVI and the cRIO?
PS: I tried the WebDAV protocole in Labview and it seems fine with this (good transfer rate and no transfer failure). But I didn't find this library in CVI.
Thank you for your help.
Solved! Go to Solution.
06-03-2016 04:14 AM - edited 06-03-2016 04:18 AM
Hello Adenage,
I was not able to find a particular API specifically designed for CVI. Nevertheless have you tried to use a WebDav API that you can get from Microsoft?
or this one maybe
Thanks,
Jun'
07-05-2016 02:15 AM
I'm sorry for my late reply.
I succeed to send files in the cRIO 9066 using FTP.
I have installed "Legacy FTP Server" on the cRIO and I have used the FTP API in CVI (suggested on the french forum and by NI).
This solution works fine.
I didn't want to use an external API if possible so I choose the FTP solution.