LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you pass an ActiveX Variant from an external application to LabVIEW?

Background: I created a LabVIEW ActiveX server. I can access it with my external application (Matlab). I have a control variable in my LabVIEW executable. I want to use Active X to set the value of my control variable from my external application.

 

 

Documentation: The only reference in the documentation for this task is in the Using ActiveX with LabVIEW in the LabVIEW 2009 help. It simply says "Use the variant control and indicator to pass data to or from ActiveX controls." I also went through all the ActiveX examples in the example finder and did not find any vis that passed variables using ActiveX.

 

Questions:

    • What should my control variable look like in LabVIEW? Should it be a refnum, a variant, or a data type? Does it have to be wired to a vi connector?

 

  • Do I need to do any magic on this variable, such as change its properties?
  • How do I pass the value from my external application to the variable in my LabVIEW executable?

 

Thank you.

0 Kudos
Message 1 of 2
(3,124 Views)

Hello Lyn,

 

 The control variable should be a refnum and it would have to be wired to Automation Open with the correct reference.

Here are some great examples of using ActiveX Server in LabVIEW

 

LabVIEW Executable Used as ActiveX Server in LabVIEW

https://forums.ni.com/t5/Example-Code/LabVIEW-Executable-Used-as-ActiveX-Server-in-LabVIEW/ta-p/3527...

 

 Calling ActiveX Code from LabVIEW

 https://forums.ni.com/t5/Developer-Center-Resources/Calling-ActiveX-Code-from-LabVIEW/ta-p/3522394

Andy Chang
National Instruments
0 Kudos
Message 2 of 2
(3,094 Views)