08-26-2005 09:34 AM
08-26-2005 09:40 AM
08-26-2005 09:48 AM
Thank you for your help....In some languages I've used, you have to initialize everything because a variable's value is whatever was leftover in that memory space from the last time the memory was used.
Grub
08-26-2005 10:02 AM
You can trust that you won't have junk, because LV takes care of the memory handling. The fact that USRs hold their data even when the VI is closed can be used to move data. If you have a non-reenrant VI with a USR you can call it from several places in your code and you are guranteed not to have race conditions because the calls are serialized. Once the VI was called from one place, all other calls will have to wait until the first VI releases the VI. This is called a LV2 style global.
You should note that the value will be held as long as the VI is in memory (it is only released when you close the VI calling it).
08-26-2005 10:09 AM
08-26-2005 10:35 AM
08-26-2005 10:47 AM
08-27-2005 04:59 PM
08-29-2005 07:13 AM
I tried this method and it works great...no more race conditions or data swapping from concurrent calls to the same subvi. Thanks for the tip....
Grub