01-27-2025 07:28 AM
Hi all,
I am currently trying to make a program, where I am logging 11 temperatures, and want to save this to a text file. I am using the NI9213 module.
I have made headers for the temperatures, as the locations need to be added at some point. However, when I run the program, the dialog box comes up first, and only the headers are saved.
I have made tried using the append file function, but it does not work..
I also tried removing the headers, however the dialog box does not always show, and half of the time, the data is not saved.
Any ideas what to do and how to fix it? 🙂
Thanks! Please ask if something is unclear.
Solved! Go to Solution.
01-27-2025 07:34 AM
Hi cha,
@cha_au wrote:
I have made headers for the temperatures, as the locations need to be added at some point. However, when I run the program, the dialog box comes up first, and only the headers are saved.
I have made tried using the append file function, but it does not work..
I also tried removing the headers, however the dialog box does not always show, and half of the time, the data is not saved.
The answer is: THINK DATAFLOW!
As the FileWrite function is called AFTER the loop finishes you get only the header until then.
When you want to save data in the loop then you need to save the data in the loop...
01-27-2025 07:44 AM
Hi,
I see the point. So I need to put the save data inside the while loop?
I actually followed this tutorial, where they do it outside the while loop.
NI-DAQmx multi-channel data acquisition LabVIEW program - YouTube
But without the headers, it sometimes saves all the data. Isn't the point of the shift register, that they give a value each cycle? So all the values from the shift register will be saved?
01-27-2025 11:25 AM - edited 01-27-2025 12:54 PM