01-04-2017 05:20 AM
Hello,
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.
01-04-2017 05:41 AM
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
01-04-2017 06:45 AM
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?
01-04-2017 08:11 AM
It should ask every time depending on how it is coded. Post your code and we can better suggest a solution.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
01-04-2017 08:32 AM
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
01-04-2017 08:45 AM
Double click the Write express VI, change the Action to Ask each iteration instead of Ask only once.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
01-04-2017 09:06 AM
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.
01-04-2017 09:26 AM - edited 01-04-2017 09:27 AM
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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
01-05-2017 03:40 AM
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
01-05-2017 04:00 AM
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.