LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to reset new file output using DAQMX with State Machine

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.  

0 Kudos
Message 1 of 2
(2,719 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 2
(2,707 Views)