Switch Hardware and Software

cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid Switch Executive References (once in while)

Hi there,
 
a colleague of mine is using a self-written little LV-sequencer to do UUT testing. At the beginnig of his "test sequence" he opens the corresponding SE-Session and does not close it before having performed the last test on the last UUT. He takes the reference form the Open Session-VI and puts it in a global variable. When switching, he accesses this global in order to get back the reference and put it to the Open / Close Routes-VIs. Every once in a while, the SE-VIs return an error: the reference is not valid.
So we tried to do a workaraound: after read access, the refernece is checked using the LabVIEW "Not a refnum"-VI. If the ref should be void, we wanted to re-open the SE session. To keep it short.... nice idea, but we failed..... Smiley Sad
In order to getting the SE to work again, we even have to shutdown LabVIEW!
 
I remember seeing a phenomenon (invalid references) like that with TestStand 3.1 and SE2.0. But only on very rare occasions, so I decided to ignore that Smiley Wink
 
We're using WinXP, LV 7.1.1, SE2.1.
 
Any ideas?
 
Cheers
Oli
0 Kudos
Message 1 of 5
(7,705 Views)
Oli:
 
It sounds like your global variable is getting unloaded from memory, causing the ref num to become invalid.  Try this: Create a new VI, call it something like NISEGblKeepAlive.vi.  Make it call Open VI Reference and wire the path to your global variable vi to its vi path input.  Then make it call an Open FP invoke node and wire the Hidden state to its State input.  Run NISEGblKeepAlive.vi once and then close it.  Your global variable vi should stay in memory.  So then you can call your existing VIs that write and read to the global variable.  But, now the global will unload only on exit of LabVIEW.
 
Brian
 
Message 2 of 5
(7,690 Views)
Hi Brian,
 
up to now, your tip seems to have fixed the porblem, thank you very much! The first overnight-test looks promising.Smiley Happy
 
Do you have an idea, why LabVIEW wants to unload the global from time to time? I'm a bit confused that this only happens only every once in a while....
 
Cheers
Oli
 
 
 
 
0 Kudos
Message 3 of 5
(7,671 Views)
Oli:
 
Without the keep alive scheme, LabVIEW will unload your global if you no longer have any vis open that reference it.  To ensure the global stays around, you would have to keep open at all times at least one of your vis that use the global.  This is cumbersome because there is a good chance that while performing operations in LabVIEW, you want to close out your vis and start fresh.  So every once in a while you end up with an unloaded global.  I hope this helps in understanding what LabVIEW is doing.  The keep alive scheme I outlined should allow you to avoid the cumbersome behavior.
 
Brian
Message 4 of 5
(7,665 Views)
Thanks for the explanations, Brian!
 
Oli
0 Kudos
Message 5 of 5
(7,661 Views)