简体   繁体   中英

Python and Labview

I need to call a Python script from Labview, someone know which is the best method to do that? I've tried Labpython , but it is not supported on newest versions of Labview and I'm not able to use it on Labview-2014. Definitevly, I'm looking for an advice about python integration: I know this two solutions:

1)Labpython: is a good solution but it is obsolete

2)execute python script with shell_execute block in Labview. I think that it isn't the best solution because is very hard to get the output of python script

I think this will be useful: send data from LabView to Python and get back

Also, the easiest way(for me) to communicate with python code from LabVIEW is to send TCP commands from LabVIEW to Python and back.

Why not use the System Exec.vi in Connectivity->Libraries and Executables menu?

You can execute the script and get the output.

Check out TestScript: a free, source-released Python/LabVIEW connector . It's fully bi-directional, including arguments and is compatible with LabVIEW 2013 and later, and Python 3.

You can save Python script as a large string constant(or load from text file) within the LabVIEW vi so that it can be manipulated within LabVIEW and then save that to a text file then execute the Python script using command line in LabVIEW. Python yourscript enter

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM