LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Which is the best way to transfer the file through the LAN

I need to transfer files of Size in MB from one PC to another. I have done it by File Copy function with the file path "\\Receiver\C:\File.txt". but it takes 1 Sec approximately for the 10KB of file size. I also need to monitor the file transfer progress. Please suggest the best way to transfer file faster.
0 Kudos
Message 1 of 7
(3,183 Views)
How long does it take to transfer it when you copy the file in exporer?

Does it also take that long if the file has another extension? (I've noticed
once that transfering .txt files take very long, while .exe, .zip, etc.
didn't).

Other solutions are not possible without installing software for e.g. an FTP
server.

Regards,

Wiebe.


0 Kudos
Message 2 of 7
(3,157 Views)
Your destination path seems a bit odd. Normally the C: drive needs to be addressed using the administrative share of C$ if you're accessing it via a UNC path.

Copying a 10K file using the File Copy function should definitely not take 1 second. I tried it with a 10K file and it took, on average, less than 20 msec. There was a difference if I was used a full UNC path as opposed to a networked drive letter. The latter usually took less time, but there were cases where it made no difference.
0 Kudos
Message 3 of 7
(3,142 Views)
Thanks for the Valuable feedback.

Actually the File format I  have to tranfer is *.vlf (these file are taken for printing)  which is of few MB of size  I didnt try to transfer this format file. For the testing purpose I have tried with text files.

Please tell me how to address the destination path (administrative share of C$ ). I dont know about UNC path.

In my Code:

After transferring files to the destination path (path - which is always accessed by the Printer).  I have to  send command to the PLC that triggers the printer then printer take these files. After these cycle complete, I replace the files with the File Copy Function then again printer is triggered by the PLC - command.  If the PLC command sent after the file transfer sequence, the PLC will immediately triggers the printer to print the file. I have nearly 500ms of time to transfer two of these files.

All i want to know is File Copy function completes its job after transfer or it just commands to do so. I should not give the command to plc while file tranfer in progress.

Also please tell me is it possible to monitor the file being transfered ?


Thanks & Regards
Sridhar


0 Kudos
Message 4 of 7
(3,119 Views)

Hi

What programming environment are you using to achieve this task? Are you using the LabVIEW file copy functions? Also are you using LabVIEW DSC Module or Datasockets to communicate with your PLC?

In case you are using LabVIEW and dataflow has been implemented through error wiring, then the copy process should complete before you send the command to the PLC.

I hope this helps!

 

Mehak Dinesh
Applications Engineer
National Instruments
www.ni.com/support
0 Kudos
Message 5 of 7
(3,116 Views)
I am using LabVIEW  8.2 File Copy Funntion and sending command to PLC by Serial RS232 interface Using VISA Functions.


Thanks & Regards
Sridhar
0 Kudos
Message 6 of 7
(3,109 Views)
The copy function just tells the OS to do the copy. The copy might not be
complete when the function returns.

If you really need this, you need to do the copy manual. This might be
slower, but you have full control. See the advanced File I/O palette.

Open a reference to the source file.
Open a reference to the destination file (a new file).
In a while loop, read small data parts from the source reference.
Write them to the destination reference.
When done writing all data, flush the file, or it is still not save.
Close both references when there is no more data.

This way you have full control, and you can monitor the status of the
transfer.

Regards,

Wiebe.


0 Kudos
Message 7 of 7
(3,091 Views)