LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Python integration with loops

I have a bit of python code which loads a large model (for machine learning) and then performs classification on image data.  I want to grab the image data from a camera in IMAQ and feed that into a python node.  This works just fine.  However, I do not want to load the model each time I call Python.  I want to load the model once outside of a loop and then call python each time I want to perform analysis on my image data inside the loop.  However, I have no idea how to pass python data from one node to another.  I suppose I could pass the python data to LV and then from LV back to python, but, again, this seems complicated since LV has limited options for data types.  I'm wondering if this is just a fundamental limit of what can be done with the python functions in LV or whether there are other packages out there (e.g. TestScripts) that have this capability to pass information between different python functions.

0 Kudos
Message 1 of 2
(1,928 Views)

If I gave a vague "hand-waving" example of the code I was writing that didn't quite do what I wanted and asked for help without providing the code in a form that could be studied and executed, I wouldn't expect to get much useful information helpful to me.  [That's a hint -- take the code in question, which I hope is contained in a LabVIEW Project and lives in a Project-specific folder, which means you can compress the Folder and get a single .zip file containing all of the relevant VIs, and attach it, along with an example of the Python code that uses the LabVIEW data, and we may be able to do more than "hand-wave" back to you.]

 

Bob Schor

0 Kudos
Message 2 of 2
(1,862 Views)