Using Industrial Gadgets .NET with OPC Data Access Servers
Tying your Industrial Gadgets .NET to tags on your OPC Data Access server is an easy and simple process. In fact, it can be done without having to write a single line of code by using your OPC Server and our Software Toolbox Extender product.
This example will show you how it's done.
This example assumes that you have an OPC Data Access server and our Software Toolbox Extender already installed. Since we will be connecting to a MicroLogix 1500, we will use the Software Toolbox TOPServer OPC Server as our example OPC Data Access Server.
Drop your Industrial Gadgets .NET components on your form. In this example, we will use the LED Display.
Drop a Software Toolbox Extender Engine and Extender component onto your form.
First, locate the Extenders on your Visual Studio Toolbox.
For this example, we will use the OPC Data Control Engine and the Subscription Extender, which will tell the OPC server to
automatically poll our device. Drag the SwToolboxOPCDataControl1 and SubscriptionExtender onto your form.
You will also set the DefaultServer property of the Engine to point to your OPC Data Access server, in this case the Software Toolbox TOPServer OPC Server.
...and finally you will set the Engine property on the Extender to point to the OPC Data Control Engine.
For more information on how to use the Extender and the Engines, please see our Software Toolbox Extender web site.
Now we tie in the OPC Data Access Server tags to the symbols. To do this, go to the properties of the Industrial Gadgets
.NET Standard Control (the Pump in our example), and click on the ellipses on the Subscriptions property.
You will then be able to tell the Extender which tag in the TOPServer OPC Server points to which property on the Industrial Gadgets .NET control. In this case, we have a tag in the OPC server called "
Channel1.Device1.N7-0" that points to the PLC address "N7:0" in the MicroLogix 1500.
We click on "Add" to add in a new extension (you can have multiple ones), and merely set the "AssociatedControlProperty" to "Value
" (which is the property associated with the LED displayed value), and set the "ItemID" to "Channel1.Device1.N7-0
" (which is the point on the PLC that we want polled). This tells the Extender to get the OPC server to poll "Channel1.Device1.N7-0"
once every 1000ms, and if there is a change in the value, report that change by changing the property 'Value' to the value of 'Channel1.Device1.N7-0'.
Click OK. You then repeat the same process with the Cutaway Control, except that we tie "Channel1.Device1.N7-0" to the property "Value".
Run and you're done! Notice that no code was written - the Extender takes care of all the underlying OPC functions for you so all you have to worry about is assigning a property to a PLC tag.
Links of Interest
If you wish to learn more about the components used in this example, please see the following: