I have created a programm that can save data to a file using the "Write to measurement file"-Symbol, when I start the programm. However, what I want is that when I press a button the system asks me where I want to save the data and when I click it again, the aqcuisition stops. Then again when I click the button it should ask again.
Since I am using an Omega box, I deleted most of the things in the VI
Can someone help me?
Solved! Go to Solution.
As far my understanding, There is an option to ask the user everytime when the express VI executes
Under Action click Ask each iteration
Modify your code as shown above
Thank you for your reply. When I run the programm and then click on the button it asks me where I want to store the data and when I click it again the aqcuisition stops. However, when I click again it doesn't ask me where I want to save my data. How is it possibly that LabView asks for the path every second time I click on the button?
Here is the Code. I don't know if you can open it, since I am using ULx from Measurement Computing. I also created pretty much the same thing with DAXmx from NI as a comparison. As you can see, it is a simple programm for data acquisation that uses the internal clock of my device (Omega DAQ2416) to give a signal to a while loop in which the data is stored to a file. Thank you for your help
If I change it to each iteration the data save window shows up everytime the while loop operates. I just want it to show up when I click the button every second time.
The mechanical action of the button isn't the right type. It is set to Switch When Pressed you probably want Latch When Released. Then it will only be true once then be false again until it is pressed. Right now it works more like a toggle switch where it is true over and over until you make it false. Alternately you could browse for a new path when you click the button, but then keep the selected path in a shift register and use that path until the user presses the button again.
Thank you for your help. But it still doesn't work. The problem is that I have to reset the "write to measurement file" element, when the button is pushed the second time. But when I do so it resets it every time the while loop is performed, resulting in a pop up of the where to save window
I think to write the data in a file you should use the wirte to spreadsheet file.vi and in the path terminal, use the application directory node followed by the build path function. Application directory gives you the path of the current directory where you have saved the application. In build path function give your file name.
I think it should work.
Correct me if i'm wrong.