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
(699 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.


LabVIEW Champion. It all comes together in GCentral GCentral
0 Kudos
Message 2 of 9
(668 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
(662 Views)

@RawtoLV wrote:

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


FCapture.PNG

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
0 Kudos
Message 4 of 9
(625 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
(617 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

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
0 Kudos
Message 6 of 9
(608 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

 

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
0 Kudos
Message 7 of 9
(602 Views)
Highlighted

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
(580 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. 😉


LabVIEW Champion. It all comes together in GCentral GCentral
0 Kudos
Message 9 of 9
(568 Views)