LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing data to file in a timed loop

I am editing a previously made block diagram, and I'm having trouble writing my data to a file.

 

I want to have the mean histogram value recorded every 5 minutes into a data file

 

Do I need to worry about error? 

 

Here is the vi attached as well.

 

Thanks

0 Kudos
Message 1 of 4
(2,984 Views)

Not much info to go on here.

 

What error are you getting?

0 Kudos
Message 2 of 4
(2,966 Views)
Indeed that was vague.  I'm completely new at labview, do I need to route error wires through my file saving operations?  If I set it up for a save file prompt, will the time loop save to that same file on each of its iterations?
0 Kudos
Message 3 of 4
(2,957 Views)

It is always a good idea to wire up the error wires.

 

For a file save, it all depends on how you program it.  If you have a prompt that you ask for a filename before starting your loop, it will always write to the same file.  If you put the prompt inside the loop, it is going to ask you for a filename each and every time which will be a pain to the user.  If you wire it up as a file path control inside the loop, it will give the user the option to change the file path during execution.

 

If you want to have the ability to prompt for a new filename anytime during execution, but perhaps only when the user hits a button on the front panel such as New File?, you can put the dialog prompt function inside a case structure.  Then by putting the filepath wire into a shift register, that file path will be available for later iterations.

 

Since you are completely new to LabVIEW, you may not have seen these.  I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

Message 4 of 4
(2,941 Views)