From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
12-10-2021 06:49 AM
Hi, I have created this vi to read my data using DAQ-6008 and saving in a text file. I am using a on/off switch to select when to write the data in text file. However, i wish to manually select a different text file and start writing the data while the vi is still running. With the present vi, i must choose a file at the starting of the process. I can choose a different file while the vi is running, but it does not write any data in that file. Can anyone suggest how to do it. I am new to LabVIEW, and all these i have done using the tutorials. So any help is appreciated.
12-10-2021 11:29 AM
A Producer/Consumer is what you should probably be using here.
The Producer Loop would initialize the DAQ and continuously acquire data.
The Consumer Loop would be an Event Driven State Machine that would:
12-11-2021 09:27 AM
Just use the Write to File Express.vi
That might start a flame war🔥 but, those Express VIs are easily configured by novice users who just want to "Get-r-Done".
There are more elegant solutions.
12-11-2021 12:03 PM
Can you "save for previous", e.g. LabVIEW 2020. (I cannot see what you are doing, but it sounds like you are violating some dataflow principles).
What are your requirements? For example is it OK if no data acquisition takes place while the file dialog (where you select the new file) is open? What should happen in the user cancels the file dialog? Etc.
Please write down a full list of requirements and behaviors so we can suggest the best solution.
12-11-2021 12:23 PM - edited 12-11-2021 12:24 PM
@altenbach wrote:
I cannot see what you are doing, but it sounds like you are violating some dataflow principles.
Their program architecture is One Big Loop... IMHO: That's the real issue here.
12-11-2021 12:33 PM
@RTSLVU wrote:
Their program architecture is One Big Loop... IMHO: That's the real issue here.
I guess the file dialog is before the loop? 😄