LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

change path in loop to create a new data file

Solved!
Go to solution

I would like to create a new data file every five seconds.  I have tried to program the vi in such a way that it automatically renames and creates the data file.  If i move the Open/Create/Replace File and Write to binary file to the outside of the loop my path local variable does not update.  If i move those two inside the loop my vi creates multiple files but the files only have one data point in them.

 

I have attached the vi.  I appreciate any help you can give.

 

Thanks 

0 Kudos
Message 1 of 8
(4,706 Views)

You've sure accomplished a lot of work there!  I would even nominate this VI for the anti-Rube Goldberg thread, because you sure haven't done anything that would be considered excessive.

 

(What does a blank VI show us?)

 

What you want to do is store your file path in a shift register.  When you want to write to the same file, use that file path.  When you want to create a new file, create a new file name and store that in the shift register instead.  Now you just need to add your logic as to when you want to use the previous filename and when you want to create a new filename.

0 Kudos
Message 2 of 8
(4,704 Views)
That was my mistake, i didn't realize...i must have posted the wrong vi
0 Kudos
Message 3 of 8
(4,698 Views)
This is what i meant to link to.
0 Kudos
Message 4 of 8
(4,697 Views)

Try this.

 

A bunch of other things were fixed as well.

0 Kudos
Message 5 of 8
(4,692 Views)

Thanks a lot for the help. 

 

I am running lv 8.6 would you be able to save it for backwards compatibility?

0 Kudos
Message 6 of 8
(4,690 Views)
Solution
Accepted by topic author lockesmith
Message 7 of 8
(4,686 Views)
Huge help, really appreciate it...even though you are a ravens fan
0 Kudos
Message 8 of 8
(4,683 Views)