labviewnoob Posted July 7, 2009 Report Share Posted July 7, 2009 The following vi which is modified by me and my groupmate has some errors which we hope to resolved. When the button is pressed, the time will be logged to the textfile. However, the textfile will have many empty lines and many lines of data. I wish to have the time logged only once when i press the button and no empty lines in between. TextFile 372009.vi Quote Link to comment
miaoumiaou Posted July 7, 2009 Report Share Posted July 7, 2009 Hi lab, You have many blank lines, because you write on your file at each iteration. You just have to write your data when you acquiere your data, not all time. The solution is to put the "write in file" sub-vi in your case structure TextFile 3720091.vi Quote Link to comment
labviewnoob Posted July 8, 2009 Author Report Share Posted July 8, 2009 Thanks miao, i place my write in file into the case structure & the empty lines are gone. however, the textfile still capture more than 1 line of data everytime the button is pressed. i could not access the vi which you had modified as im currently using v8.5. Do you mind saving it in a lower version? Many Thanks. TextFile 872009.vi Quote Link to comment
miaoumiaou Posted July 8, 2009 Report Share Posted July 8, 2009 You have many lines in your text files, cause when you push the button, it will stay in true, and you don't put a sleep. I correct your vi in LV 8.5. I put a delay in your while loop, and change the "commut action" (??, i don't know the word in english, sorry) of your boolean. It will put himself at "false" after you push the button. Sorry, i'm not very good in english. Quote Link to comment
miaoumiaou Posted July 9, 2009 Report Share Posted July 9, 2009 I'have just see, that i forgot to post the vi sorry TextFile 8720091.vi 1 Quote Link to comment
labviewnoob Posted July 9, 2009 Author Report Share Posted July 9, 2009 I'have just see, that i forgot to post the vi sorry Thanks miao. I have managed to get the results which i need by learning from you. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.