views:

71

answers:

3

I have a front LabView front panel controlling switches and sensor voltage adjustors to the hardware and need to control these with Python script. I do not have much knowledge of LabView. Please explain how this could be done. Thanks in advance for your help !

A: 

It still requires a little bit of LabVIEW knowledge, but there's an open source tool called LabPython that allows you to embed Python scripts in a LabVIEW code block. This is probably the first route that I would explore.

Bill the Lizard
A: 

You can also push data between LabVIEW and Python using Mark E. Smith's excellent XML-RPC package.

Underflow
+1  A: 

I found one reference on the LabVIEW discussion board that succeeded in this, it uses the following code:

import win32com.client //load the interface
labview = win32com.client.Dispatch("Labview.Application") //get a ref to the Labview application
VI = labview.getvireference(r'C:\TEMP\python.vi') //load the VI
VI.setcontrolvalue('Numeric','5') //set the control 'numeric' to 5

It seems like you need the win32com.client library in Python.

Ton