03-14-2012 04:41 PM
I'm developing a tool program which needs to do some file transfer tasks between local PC and a unix box through a mounted NFS. BTW, the unix box is connected to PC thru an Ethernet cable. I'm having two problems here:
I used the built-in function copy.vi in Labview for my program to copy files from local PC to NFS. The copy function seems not working reliably. Sometimes it can copy the entire file, sometimes the file content will be lost, sometimes it doesn't copy at all.
The Check If File or Folder Exists.vi simply doesn't "see" the files on the NFS drive.
If I don't try with NFS, everything works fine locally.
Does anybody have any ideas?
ps: We've tried NFS on XP and Window 7 Enterprise. They all showed problems.
Thanks very much!
03-14-2012 06:01 PM
Taking LabVIEW out of it, are you able to copy the files without any problems?
03-14-2012 09:23 PM
My coworker had the Unix box set up with her PC. She said if manually copy files to NFS, there was no problem.
03-15-2012 07:52 PM - edited 03-15-2012 07:53 PM
Ideally, you should be able to write and read through a mounted NFS as if it were on a local disk. Being that everything works fine without NFS, there does not appear to be a problem with your copy of LabVIEW. However, can you provide more information about this matter?
What is the file size of the file you are trying to transfer? How often does this transfer fail? Can you pinpoint when the transfer stops working?
It is also important to note that NFS is not specific to LabVIEW. As an alternative, you might want to consider using FTP to transfer files.
03-16-2012 12:49 PM
Thank you Tunde for looking at my issues!
The file size is not an issue here. We tested with empty files or files with smaller than 1KB sizes. They all showed problem. The frequency of file transfer shouldn't be a problem either. Through some user interaction on front panel, a couple of files will be transferred. That's basically how often the file transfer occurs.
Interestingly enough, I replaced the copy.vi with a subvi I created using DOS command with System Exec.vi and the issue of copying files went away. My co-worker tested on both XP machine and Windows 7 machine. The DOS command worked fine thru Lavview's System Exec.vi. I think I can take that as a work-around if we can't figured out why copy.vi wouldn't work. Still, it would be nice to know why it doesn't work.
Now I'm still facing some issues with the usage of Check If File or Folder exist.vi. Sometimes it can detect the existing files and sometimes it doesn't.
Thanks very much!
03-19-2012 07:20 PM - edited 03-19-2012 07:21 PM
I am glad to hear that you found a workaround for copying files. However, to better understand the scope of this issue, can you answer some additional questions?
What user interactions on the front panel determine whether a file will transfer or not? Furthermore, does the Check if File or Folder exist.vi work when the Copy.vi works? What is common between these failures if anything?
Basically, we want to find the conditions that allow these VIs to work. For example, LabVIEW does not overwrite read-only files on Mac OS X and Linux, even if you set this parameter to TRUE.
03-22-2012 11:54 AM
Thanks Tunde for your reply!
The check if file or folder.vi actually worked. There was a timing issue. At least that's what I found on one of the Windows 7 PCs. On another Windows 7 PC, we still see some problems with the program. What's frustrating is that the same Labview program works on XP machine doesn't necessarily mean it will work on Windows 7 machine. furthermore, if it works on one Windows 7 PC doesn't mecesarily mean it will work on another windows 7 pc...Do you have any advices on this?
Thanks very much!
03-23-2012 05:50 PM
The fact that your code works on one computer, but fails to work on another computer could be due to a number of reasons. If you are transferring a specific VI from one computer to another, you may experience problems if you are trying to reference resources that have different locations. Are you getting an error message, when the code does not work? Or is the Check if File or Folder.vi providing the wrong output?
You also mentioned that there was a timing issue. How did you come to this conclusion and did you find a workaround?
Finally, can you help me understand this problem, by outlining the different operating systems you are working with, which operating systems have this problem, and what version of LabVIEW is on these computers?
03-26-2012 10:00 AM
I extended time-out period for The check if file or folder exist.vi to find the files on NFS and it seems that it worked.
The program worked much better once I rebuilt the application using different run-time engine and including some other products in the installer. I'm using Labivew 2010. I develop my program on my XP and test the application on Windows 7 machine. Sometimes the program will have problems accessing NFS. Then rebooting the PC seems helpful.
With Labview 2012 or 2011, is there any improvement over 2010 in the area of working better with Windows 7?
03-27-2012 02:45 PM
LabVIEW 2010 should be just as compatible with Windows 7 as LabVIEW 2011 (i.e, fully). The improvements of 2011 over 2010 are pretty numerous, and detailed here:
The main highlight I would say is improved stability. LabVIEW 2011 is fairly crash-free, especially compared to LabVIEW 2010. There are also a number of usability improvements.