Technology Brief - ActiveX/COM
Overview
ActiveX technology started as another name for Visual Basic custom controls. Now, ActiveX has spread throughout Microsoft's tools, from operating systems to desktop productivity tools to development tools. This means that ActiveX is becoming a bigger part of measurement and automation applications, so much so that you are probably already using some form of ActiveX technology right now without realizing it.
Table of Contents
Overview - ActiveX/COM
- A property is an individual setting for a control, such as SamplingRate for a data acquisition (DAQ) control.
- A method is a function that is called on the control to perform an action, such as AcquireData on a DAQ control.
- An event is a message that a control fires to alert the outside world that something happened, such as a DataReady event when a waveform has been acquired with a DAQ control.
OLE - Object linking and embedding - the technology enabling compound documents, such as inserting and editing a Microsoft Excel spreadsheet directly within a Word document. In the past, Microsoft used the term OLE to promote their COM-based products and technologies. Today Microsoft primarily uses the term ActiveX instead of OLE, except when referring to compound document technologies. Because OLE was prevalent when the OPC Foundation was formed, the foundation maintains the explicit reference to OLE.
When will ActiveX/COM become important for computer-based measurement and automation?
Today, all of the popular development tools work with ActiveX. This gives you the ability to use ActiveX servers and controls (a.k.a. COM objects) from development environments such as LabVIEW, LabWindows/CVI, Visual C++, and Visual Basic. You are using Visual Basic today, you commonly use ActiveX controls such as the ComponentWorks set of controls for data acquisition, data analysis, and data presentation. In other development environments such as LabVIEW and LabWindows/CVI, ActiveX objects are used less frequently and are typically mixed with software objects packaged as dynamic link libraries (DLL), and standard LabVIEW VIs.
How does ActiveX/COM impact computer-based measurement and automation?
To date, the largest impact of ActiveX/COM has been from the OPC Foundation. The OPC Foundation has defined a set of standard COM interfaces for industrial control and data acquisition devices. Most suppliers of industrial data acquisition and control products now work with OPC. Products are either OPC clients or OPC servers. Examples of OPC servers are the NI-DAQ device driver for National Instruments data acquisition hardware and BridgeVIEW (LabVIEW for Industrial Automation) OPC clients include most human-machine (HMI)/SCADA software products including Lookout, BridgeVIEW, and LabVIEW. Several instrument vendors of test and measurement equipment are also developing ActiveX interfaces for their instruments. National Instruments, as part of the IVI Foundation is chairing a sub-committee to define ActiveX/COM interfaces for IVI instrument drivers.
What should you do to take advantage of this technology?
ActiveX/COM technology is very powerful and useful, but also very difficult to develop. Consequently, the best way to take advantage of this technology is to use products from vendors that fully support this technology. All of the National Instruments development tools, LabVIEW, LabWindows/CVI, ComponentWorks, and TestStand, take full advantage of ActiveX/COM. And, through ComponentWorks, National Instruments measurement and control hardware products have ActiveX control interfaces.
Reader Comments | Submit a comment »
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
