01-14-2010
05:43 PM
- last edited on
11-06-2024
05:53 PM
by
Content Cleaner
Hello.
I've spent some time searching for this but I haven't found exactly what I was hoping for.
I'm involved in a project that we're starting now and it involves creating a complex software architecture in order to control a robot. This software will need to perform multiple tasks such as interfacing with hardware (which LabView is perfect for) as well as planning and high performance image processing (which LabView isn't as great for).
I was hoping to be able to use a scripting language like python to manage high level stuff (planning, behavior, etc) by calling "subroutines" in other languages such as C++ for the high performance stuff and LabView VIs for the hardware interfacing. I would also like this to run on Linux.
I've found a lot of suggestions on how to call Python scripts from within LabView but this is not what I want. I want exactly the opposite, invoke VIs from Python. I found some information on how to do this on Windows (https://forums.ni.com/t5/Example-Program-Drafts/Calling-LabVIEW-VIs-from-Other-Programming-Languages...) but this article seems to assume that Windows is being used.
Does anybody have an idea on how to do this?
01-15-2010 02:36 PM
01-16-2010 07:16 AM
Unfortunately that's not an option. This is an interdisciplinary school project involving students from engineering (mechanical, electrical and more), computer science and more fields. Some of these students have gotten used to using Labview and this is the main reason I'm trying to accomplish this. I want to have the higher level architecture done in a scripting language such as python which will enable us to create modules in various different environments such as C++ for tasks requiring high performance (image processing for example), Labview for tasks that the people used to using that and even something running on the GPU if there's use for that. Python would make it easy to glue all these components together while maintaining an environment that would make it very easy to configure the whole software system in different ways.
I'd also prefer that this all run on Linux.
The more I look for this the more hopeless I get I'll find anything which is very frustrating. It's a bit hard to believe that Labview doesn't have "python bindings" for running the VIs from within python 😞
01-16-2010
02:02 PM
- last edited on
11-06-2024
05:53 PM
by
Content Cleaner
I don't know too much about Linux or Pipes, but LabVIEW for Linux has a Pipes API allowing interprocess communication. This won't directly allow you to invoke VIs from Python, but you could set up a very basic Server program in LabVIEW that listens for commands on a certain Pipe. A command could be in the form of "Invoke abc.vi with these input values" or whatever. When functions return they could return their data to an output pipe.
Then just run the Server in the background and have Python talk through the pipes. You could also do the same with a basic TCP Server.