Author Topic: Labview and Python......  (Read 5542 times)

0 Members and 1 Guest are viewing this topic.

Offline SmokeyTopic starter

  • Super Contributor
  • ***
  • Posts: 3885
  • Country: us
  • Not An Expert
Labview and Python......
« on: February 20, 2016, 12:16:46 am »
I was shocked to find out that Labview doesn't have a native way to integrate with python scripts.  It appears the "official" way is just to call a command line window with "System Exec" and run the script independently that way.  It's up to you to figure out how to get the result of the script back into Labview. 
http://www.ni.com/tutorial/8493/en/

The third party LabPython widget doesn't sound like it's supported in the most recent versions of Labview.
http://labpython.sourceforge.net/

And the last option is another third party server thing that wraps  a TCP-IP server bridge around the python scripts and that passes info between Labview and Python.  I was trying to see how much this thing costs, but it's not very easy from their site.
http://jki.net/python-bridge-for-labview

What the hell is the deal here?  How can the Labview guys not have a native interface with arguably one of the top scripting languages?  What am I missing?
 

Offline mtdoc

  • Super Contributor
  • ***
  • Posts: 3575
  • Country: us
Re: Labview and Python......
« Reply #1 on: February 20, 2016, 12:51:10 am »
I don't know the answer but if you haven't already, you might try searching the LabView forum or asking the question there if you don't see it already answered.
 

Offline SmokeyTopic starter

  • Super Contributor
  • ***
  • Posts: 3885
  • Country: us
  • Not An Expert
Re: Labview and Python......
« Reply #2 on: February 21, 2016, 03:00:56 am »
Ya, the Labview forum pretty much just has the same options I listed above.  This is an "official" response from an NI guy late last year saying to call the script with exec and somehow get the output back.
http://forums.ni.com/t5/LabVIEW/Can-i-use-Python-Matplotlib-with-labview/m-p/1687036/highlight/true#M599242

I was more commenting on how I think it's a little ridiculous that they don't have better python integration.  I would think that since python GUI tools are (much?) harder to create complicated automation stuff than the Labview GUI tools that NI would totally embrace python integration.  I don't see it cutting into their sales.

I see better python integration as a win win.  The nerds that actually know how to program get to keep writing back-end scripts in python, and the boss still gets his pretty Labview GUI with a big green clicky GO button to show clients when they visit the factory.
« Last Edit: February 21, 2016, 03:02:40 am by Smokey »
 

Offline cjdubea

  • Newbie
  • Posts: 9
  • Country: us
Re: Labview and Python......
« Reply #3 on: February 20, 2017, 01:24:04 pm »

The third party LabPython widget doesn't sound like it's supported in the most recent versions of Labview.
http://labpython.sourceforge.net/


Sorry to resurrect an old thread, but my interesting using LabView to electronics has piqued recently. Doing some spelunking around, I was unable to find any indication that the LabPython widget wasn't supported.

A good place to check is on Lava's Open-G discussion page: https://lavag.org/forum/47-openg-general-discussions/

cheers,
Chris
 

Offline SmokeyTopic starter

  • Super Contributor
  • ***
  • Posts: 3885
  • Country: us
  • Not An Expert
Re: Labview and Python......
« Reply #4 on: February 20, 2017, 08:19:35 pm »
Good news for everyone.

While I haven't actually checked it out myself, I got an ad about 6 months ago from NI saying they were rolling out native Python integration into new versions of Labview.  You shouldn't have to mess around with hacks anymore... hopefully... 

I would be very interested to hear from anyone that has actually used this new python integration functionality to see if they got it right or if it's so restricted to be un-useful.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->