07-20-2011 08:08 AM
Hello everyone,
In my problem I have two computers and one instrument (EIES-IV Guardian Controller from Sigama Instruments). The instrument is controlled over RS-232 by one of the two computers. The Software controlling the instrument supports ActiveX and my goal is now to create an ActiveX communication between LabView running on Computer 1 and the Control-Software running on Computer 2 via an Ethernet Connection.
The Control Software Manual gives the following information: Any program that supports Microsoft's COM (Active X) interface (i.e. LabView) can communicate with the EIES program. A small ActiveX interface program, SQS242X.EXE, provides receive data and transmit data entry points to the global cComm242 class. [...]
From what I understand is, that i also have to copy that exe-file on Computer 1 so that I can select the class in my LabView program with the Automation open VI.Is that correct? If yes where should I add the exe-file to? On computer 2 it is located in the folder C:\Windows\System32. Is that where I want to put it in Computer 1 as well? And do I need to set something in LabView as well?
07-21-2011
04:54 AM
- last edited on
04-30-2025
12:57 PM
by
Content Cleaner
Hi
This topic introduces you to ActiveX and its various uses in LabVIEW.
LabVIEW as an ActiveX Client
When LabVIEW accesses the objects associated with another ActiveX-enabled application, it is acting as an ActiveX client. You can use LabVIEW as an ActiveX client in the following ways:
* Open an application, such as Microsoft Excel, create a document, and add data to that document.
* Embed a document, such as a Microsoft Word document or an Excel spreadsheet, on the front panel in a container.
* Place a button or other object from another application, such as a Help button that calls the other application help file, on the front panel.
* Link to an ActiveX control you built with another application.
For more information please go to: Using ActiveX with LabVIEW
Calling ActiveX Code from LabVIEW
I hope this tutorial helped you.
Houssam Kassri
NI Germany
07-21-2011
05:08 AM
- last edited on
04-30-2025
12:57 PM
by
Content Cleaner
Are you sure you need an ActiveX control to set the comunication between the two PCs? Does a Client/server structure resolve your problem?
What I see from your post is that you need an application that is composed by a server (the computer 2) which talks with the instrument by RS-232 and which publishes the data by TCP/IP network and, a host (the computer 1) which elaborates the data, shows them and stores them to the HD. Is the scenario correct?
If it is I suggest looking at this to begin: Understanding Client-Server structure
I hope it helped you!
bye
PS: I like to receive kudos!!
07-21-2011
10:28 AM
- last edited on
04-30-2025
12:57 PM
by
Content Cleaner
Thank you Houssam and Ricky! I read through the links you provided and found them very helpful to get a broader understanding of activeX and server/client structures, as well as my current problem.
So for my situation it is almost like Ricky puts it: Computer 1 is the client requesting data to store it. Computer 2 is the server which sends the data to Computer 1, whenever Computer 1 requests the data. In my case the software that is running on Computer 2 and that is controlling the instrument is rather complicated, so that I can not avoid using that software. Therefore I hope to use the activeX of the software to access the measurements from computer 1.
I created a VI in which the use of activeX is successfully for the case that the control program and LabView are running on the same Computer. But if I try to communicate between the computers by activex I get the error "The RPC server is unavailable.". (See attached file) So for now I am not sure if using activex over the Ethernet by putting the second computers name (or IP) in the Automation Open VI is working. Is it possible that the Software SQS242X does not support activeX over Ethernet or what could be other reasons for the error?
A solution I am thinking about now is to write another VI to run on Computer 2 that establishes a local connection between the labview VI and the control program by activeX and on the other hand provides a server structure as described here: http://zone.ni.com/devzone/cda/tut/p/id/4433 Unfortunately that seems to be a very complicated solution. So if I could simply use the direct connection between the control program on Computer 2 and LabView on Computer 1 by activeX it would be the better solution for me.
I am thankful for any advice.
Regards
Stefan