LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to completely close a data storage reference

I am using data plugins to read files with different data formats, and are running into problems on quitting a vi that reads many (hundreds) files.

 

It is a very simple vi with a single while loop and an event structure.

 

a) a "process" button would starts reading data and process in a loop (250+ files). This event works all fine.

b) a "quit" button that exits the while loop/program.

 

If I start the vi, and then press "Quit", it works fine and quits immediately. However, if I press "Process" button to process data first, and then when it finishes, press "quit" button, it would take a long time to quit. It appears LabVIEW is very busy doing something. I suspect I did not close all the references that the data storage uses.

 

My question is, how to properly close a data storage? I do close data storage everytime I finish reading a file, but I do not close "Channel Groups Ref" and "Channels" Ref (do not know how).

 

Thanks.

 

Ian

0 Kudos
Message 1 of 10
(3,604 Views)

Here is a screen shot.

0 Kudos
Message 2 of 10
(3,602 Views)

No Pictures, please -- attach your VI.  That way, we can "probe" the Express VIs and basically poke around in your code, even executing it to see where it is misbehaving.

 

Bob Schor

0 Kudos
Message 3 of 10
(3,586 Views)
...and get rid of the express VIs. How long does it take your code to process one file? When it takes a "long time", how long are we talking?

Where is the data being saved?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 10
(3,542 Views)

Bob and Mike

 

A sample VI is attached. I created this VI just to demo the issue. It just read from an universal file (file attached) and repeat for N times. The delay increases exponetially with the size of FOR loop (N).

 

The delay in my actual code is a lot worse.

 

I will try to replace express VIs, but it would be good if I can still use them.

 

 

Regards

 

Ian

Download All
0 Kudos
Message 5 of 10
(3,510 Views)

ive got the same issue. how did you solve it ?

0 Kudos
Message 6 of 10
(2,578 Views)

Which problem, long processing time, or the inability to explain or demonstrate what you are seeing?

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 7 of 10
(2,574 Views)

the processing time increasing during a for loop. im also using the express vis. ive got a storage reference as input to a loop. inside the loop i grab channel "n" where n is the current loop index from that storage. the processing time increases which each loop iteration.

0 Kudos
Message 8 of 10
(2,568 Views)

the code struture/idea behind it is very similar to the picture you posted in the beginning

0 Kudos
Message 9 of 10
(2,557 Views)

@MadTulip,

 

     If you want us to take a look at your code and comment on why it isn't functioning as you think it should be functioning, then we need to see your code (which means you need to attach your VI, and some sample data).  

 

     The point of a DVR is that it points to a fixed LabVIEW Data Element and allows you to operate on it "in place", without having to pass it from one storage location to another.  If you are working with Arrays (particularly large Arrays), this can save you time making Array "copies", particularly if you have pre-allocated the space for the Array (so you don't have to keep asking for more memory to save data as the Array grows in size).

 

     I'm off on an over-due vacation starting tomorrow, but Mike definitely knows more about LabVIEW than I, although he shares my shortcoming in not being able to see unposted LabVIEW code ...

 

Bob Schor

0 Kudos
Message 10 of 10
(2,536 Views)