03-03-2014 11:10 AM
Hi guys!
I am new to the program and am trying to learn how to use it. Here's my problem,
I made a temperature sensor, and got some data from NI my DAQ, but I dont know how to append the system date and time and the mean temperature into a tab delimited text file. I got some hints saying that
'By wiring the refnum to a shift register instead of the refnum in and out blocks, the loop will continually pass the data for each iteration of the loop, reusing the name specified in the first iteration. The string value would be the entire string line that is to be inserted into the end of the file. If you wish this to actually be a line (and you do) you must be sure to have a line feed / carriage return as the last character of the string.'
which I really can't understand. Could someone give me a hand?
Thanks so much!
Rookie
Solved! Go to Solution.
03-03-2014 11:15 AM
Just open the file before the loop and close it after the loop. Inside the loop, just keep writing to the file, no need to set the position.
03-03-2014 11:18 AM
Thank you for your quick response, but I didn't really get you... could you explain in details? Thanks
03-03-2014 11:35 AM
@RawtoLV wrote:
Thank you for your quick response, but I didn't really get you... could you explain in details? Thanks
03-03-2014 11:41 AM
Wow! That's rea;;y helpful. But why is that the file I got didnt't include the temperatrure? I am supposed to get a file with time and the temperature. Could you help me with that? Thanks
03-03-2014 11:46 AM - edited 03-03-2014 11:50 AM
I knew that was coming next... This will put a time stamp and the temperature in columns with each reading on a separate line
03-03-2014 11:51 AM - edited 03-03-2014 11:52 AM
You do not need to wire the TAB constant to the Write To Text File vi.
I just noticed that It was still there in my original reply
03-03-2014 12:00 PM
I can't thank you guys more! It works! :manvery-happy:
Thank you and have a great week!
Best,
Rookie
03-03-2014 12:16 PM
@RawtoLV wrote:
Thank you for your quick response, but I didn't really get you... could you explain in details? Thanks
Sorry, I had to leave. I was sure somebody will fill in the blanks if questions remain, and I was right. 😉