LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Periodic autosave of XML file

Hi guys, 

 

I'm having quite simple task, but no idea how to achieve it. A have a While loop, inside it I have som form to fill in and the output of this form is saved into xml file (using older MSXML library) and OK button for running parser and writting data into right place in XML file. All I need to do is to save XML file after the Stop button is hit, or after e.g. five minutes of application run. Just simple autosave feature.

 

For better ilustration, please see picture, or example.vi file. 

 

I am running LV 2012

example.PNG

 

Thank you for your answers.

0 Kudos
Message 1 of 3
(2,256 Views)

You could put these functions in an event structure within the loop. Have a shift register on the loop, passing the value through the various states of the event stucture. Have the "save" button trigger an event to save your data, and at the same time (bad pun) put the current millisecond timer value onto the shift register. In the time out case of the event structure (with a time out value of, say, 100mS wired to it to cause the timeout case to trigger regularly), compare the value of the shift register with the current millisecond count and when enough time (x) has passed have it: 1) put the new time count on the shift register, 2) save the file. This should ensure that the file is saved every x within a 100mS window of time error.  

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 3
(2,247 Views)

you mean like this?

 

timeout.PNG

Value change.PNG

0 Kudos
Message 3 of 3
(2,242 Views)