06-10-2018 12:18 AM
I am not being very clear, my fault.
But having different VIs or a "main" VI calling many SubVis doesn't work. Also the problem isn't passing data to TestStand but executing VIs sequentially and having their references (constructors) passed through each VI properly. As Gabriel said, we want to be able to call a "connect" vi, then call many times a "get" vi that uses the constructor of the "connect" vi, and then a "disconnect" vi.
Again, thanks for your attention cbutcher!
06-10-2018 05:14 AM
Ah - perhaps the problem is my use of the term subVI. I only mean a VI that I'd commonly consider a sub-part of the whole.
In LabVIEW (at least on desktop targets) there's no difference between an "VI" and a "SubVI" in the cases that I'm using the terms. It should be perfectly possible to call these 'subVIs' as top-level/independent VIs in the same way as you would call a 'main' VI.
Does that clarify at all? It's definitely possible I'm still missing the problem...
06-10-2018 03:39 PM
I've got this to work successfully many times using a multitude of architectures including SubVIs. I didn't see it in the listed posts but - what was the error that was produced (assuming you received one)?
Also I wonder how you are running your VIs in the end. Bear in mind that running a VI interactively in the IDE (eg. with the run button) runs it as a top-level VI and, when its stopped, all references are released and that includes pinned .NET references (the AppDomain is released). Make sure you are trying this out in a "main" VI that performs the connect, multiple "gets", then disconnect so that references are only forcefully released when "main" is stopped.
Otherwise this is really a case of "show us all the code", or a working example you are comfortable with that we can assist in debugging.
06-16-2018 11:29 AM
Hey guys,
I just realized that is a TestStand problem, the modulated code works on Labview, but I need to know how to make it work on TestStand, about not losing its references and etc. I will try to ask on the other forum. I appreciate all you help!