Joel asked (paraphrased):
If a VISA session is opened in a dynamically loaded VI and stored in a global,
why does it become invalid when the dynamically loaded VI finishes? Is it
because when the dynamically called "init.vi" exits, it unallocates any VISA
sessions it has opened?
Yes.
Is there any way to implement a similiar structure which will keep the VISA
session open?
Maybe. Though I haven't tried it, there is a preferences selection for when
LabVIEW releases the VISA RefNum. Edit -> Preferences -> Miscellaneous ->
Automatically close VISA session . Make sure it is not selected. I am not
sure if this works for a built application or not.
I hope that this helps,
Bob Young