12-10-2010 02:52 PM
How can I keep the data I load from a large file in memory so I don't have to reload it everytime I make a minor change to another part of the code? The snippet below is representative of my problem.
I larger problem is I don't know how variables live in LabVIEW memory. Does LabVIEW clear variable values from memory before running?
Solved! Go to Solution.
12-10-2010 03:03 PM - edited 12-10-2010 03:04 PM
Use an action engine, functional global etc! As long as you don't close down LabVIEW, the data should remain in memory in the shift register. However, I must admit, I'm not sure if this is the case if you change something within your code before pressing run again. But, I believe it should still work.
12-10-2010 03:18 PM
I usually roll with a quick-and-dirty solution, simply use an array constant until the code is complete. Put an indicator on the output of the Read from Spreadsheet File VI and run once to populate the indicator, Right-click create constant, and use that while debugging the code. Dump the indicator and the File Read until you are finished debugging and just use the constant.
Of course your VI carries some extra "weight" around on disk for a while, but it hasn't caused me trouble.
12-10-2010 03:21 PM
@Darin.K wrote:
I usually roll with a quick-and-dirty solution, simply use an array constant until the code is complete. Put an indicator on the output of the Read from Spreadsheet File VI and run once to populate the indicator, Right-click create constant, and use that while debugging the code. Dump the indicator and the File Read until you are finished debugging and just use the constant.
Of course your VI carries some extra "weight" around on disk for a while, but it hasn't caused me trouble.
Rustic. I like it.
12-10-2010 03:42 PM
I often use Darin's method except that I often change the indicator to a control, make current value default, then save. That way it is very easy to change a few data points to test the behavior of the software.
Lynn
12-10-2010 03:59 PM
Quick and Dirty is my middle name - and that techniques works perfectly. Thanks, Darin.