06-09-2009 11:02 AM
All,
I'm looking to script LabVIEW for controlling it externally (from python, c or something else), what are my options? I'd prefer a simple COM or C interface, are these available? Where's the documentation? Where's the documentation of the VI Server TCP/IP interface?
- Ken
06-10-2009 09:36 AM
You can use VI Server (ActiveX) or create a dll from the LabVIEW code.
The documentation for everything is in the LabVIEW help. Start by looking up the topic 'VI Server'.
Why exactly are you trying to control LabVIEW from another application?
06-14-2009 03:38 PM
Hi xkenneth,
What parts of LabVIEW are you trying to access externally? Are you trying to just run a VI or certain drivers or functions within LabVIEW? What is your application where you need to do this?
Thank you for choosing National Instruments.
Aaron Pena
National Instruments
Applications Engineer
06-14-2009 03:43 PM
06-15-2009 11:57 PM
Hi xkenneth,
At this time, there is no supported way of accessing these types of LabVIEW functions (build project, etc.) via a scripting language such as Python. I apologize for this inconvenience.
Aaron Pena
National Instruments
Applications Engineer
06-16-2009 12:36 AM
What about the COM interface? Where is that documented?
I suppose I could write a LabVIEW app and compile it that could script this?
- Ken
06-16-2009 01:28 AM
xkenneth wrote:
What about the COM interface?
Do you mean a UI or a COM DLL by this term?
You can call a COM DLL in LV, but you wont get its functions listed inside the Configuration dialog of the Call Library Function (CLF) node, unlike with other normal DLLs built using C, C++ or VC++, I think...
06-18-2009 11:18 AM
xkenneth wrote:
Well, I'd love to be able to control anything that you could normally with the VI server using Python. For instance it would be great if I could write a script in python to open LabVIEW, open my project, build it, etc, so that I could easily integrated LabVIEW code into my continuous integration server.
Hi xkenneth,
If you're looking to programmatically build an executable, check out the following links:
http://zone.ni.com/devzone/cda/epd/p/id/5051
http://zone.ni.com/reference/en-XX/help/371361E-01/lvhowto/build_exe_prog/
These talk about writing a VI that can programmatically build an executable which can then be called via command line with parameters.
Thank you for choosing National Instruments.
Aaron Pena
National Instruments
Applications Engineer