05-22-2011 04:17 AM
Hi,
I have the need to save a file to a network drive that could potentially be too slow or timeout when saving. I want to do it so that if the network saving is too slow or an error occurs it will automatically save to the local drive. Detecting the status of the save process is ok usng the error cluster, but but how to do this in terms of saving time?!
Any ideas...
Thanks ![]()
05-22-2011 09:59 AM
I would consider doing it the other way. Save a copy to the local drive at the appropriate times. Then move a copy to the network drive. You do not really care how long it takes to move the copy and your data is always saved on at least one hard drive.
Lynn
05-22-2011 10:00 AM
05-22-2011 10:03 AM
05-22-2011 11:46 AM
Customer has requested that the primary place of saving test reports be on the network. I agree with you guys 100% that its more better to use the local storage. But customer always knows best right?! ![]()
05-22-2011 12:24 PM
I do not recall any of the file functions having a timeout. To avoid blocking your main program with a lengthy write, do the write to the network file in a parallel VI. Then it can take as long as it needs. I would still write to local storage every time. After receiving a "no error" message (via queue or notifier) from the parallel network write, you can delete the local file. If the customer checks between writes to the network the file will not be there. If the check occurs during a write, then it is a temporary backup.
Lynn
05-22-2011 01:23 PM
I am not saying don't save them on the network. I am saying save the file local first. When the local save is complete copy it to the network. I don't know what this file is or what is involved in creating it. But once it is created and saved on the local disk you can copy it to the network. If it fails you can have a retry routine.
Here is an example. Attached vi is LV8.2
05-22-2011 01:33 PM
@Eletrostatic wrote:
But customer always knows best right?!
Actually that is wrong! ![]()