Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
4 ratings:
 3 out of 5     Rate this Document

How Do I Launch a LabVIEW Executable Remotely Using ActiveX/DCOM?

Primary Software: LabVIEW Development Systems>>LabVIEW Base Package
Primary Software Version: 5.0
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
I can communicate with LabVIEW using DataSocket and the Web Publishing Tool. However, I'm having trouble setting up an ActiveX control using DCOM with my executable. How do I launch a LabVIEW executable using ActiveX/DCOM?

Solution:
When you build the executable in LabVIEW, you must make sure the Enable ActiveX Server option is checked on the Advanced section in the My Application Properties dialog, as shown below.  Open this dialog from the Project Explorer window under Build Specifications»New»Application (EXE).



When the application is built, LabVIEW will build the .exe file and a .tlb file. The .tlb file needs to be copied to the remote machine along with the .exe file. The .tlb file opens an access point for the remote machine. Run the executable once on the remote machine to register it.

Follow these steps:
  1. Open a reference to the .tlb file on the local machine (the machine you want to control the launch). Use the Automation Open VI.
  2. Right Click on the Automation Refnum input to the Automation Open VI, and Select ActiveX Class»Browse.
  3. Browse for the .tlb file on the local machine.
  4. Enter the remote machine's IP address in the Machine Name input of the Automation Open VI.
  5. Place an Invoke Node on the block diagram and wire the Automation Refnum output of the Automation Open VI to the input of this new Invoke Node.
  6. Select GetVIReference as the invoke node method.
  7. Place another Invoke Node on the block diagram and wire the output of GetVIReference to the input of this new Invoke Node.
  8. Select Run as the new Invoke Node action.
For more information, see the ReadMe file included with the Developer Zone Example in the Related Links section below.

Related Links:
Developer Zone Example: Remote Control (Launch) of LabVIEW Using ActiveX/DCOM
KnowledgeBase DIRECT-3S8RNX: What Is DCOM and How Do I Install It?

Attachments:





Report Date: 11/17/2003
Last Updated: 04/22/2009
Document ID: 33GBN31E

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit