LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Darren's Weekly Nugget 10/09/2006

Long shot: are you using a Feedback Node to hold the variant? There is an annoying bug in LV < LV 10 SP1 that really slows down Set.
0 Kudos
Message 21 of 23
(1,035 Views)

Thanks for the response! Actually I am using a local variable and shift registers. This I use for both versions. I attached the two files and all the necessary sub-VIs.

It is very likely that many of the routines I use are very ineffiecient! However, these are the same for the two verions with a string array and variant attributes. So they might be responsible for the overal lack of performance but not for the difference I guess.

 

The idea is to store the variable using the command "set(variablename,variablevalue)" and retreive it via "get(variablename)". The boolean tells you if the variable value has changed since the last call.

 

Thanks for the support, best regards,

Martin 

0 Kudos
Message 22 of 23
(1,028 Views)

All seems to be right in my world.  A few things I took liberties with:

 

1)  Made "real" functional global variables out of the two VIs.  By this I mean I ditched the local, and deleted the control to let the shift register hold the value.  I added a 'clear' command to empty the Shift register in both cases.

 

2) Missing a couple of VIs: GetVarValue and String to Array, I just guessed what they did (simple search and spreadsheet string to array).

 

3) Benchmarked by clearing then feeding in 5000 set(x#,#) commands (set(x0,0), set(x1,1)... followed by get(x#) to retrieve all of the values.

 

VariantBenchmark.png

 

Times are in seconds, no getting around n vs lg(n)

 

 

Message 23 of 23
(1,007 Views)