Slik-DA - C# - Simple OPC Server
Do you have an example OPC Server created in Visual Studio .NET 2008 with C#?
Below are example OPC Servers in C#.
This solution was created in VS2008, but can also be upgraded to VS2010.
Simple OPC Server
A basic OPC DA and UA Server using SLIK-DA with UA. It is a Windows Form application that implements the minimum required to create an OPC Server. It is well documented and should be easy to follow.
This sample shows you how to:
- Register/unregister the server
- Create a tag database and add tags to the database (using sample tags with simulated data)
- Set the Read/Write Access of a tag
- Gracefully shut down the server
- Handle a client connect/disconnect
- Handle a client Read/Write call to the server
Advanced OPC Server
This example will show you how to:
- Use Tracing to log messages
- Register/Unregister the server through the command line
- Handle a client call to OnRead, OnWrite, OnWriteVQT, and OnTrace methods
- Display statistics to the user, such as: the number of clients connected, number of requested items, number of data change notifications, etc.
Windows Service OPC Server
A sample Windows Service OPC DA and UA Server using SLIK-DA with UA. An updated version of this can be found at C:\Program Files (x86)\Software Toolbox\SLIK-DA5\Samples\VS2017\dotNet\C#\C# Windows Service
Since the SLIK-DA is an ActiveX control, it must exist on a form. You can create a background service, but you must also include a WinForm with the control. This WinForm can be hidden.
This example project shows you how to:
- Register/Unregister the server
- Start/Stop the server
- Handle a client call to OnRead and OnWrite methods
- Handle a client connection