Whitepaper – OPC and .NET
Copyright ÿ 2001 VISCOM Visual Communications. All rights reserved Page 1 of 13
OPC and .NET
Beta 2 edition
A Whitepaper by
http://www.viscomvisual.com/dotnet/
email to the VISCOM .NET team: dotnet@viscomvisual.com
Version 0.2 2001-07-09 13:29
Trademarks and Copyrights
OPC®, the OPC-Logo and OPC™ Foundation are trademarks of the OPC Foundation.
(www.opcfoundation.org)
Microsoft®, Microsoft .NET™, VisualStudio.NET™ and Microsoft Windows™ are trademarks of the
Microsoft Corporation (www.microsoft.com)
Whitepaper – OPC and .NET
Copyright ÿ 2001 VISCOM Visual Communications. All rights reserved Page 2 of 13
Contents
CONTENTS.........................................................................................................................2
GENERAL PROVISIONS ....................................................................................................3
BACKGROUND...................................................................................................................4
INTERFACE LEVELS..........................................................................................................5
CLASSES............................................................................................................................9
SAMPLE CLIENT APPLICATION.....................................................................................12
FILE LISTING....................................................................................................................13
Whitepaper – OPC and .NET
Copyright ÿ 2001 VISCOM Visual Communications. All rights reserved Page 3 of 13
General Provisions
The ideas, concepts, information, pictures, files and source code provided within this whitepaper
and package can only be used under the following provisions to you ("the User"):
• The User must have a legal license for Microsoft .NET SDK Beta 2 and Microsoft Visual
Studio.NET Beta 2.
• The User never understands this whitepaper and files as part of any standards or products
like OPC or .NET
• The User accepts this whitepaper and files simply as an example for programming with
.NET and OPC.
• The User never shares this whitepaper and files to any others, he simply passes links to our
web site : http://www.viscomvisual.com/dotnet/.
source code and sample limitations
• the user keeps in mind that these are Technology Preview samples based on early beta technologies.
• this source code only shows basic ideas and concepts, but in no way production quality code.
• error and exception handling was left out on multiple areas where in fact required.
• memory leaks will show up.
• any new beta or release version of .NET will break some code.
• theusermusthaveaworking.NETdevelopmentenvironment,
OPCDA 2.0 server+proxies and OPCEnum installed and running.
• Development and testing was done on a Windows 2000 SP2 system, any others may not work.
• OPC with DCOM to a remote machine is not yet implemented.
• the source code assumes some optional interfaces and features as most often provided by OPCDA servers.
• Multithreading / Apartment limitations to be defined...
• while samples show client side use of OPC interfaces, the presented concept could also work for servers,
making it possible to write OPC servers in any .NET language.
• speed/performance comparisons are unrealistic at this beta stage.
Whitepaper – OPC and .NET
Copyright ÿ 2001 VISCOM Visual Communications. All rights reserved Page 4 of 13
Background
OPC is a widely used standard in industrial automation and uses the well established Microsoft Windows
COM/DCOM technology as it’s base.
Within the last few years, a huge base of products building on the OPC interfaces were released from a wide
range of companies in different markets.
With the upcoming Microsoft .NET Framework, there are new concepts of communication between
components and applications, named Remoting and Reflection.
Also in the work are new OPC standards based on XML, but these will provide solutions to somewhat
different problems like internetworking and OS-independence.
In contrast, our focus with this whitepaper is the huge installed base of OPC servers.
The new .NET Framework will provide some interoperability layers and tools to reuse a large part of the
existing COM/ActiveX components, but with some strong limitations.
We think it is an important job to make sure OPC as an excellent standard can immediately be used again
with all the new .NET applications to come. So this whitepaper and samples should help any interested
developers to learn how to keep working on proved solutions.
OPC standards are defined at 'two different layers' of COM/DCOM. First, as a collection of COM custom
interfaces, and secondly as COM-automation compliant components.
So with this whitepaper we will elaborate the use of OPC at this two layers.
Also note the scope of this whitepaper and samples is at the primary OPC standard category, OPCDA (Data
Access).
Conclusion:
.NET is a first class citizen in the Automation World
- 1
- 2
- 3
- 4
- 5
- 6
前往页