04-13-2016 06:42 PM
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
04-13-2016 06:43 PM
Here is a screen shot.
04-13-2016 07:17 PM
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
04-14-2016 03:30 AM
04-14-2016 02:10 PM
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
06-27-2019 05:53 AM
ive got the same issue. how did you solve it ?
06-27-2019 05:58 AM
Which problem, long processing time, or the inability to explain or demonstrate what you are seeing?
Mike...
06-27-2019 06:04 AM
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.
06-27-2019 06:46 AM
the code struture/idea behind it is very similar to the picture you posted in the beginning
06-27-2019 08:38 AM
@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