03-01-2013 12:51 PM - edited 03-01-2013 01:08 PM
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
.
Thank you for your answers.
03-01-2013 01:13 PM
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.
03-01-2013 01:28 PM
you mean like this?