LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Refnum is No Longer Valid

The solution I ended up using, is the one suggested by MikePorter.
 
I stopped using the abort button, and instead i created a stop button in the top vi, that initiates a proper shutdown sequence.
This shutdown sequence includes a refnum close on the .net refnum. This makes it possible for me to restart the labview program without exiting.
 
NI says that it will be fixed in labview 8.5.
 
Hope it helps.
0 Kudos
Message 21 of 23
(1,800 Views)
samwarr12, I'm going to guess that your .NET interface is really an interop layer ontop of some other driver layer (COM, C interface) that your USB camera maker provides. The reason this is important is because in a non-.NET world, correct cleanup is usually much more important as you're dealing with device connections, etc.

Again, what is likely happening is that your driver may not handle the restart of the application without the process closing. This is the common scenario for languages other than LabVIEW - so if you close your refnums and then initialize the system again - all without restarting - the driver is likely to get confused as it never fully cleaned up.

If you are comfortable with VB or C#, you could validate this with a simple program against the USB driver that "closes" the USB driver as you do in LV and then initializes it again - all in the same go. If this fails to work, you have something with which you can contact their tech support about.
0 Kudos
Message 22 of 23
(1,773 Views)

Thanks TXT,,,i got the solution from your thread......

0 Kudos
Message 23 of 23
(1,145 Views)