From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
You could build your LabVIEW VI into a DLL and easily call that from Python using ctypes.
Attached is a very simple project with two VIs - AddNumbers.vi and SubtractNumbers.vi. You need to create a build specification for a DLL that includes these.
Right Click Build Specifications and select New/Shared Library (DLL)
Change the Target filename to LabVIEWMath.dll (or you have to edit the Python file that I included)
Change the Destination directory to the directory that contains the attached example project (not good practice but convenient here)
Select Source Files
Move AddNumbers.vi to the Exported VIs by highlighting them and clicking the blue arrow
Keep the defaults on Define VI Prototype (make sure you have C Calling Conventions selected)
Repeat the previous two steps for SubtractNumbers.vi
Click Build
Now from a command prompt, change to the LabVIEW example project directory and run the attached script 'Call LabVIEW.py'