LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2 staged save to text file

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 Smiley Happy

0 Kudos
Message 1 of 8
(3,306 Views)

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

0 Kudos
Message 2 of 8
(3,295 Views)
Can you just save first to the local drive and then attempt to save to the network? If successful remove the local file.
=====================
LabVIEW 2012


0 Kudos
Message 3 of 8
(3,294 Views)
Doh! Lynn beat me by a minute!
=====================
LabVIEW 2012


0 Kudos
Message 4 of 8
(3,293 Views)

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?! Smiley Mad

0 Kudos
Message 5 of 8
(3,290 Views)

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

0 Kudos
Message 6 of 8
(3,285 Views)

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

 

Attempt To Save to Network.png

=====================
LabVIEW 2012


0 Kudos
Message 7 of 8
(3,280 Views)

@Eletrostatic wrote:

But customer always knows best right?! Smiley Mad


Actually that is wrong! Smiley Very Happy

=====================
LabVIEW 2012


0 Kudos
Message 8 of 8
(3,275 Views)