01-31-2011 10:26 AM
Hi guys , can anyone tel me that how can I check the copying status in real time while VI is running.. e.g lets say I am coping files from location A to location B and the data is quite large so if somewhere in between there is an error I can not figure out when the problem occurred. Is this possible that I know while staying on the front panel about the amount of data copied and how much is left etc..because I think it will be easy to track error if there will be any..
01-31-2011 09:29 PM
Hi,
It`s not possible with the function copy file of LabVIEW. But has two solutions, the first solution is: open the source file, read the contents in blocks and then write to destination file. The second is making API calls to SO. I take the second, in my opinion. See the function SHFileOperation which shows standard windows progress bar.
04-04-2011 08:10 AM
Thanks for the help. But I am afraid I didn't get the idea. Can you explain more or suggest me some link or can share some example vi. I'll be thankful.
Regards,
Naqqash.
04-04-2011 10:01 AM
Hi,
I tried to do it, but from some reason I failed. Here are some links about function and how to do it:
http://msdn.microsoft.com/en-us/library/bb762164%28v=vs.85%29.aspx
http://msdn.microsoft.com/en-us/library/bb759795%28v=vs.85%29.aspx
http://www.docstoc.com/docs/31464530/Passing-Labview-Cluster-to-C-Structure-in-DLL
In the attachment is what I've been trying for the last half an hour. I did it before, but never using cluster -> structure casting.
Paul
04-05-2011 04:25 PM
If the problem you are having is calling a structure, there is a an example vi called Call DLL.vi in the example finder. This post also might give you some more insight into this issue.
http://forums.ni.com/t5/LabVIEW/structure-datatype-in-c-to-cluster-in-labview/td-p/293733
Jon S