LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to write file to spreadsheet w/o a pop-up and save it every 10 minutes

When I run the attached VI, a dialog box pops up for each set of data and ask me to designate a file name. Is there anyway I can write the data to one single spreadsheet without this pop ups while running the VI? Also, this VI will be run continously and I would like to have this VI automatically save data into a different file in every 10 minutes interval (e.g., one file (e.g., file 1) is saved and closed in 10 minutes and then a new one (e.g., file 2) opens for writing the next 10 minutes duration, and so on). I would appreciate your help.
 
Sincerely,
 
Lee
0 Kudos
Message 1 of 5
(3,071 Views)
You're getting the dialog box because you haven't wired a path to the "file path" control of the "Write to Spreadsheet File" VI. The documentation indicates that you'll get a dialog if you don't wire a path.

As to your second question, you need to place a loop around your code and keep track of time. Say, something like a shift register and one of the Date/Time functions. Then, when you hit 10 minutes, save your file. You can generate a unique path based on a base name with the current time. Obviously, doing this would eliminate your problem with the dialog since you will be specifying a filename. You'll probably need another shift register to hold the data that you're eventually going to write to file at the end of the ten minutes.
Message 2 of 5
(3,058 Views)
Lee,

I think I've done what you were asking, although I'm not positive.  Also, this may not work properly to begin with as you didn't include all the subvi's and I was subsequently unable to run it.  I just threw this together quickly from memory as I have had to do this on a number of occasions.

It just takes an initial file path, and the first time the program is run, it creates that file, and then subsequent iterations of the loop will write into the initial file.

The new files names for every 10 minutes are simply the time, but you could change all that to suit your needs/taste.

Either way, working or not, it might help give you a push in the right direction.

Good luck!
Message 3 of 5
(3,062 Views)

Thanks for your help. Your help provided me with some clear direction as to how I should've got it done as I am still trying to learn this LabView. However, when I ran the VI that you modified (May12-06 Updated), it gave me an error that I don't understand (Error 1 occured at Open file; An input parameter is invalid; command requires GPIB controller to be controller in charge). I am attaching all the SubVI's to this messege that I forgot to do so previously. Please take a look and let me know why I am getting this error. I am open to any suggestions and necessary modifications. I really appreciate your help.

 

Sincerely,

 

Lee

0 Kudos
Message 4 of 5
(3,029 Views)
Never mind. I got it. Thanks..
0 Kudos
Message 5 of 5
(2,972 Views)