*Windows Alarming

If you do not have a copy of Visual Studio you can download a free version of Visual Basic Express 2010 or C# Express 2010 from www.microsoft.com/express.  If you have no experience with either Visual Basic or C# choose Visual Basic.  No programming is required to use OPC Windows HMI.NET.

If you are new to Visual Studio and want to implement HMI Quick Start Templates view the following videos.

WinForm Multi-Document Interface: https://www.opcsystems.com/vs2010templateswinformmdi_video.htm

WinForm Tabbed Interface: https://www.opcsystems.com/vs2010templates_video.htm


The following steps can be used to add an alarm window to a C#, C++, or Visual Basic.NET application.  All properties are programmatically accessible.  The following example demonstrates the alarm window with no code required.  You can use Visual Studio 2005, 2008, or 2010.  The alarm window can also be used with Visual Studio 2003 with the older .NET Framework 1.1 version of OPC Systems.NET.

View the following short video on how to add an alarm window to a WinForm or WPF application.






Start Visual Studio 2005, 2008, or 2010 and select File->New->Project to create a new C#, C++, or VB.


Select Windows Application as the project type.

Note: If using Visual Studio 2010 set the Target Framework to the full version not the Client Profile.




From the Toolbox if OPCAlarmControl 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 OPCAlarmControl and then select OK.


Add the OPCAlarmControl component onto the Form.

Resize both the form and alarm window to the desired size.


Right click on the alarm window and select Properties.


Set the Anchor property to Top, Bottom, Left, Right.


Expand the AlarmFilter property and set the desired filter settings for the alarm window.


Select the AlarmNetworkNodes property and click on the small grey square with the 3 dots at the right.


Select all network nodes you wish to receive alarms from to this alarm window.

Note: If you want the application to be deployed across a network to remote PCs select the Network Node or enter an IP Address in the NetworkNode field and use the Select button to include the network node or IP Address of the OPC Systems Service source.  Refer to the VB.NET Example on how to programmatically assign the Alarm Network Nodes.


If you desire for the operators changes to the alarm window during runtime to remain set the ConfgiurationFile property to a valid file path.  Make sure each system the application will run on that the directory path is valid.

Note: If you set this property to a file make sure you deploy the file with the application in the directory you specify..

Leave this property blank if you wish to have the default properties set during configuration remain on the application restarting.


Set the compile mode on the Visual Studio toolbar to Release.


Select Build from the VS menu and select to Build the application.


Use Windows Explorer to browse for the application located in the bin\Release directory and run the application.


To deploy the application to remote nodes first make sure the AlarmNetworkNodes selection as described in step 9 is set to a Network Node or IP Address.  Then simply copy the files in the bin\Release directory to the target systems or follow the Smart Client deployment section in this help file to deploy your application using Click Once Deployment.

Continue: *Web Alarming