To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This is example code that takes two inputs in LabVIEW and adds them together. The VI is then called and controlled using Python.
Description
The LabVIEW code is called in Python and the front panel is controlled using ActiveX calls from Python. The output is then displayed using Python code. This code uses VI Methods and the VI Server with ActiveX enabled to control a LabVIEW VI from Python.
Requirements
Software:
LabVIEW 2012(or compatible)
Steps to Implement or Execute Code
Additional Information or References
VI Block Diagram
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Great example! Here's a question. Lets say the main VI opens a SubVi. Is there a way using ActiveX that I can connect to the running SubVi and then call "setcontrolvalue" on some of the controls in the SubVi?
Thanks
Hello - thank you so much for posting this example! What are the benefits/trade-offs with the posted approach vs. (https://github.com/ni/python_labview_automation) developed by a NI engineer. Essentially, it allows you to interface with LabView control values and indicators.
I would like to know so I can consider which best meets the needs of a project that I am working on.
Thank you!
Winston