02-13-2025 10:08 AM
I'm guessing the answer to my question is "No", but I figured I'd ask it here in the hope that someone with more experience has a different answer.
I'm using the LabVIEW Python node to call functions that communicate (control and data) with an instrument. The Python SDK is supplied by the vendor.
As is typically done, the Python SDK has a method which instantiates an instrument object and uses the instance to open a connection. This instance can be returned from the method to be used by other methods, thereby using the same open connection.
lynx = DeviceFactory.createInstance(DeviceFactory.DeviceInterface.IDevice)
...
...
return lynx
But in the case of the LabVIEW Python node, I don't think I can use the returned instrument object in LabVIEW, since the Python node expects me to specify a return type, and I don't see what standard LabVIEW type I can use for a random instrument object.
02-13-2025 11:58 AM
no easy solution come to mind. possibly caching that instance on the python side with a "wrapper script" and interact with the SDK via other functions (that you may have to also write wrapper around if they need that instance as well). Note: I asked "Jake AI" and it offer additional suggestions.
02-13-2025 12:39 PM
Thanks for your reply. The "Jake AI" tool looks interesting and helpful.