OmarGator
2007-06-20 17:10:12 UTC
I am trying to use "Functional Globals" to set up a device driver for a device via a .net driver.
The VI in its init state calls the Constructor Node, but the next time the VI is called the .net Refnum is No Longer Valid from the uninitialized shift register.
Screen shot 1:Run the VI the first time and get a valid .net reference.
Screen shot 2:Run the VI a 2nd time and the uninitialized shift register still contains the pointer to 0x81C00001, but the Refnum is No Longer Valid.
This technique of using uninitialized shift register work for other type of references. It seems that LabView is "helping" me out by clearing my reference when the VI exits.
We had a simular problem with DACmx that is solved by a low level setting telling LabView not to clear refnum on it's on but wait for the close command. Is there also something like that for .net?
Thanks
Shot1.JPG:
Loading Image...![](https://comp.lang.labview.narkive.com/kRhGTeKS/refnum-is-no-longer-valid:i.1.1.thumb)
Shot2.JPG:
Loading Image...![](https://comp.lang.labview.narkive.com/kRhGTeKS/refnum-is-no-longer-valid:i.1.2.thumb)
The VI in its init state calls the Constructor Node, but the next time the VI is called the .net Refnum is No Longer Valid from the uninitialized shift register.
Screen shot 1:Run the VI the first time and get a valid .net reference.
Screen shot 2:Run the VI a 2nd time and the uninitialized shift register still contains the pointer to 0x81C00001, but the Refnum is No Longer Valid.
This technique of using uninitialized shift register work for other type of references. It seems that LabView is "helping" me out by clearing my reference when the VI exits.
We had a simular problem with DACmx that is solved by a low level setting telling LabView not to clear refnum on it's on but wait for the close command. Is there also something like that for .net?
Thanks
Shot1.JPG:
Loading Image...
Shot2.JPG:
Loading Image...