05-19-2016 11:29 AM
I'm trying to set up a simple .VI in order to sample temperatures and store them in a .LVM file. I would like to have .VI function in the following way. Everytime the START button is pushed, the data is saved to .LVM file (test.LVM) until the STOP button is pushed. When the START button is pushed a second time, I would like the .VI to start saving to a new output file (test_1.LVM for example). As the current .VI is written, the second time the START button is pushed, the data is still saved to first output file test.LVM and no new output file is created. If I Abort the .VI and restart it, and hit the START button, a new output file will be created as long as the first file remains in the ouput directory. I was hoping to do this wihout having to start and stop the .VI constantly. I'm unsure how to program the .VI to do what I'm intending and am looking for guidance.
05-19-2016 12:02 PM
Right now, you just save to wherever the path control is pointing to. If you want it to save somewhere else, change that control before pressing the Start button.
If you want it done programmatically, keep track of how many times the Start button was pressed in a shift register and update the file name to include that count.