njsss Posted January 4, 2012 Report Share Posted January 4, 2012 I have a labview code to control instruments (camera, lights, etc), and am learning to use Panda3D (programming in python) to build a simple 3D game/animation. Usually at the end of the script there's run() function to start the rendering the 3D scene. I can execute the .py with the "system exec.vi", but how to bridge a communication between the two? Basically what I want is to synchronize certain events inside the two programs, just like what LV does with queue/notifier. Thanks, Quote Link to comment
asbo Posted January 4, 2012 Report Share Posted January 4, 2012 It doesn't appear to have structured event/messaging capability, but check out the LabPython extension - at the very least, it will let you get/set variables within your Python session. Quote Link to comment
njsss Posted January 4, 2012 Author Report Share Posted January 4, 2012 Can it do so with the python still running? Quote Link to comment
Popular Post Ton Plomp Posted January 4, 2012 Popular Post Report Share Posted January 4, 2012 I've never used it, but I've seen rabbit MQ code in Python and LabVIEW as well. RabbitMQ is a message broker, so should be able to bridge the gap. Ton 3 Quote Link to comment
njsss Posted January 5, 2012 Author Report Share Posted January 5, 2012 Ton, It's sooooo awesome! I just tried, it works. You saved my day sir! Thanks! Quote Link to comment
Rolf Kalbermatter Posted February 7, 2012 Report Share Posted February 7, 2012 Can it do so with the python still running? Well LabPython simply loads the Pythonxx.dll and instantiates a session. As such it will work with Python still running. But it will not be able to communicate with anything in the Python process automatically, as each Python sessions is in fact a separate Python environment. If you need to communicate between a Python session and a session created through LabPython, you have to setup explicit inter-application communication, especially since LabPython runs in the LabVIEW process, while Python runs in its own process, so process memory protection applies fully here. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.