LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reading from a mapped drive

Hello,

 

   I am reading a file from a mapped network drive and displaying the contents of the file immediately after I have written the file to the mapped network drive. I am doing this to verify to the user that if they are able to view the contents of the file the data have been obtained from the test equipment and has been written to the mapped network drive. When the network and/or server is working correctly the code works great. But when the network and and server slows down I cannot read the file from the mapped network drives. I have also seen ths situation after I have upgraded the lab computers.

  So should I put a fixed delay before I read and hope that it is long enough? Will using a file exist check before I read do it? Any suggestions? 

 

Regards,


Kaspar
0 Kudos
Message 1 of 5
(2,453 Views)

what happens when it goes bad?  does it just freeze up and wait forever or does it timeout and issue an error.  If that is the case i would just clear the error and try again until it works just fine.  Hope this helps

Message 2 of 5
(2,443 Views)

Hello,

 

   The code does not freeze, I just do not get all of the data. I tweak the code to do several retrys and see what happens. Thanks for the suggestion

Regards,


Kaspar
0 Kudos
Message 3 of 5
(2,435 Views)

In general, it is a bad idea to work directly with network drives for the exact reason you are seeing. You are at the mercy of network hangups. I can't tell you how many times this comes up as an issue with the testing around here, but the engineers here insist on using network drives. Fine, I say. Then deal with the occasional error. It is usually better to store data files locally and periodically transfer them to the network drive.

 

If you cannot read from the network drive, then you cannot read from the network drive. Putting in a delay may only fix the situation under certain cases. In some situation it will do no good. What do you do then? Increase the delay? I think your program should first save the file locally and then copy it to the network drive. It should attempt to read from the network drive with a timeout. If the file is not available within a reasonable amount of time then you simply notify the user that there's network problems, and continue on with the test.  At least you will know that the data file has been saved locally.

Message 4 of 5
(2,433 Views)
another possibility could be setting up a proxy server (or even on your own computer) that wouldn't have any network hangups real close to your computer and using that as a mapped drive which in turn would synchronize periodically with the actually network server using the task manager. I'm not much of a networking guru but i think this could be done
Message 5 of 5
(2,429 Views)