LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

can i run python script using labview ? does LabVIEW compatible with python?.

can i run python script using labview ?

does LabVIEW compatible with python?.
0 Kudos
Message 1 of 7
(8,866 Views)
There are a few ways to work with Python from LabVIEW...

1. Use command line execution to run the script. Not the greatest but it is the most straight forward.
2. If the Python engine has a flexible DLL interface to load, execute and query scripts, you can use the Call Library Node from LV to interact with the engine.
3. If you can use IronPython.NET, you can run the compiler to generate .NET code and then access it via LV's .NET API.
0 Kudos
Message 2 of 7
(8,861 Views)


@Lycangeek wrote:
There are a few ways to work with Python from LabVIEW...

1. Use command line execution to run the script. Not the greatest but it is the most straight forward.
2. If the Python engine has a flexible DLL interface to load, execute and query scripts, you can use the Call Library Node from LV to interact with the engine.
3. If you can use IronPython.NET, you can run the compiler to generate .NET code and then access it via LV's .NET API.




Another option might be looking into LabPython on http://sourceforge.net/projects/labpython/

I haven't done anything with it lately and interest from others seems not very great (which also is one reason I didn't do much for it anymore) but it seems to work for the few who use it.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 3 of 7
(8,846 Views)
0 Kudos
Message 4 of 7
(8,722 Views)

Hi Brian,

Took a look at your blog post... it is awesome!  Thanks for sharing this with us. 

I noticed one thing though:  the GetVIReference method was giving an error saying the VI I am trying to open the reference to was newer than the current version.  I was obviously running all this in 8.0.  But, as I figured a moment later, when I was playing with this I also had LV7.1 running and it was started prior to 8.0. 

So, the GetVIReference appeared to be using the 7.1's run-time.  Supplying it a 7.1 VI's path, it worked fine. 

Thanks again..  I didn't want to post this "support"-like comment on your blog, hence posting here. 

-Khalid

PS:  also, being a stickler that I am Smiley Tongue, you probably meant the ratio would be high when you said "..you can do this with LabVIEW using the property nodes, but I must confess that the ratio of pixels to instructions can get pretty low in some cases."

Message Edited by Khalid on 03-21-2006 01:52 PM

0 Kudos
Message 5 of 7
(8,714 Views)
Douh! Yes, I did indeed mean high...'scue me while I go edit my blog... 🙂
0 Kudos
Message 6 of 7
(8,702 Views)

Hi,

 

I am trying to add search paths and dll's for executing a python script. So for this I am using the SetSearchPath method.

For this not i am unable to input the path by adding the path into a IList(since the paths input is of ICollection .net refnum).

 

Can you please help me with this. Also i have attached the VI.

 

 

Thanks and regards,

Yogesh 

0 Kudos
Message 7 of 7
(7,342 Views)