LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Python node - Instrument connection object in LabVIEW?

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. 

 

 

0 Kudos
Message 1 of 3
(93 Views)

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.
ksnip_20250213-095516.png

0 Kudos
Message 2 of 3
(69 Views)

Thanks for your reply. The "Jake AI" tool looks interesting and helpful. 

0 Kudos
Message 3 of 3
(45 Views)