06-16-2014 05:41 AM
Hey there
I have a Daq input reading into a spreadsheet file
The daq tells me that one is supposed to have a while loop around it, and I can't get it to run without one, so okay
But my main problem is that this means that it overwrites my written file each time the while loop repeats
It also asks me to choose the file to write in multiple times
How would I go about fixing this?
Thank you
Solved! Go to Solution.
06-16-2014 06:06 AM
You have left the path input unwired and you are writing to the file inside the while loop. Don't do this way.
If you are acquiring data in a while loop just gather the data in that loop and use a queue, push the data into it. Create a seperate loop with a low level text file functions, open the file before the loop begins, read the queue and write the data to the text file by converting the data to text. Finaly close the file outside the loop once the data acquisition is complete.
If you have any question in any of the above please search in the LabVIEW example, if you are not able to find come back. 🙂
06-16-2014 06:35 AM - edited 06-16-2014 06:35 AM
It seems to me that you are using the DAQmx Assistant to configure your acquisition.
Why don't you "Enable TDMS Logging" in this Assistant? By default, it appends new data to the file.
Norbert
06-16-2014 11:24 AM
The file path works perfectly, thank you
The second part I don't get, (Still very new to labview). It makes sense that the write is outside the while loop, but I don't get how one is supposed to append the write file with a continuously flowing set of data points. Is there a dynamic data to text/string command?
Sorry for my lack of knowledge on the subject
06-16-2014 11:33 AM - edited 06-16-2014 11:35 AM
Yes you can convert numeric to string, check the attached VI. I would recommend you to go through basic LabVIEW materials and also play with NI example which comes with LabVIEW. Remember do not use the attached example along with data acquisition, always use seperate loops.
06-17-2014 06:09 AM
You're a life saver, thank you
I'll definitely look at the examples/tutorials, but it's nice that there's such a supportive community behind the software