*Web Alarming

If you do not have a copy of Visual Studio you can download a free version of the Web Designer Express from www.microsoft.com/express.  No programming is required to use OPC Web HMI.NET.

The following steps can be used to add an alarm window to a C#, or Visual Basic.NET web application.  All properties are programmatically accessible.  The following example demonstrates the trend window with no code required.  The trend window can also be used with Visual Studio 2003 web applications if you use the older OPC Systems.NET 1.1 Framework version.

View the following short video on how to add an alarm window to a web application.


View the following detailed video for all properties of the OPC web alarm control.






Start Visual Studio 2005, 2008, or 2010 and select File->New->Web Site to create a new C# or VB ASP.NET web application.


Select ASP.NET Web Site and specify your desired Language in the lower right.

Set the Target Framework to 3.5 or 2.0.


Expand the Default.aspx web page in the Solution Explorer and select View Designer.

Note: If you do not see the Solution Explorer select View->Solution Explorer.


From the VS menu select Layout->Position->Auto-position Options.


Note: You are welcome to use any positioning style you desire.  If you are new to web development you might want to use absolute positioning.



From the Toolbox if OPCWebAlarm, OPCWebControlsLabel, and OPCWebRefresh is not available right click in the Toolbox and select Choose Items.  If it is available to step 4.

From the .NET Framework Components select OPCWebAlarm, OPCWebControlsLabel, and OPCWebRefresh and then select OK.


Add one OPCWebRefresh control to the WebForm.

Add one OPCWebControlsLabel control to the WebForm and then delete it.  This is the easiest way to ensure that the web.config file is update for proper AJAX registration.


Add the OPCWebAlarm component onto the WebForm.

Resize the alarm window to the desired size.


Right click on the alarm window and select Properties.


Specify the alarm types you desire to view in the alarm window.


Use the AlarmNetworkNodes property to specify all OPC Systems Services you wish to receive alarms from.


Specify what alarm columns you wish to see in the alarm window.


Use the Groups, Include, Max and Min Priority properties to filter what types of alarms will be viewed in the alarm window.


Set the PageEnable property to True if you desire to limit the size of the alarm window.


Right click on the WebForm and select View in Browser.


Set the application for Release mode, modify the web.config file to set the debug property to false, and build your application.  Typically the application files are under the Inetpub\wwwroot directory.

Refer to the OPC Web Alarm.NET section in the OPC Systems.NET help file for Deployment steps if you encounter any issues.

Continue: Configure Data Logging