LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Copying files from one to other location.. How to check status in run mode on front panel?

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..

Naqqash
0 Kudos
Message 1 of 5
(2,721 Views)

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.

0 Kudos
Message 2 of 5
(2,704 Views)

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.

Naqqash
0 Kudos
Message 3 of 5
(2,642 Views)

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

0 Kudos
Message 4 of 5
(2,627 Views)

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

Applications Engineer
National Instruments
0 Kudos
Message 5 of 5
(2,599 Views)