LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

{Pretty Hurry!} Append to a text file

Solved!
Go to solution

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

0 Kudos
Message 1 of 9
(2,755 Views)

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.

0 Kudos
Message 2 of 9
(2,724 Views)

Thank you for your quick response, but I didn't really get you... could you explain in details? Thanks

0 Kudos
Message 3 of 9
(2,718 Views)

@RawtoLV wrote:

Thank you for your quick response, but I didn't really get you... could you explain in details? Thanks


FCapture.PNG

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 9
(2,681 Views)

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

0 Kudos
Message 5 of 9
(2,673 Views)
Solution
Accepted by topic author RawtoLV

I knew that was coming next... This will put a time stamp and the temperature in columns with each reading on a separate line

tempCapture.PNG

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 6 of 9
(2,664 Views)

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

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 7 of 9
(2,658 Views)

I can't thank you guys more! It works! :manvery-happy:

 

Thank you and have a great week!

 

Best,

Rookie

0 Kudos
Message 8 of 9
(2,636 Views)

@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. 😉

0 Kudos
Message 9 of 9
(2,624 Views)