LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Function to overwrite a file each time the loop runs

I am writing a program for measuring temperature and displaying difference after every 5 mins. I want to overwrite the data in file every 5 mins. I want to know how can i overwrite the data in a file.
 
Bhushan
For Latest TECH News check out my blog at http://directfromdigg.blogspot.com
0 Kudos
Message 1 of 6
(2,919 Views)

Do you use lowlevel, highlevel, or express file I/O?

You simply need to start writing at position zero instead of appending. If the total lenght of your data varies, you must make sure to set the eof at the right place after each write.

0 Kudos
Message 2 of 6
(2,909 Views)
You can either use one of the file function in the file IO palette, open/create/replace file.vi or there is a delete file.vi in the File IO palette under advanced file IO.  You can delete the file then resave it.

Brian
0 Kudos
Message 3 of 6
(2,907 Views)

Thanks Altenbach and Brain for your replies.

The case is, i measure tempreature from 25-30 thermocouples and get the output in 1D array format. After 5 mins i take another reading. This time i want to replace the content i have in the file and note the new reading. After 5 min i want to repeat it again. I did not understand what exactly is low level or high level File I/O. I am a new user of labview so have lots of questions. I hope to get your replies soon.

Bhushan

For Latest TECH News check out my blog at http://directfromdigg.blogspot.com
0 Kudos
Message 4 of 6
(2,901 Views)

Bhushan,

Hopefully this helps.
 
Brian
0 Kudos
Message 5 of 6
(2,882 Views)

Thanks a lot Brain. This really helped. I got the program running exactly the way i wanted it to.

Bhushan

For Latest TECH News check out my blog at http://directfromdigg.blogspot.com
0 Kudos
Message 6 of 6
(2,875 Views)