LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling Python Function in LabVIEW

Hi,

 

I have a function written in Python that I would like to use in real time in LabVIEW. The function requires a few inputs, which LabVIEW is receiving through a DAQ system. Is it possible to call that Python function in LabVIEW, giving it inputs and receiving output data in real time?

 

Essentially the VI is acquiring pressure and weight data and the function uses pressure and weight to calculate different masses, and I would like to output those masses on the front panel in real time if possible.

 

Thanks!

0 Kudos
Message 1 of 4
(3,739 Views)

What version of LabVIEW are you using?

 

2018 comes with build in Python functions:

http://zone.ni.com/reference/en-XX/help/371361R-01/glang/python_pal/

0 Kudos
Message 2 of 4
(3,700 Views)

"The Python Node is not supported on real-time or FPGA targets."

If you by real time mean in a running LV program, it can work, if you mean on a RT target, then no.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 4
(3,689 Views)

@Yamaeda wrote:

"The Python Node is not supported on real-time or FPGA targets."

If you by real time mean in a running LV program, it can work, if you mean on a RT target, then no.

/Y


Good point, I got a PC vibe from the "using DAQ system" remark.

 

On a RT target that support Linux, I guess the command line is still an option? Not sure how that would work with passing parameters. Probably not the most efficient thing to do...

 

0 Kudos
Message 4 of 4
(3,679 Views)