The purpose of this paper is to demonstrate how to connect Siemens WinCC V6 to the INGEAR OPC Server. This example uses the INGEAR AB OPC Server connecting to a ControlLogix, but the same steps are used to connect to other PLCs supported by the INGEAR AB OPC Server or to any of the other INGEAR OPC Servers. The information provided here is not a substitute for your WinCC V6 documentation. We are covering how to do this in order to show a complete connection, not to provide comprehensive training on how to build WinCC V6 screens. 1) Configuring the INGEAR OPC Server Open the OPC Server from the Windows Start menu as shown below.
When the INGEAR AB OPC Server opens you will see the Quick Start dialog below. Details on configuring the other INGEAR OPC Servers can be found in their respective help files. Tags dont have to be entered into the OPC Server as done in this example. Dynamic tags can be added from within WinCC as long as a Driver, (under EditComm Settings on the INGEAR AB OPC Server Menu) and Device are configured first in the INGEAR OPC Server. The use of dynamic tags is covered at the end of this document.
Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners.
-1-
Click on the OK button on the Quick Start Configuration screen. When configuring a ControlLogix you can import the tags from the AB RSLogix 5000 PLC programming software if you have saved this file as an .L5K file. The L5K file can be created in RSLogix 5000 by choosing File, Save As and choosing to save your project as a L5K extension. If youre connecting to something other than a ControlLogix then click on the Quick Start button as shown below.
Once you click on Open L5K you can browse to the L5K file as seen below.
Click Open and the OPC Server will begin importing the tags. The L5K Import Status will pop-up as shown below while the tags are imported.
Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners.
-2-
When the OPC Server is done importing the tags, the name of the device as pulled from the L5K file can be seen in the tree window to the left as seen below. In this case the device is called SWTBtestCPU. You can click on the + sign to expand the tree and see all the tags and groups imported from the L5K file. Tag groups and tags that wont be used can be deleted.
The first thing to do is to check to make sure the right IP address was imported. This is done by going to the Edit menu and choosing Comm Settings as shown below.
Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners.
-3-
When manually configuring the Driver because you are using Dynamic Tags or manually setting up the OPC server for some other reason, you will click on the drop-down under Supported Drivers, choose the driver for the type of connection you are using and click on the Add button. Once a Driver is installed you can go to Add and choose NewDevice to manually add a device as shown below or Click on the Quick Start Configuration to guide you through.
Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners.
-4-
When manually configuring the OPC Server or doing Dynamic tags we suggest that you add at least one tag to check communications. This would be done by choosing New Tag from this same menu above. The Tag Properties window will open as shown below. See the INGEAR OPC Server help file or press on the Help button shown in the InGear OPC Server for details about these settings.
Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners.
-5-
Once these items have been verified click OK. When Manually configuring or doing Dynamic tag this screen will need to be configured as discussed above. The Driver in the drop down will need to be selected (the available selections will depend on what you have configured for Installed Drivers under the EditComm Settings options) as well as the PLC type by selecting the appropriate radio button. See the help file for more information about the PLC Node address or ControlLogix route address. The final part of configuring the OPC Server is to test the Connection. This can be done now or at a later time when you are connected to the PLC. This next step can be done as long as at least one tag is configured in the OPC Server. As previously stated, we suggest having a single tag configured just for basic success/fail testing, even if all the other tags are added Dynamically from WinCC.
Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners.
-6-
Click on the Debug icon to the far right as shown below. This can also be done by clicking View|Monitor on the OPC Server menu. This starts the connection to the PLC. Under the Status heading in the Event pane on the bottom of the Server. If there are errors these will be shown here along with the Last error. The INGEAR OPC Server Help file lists the errors under the Troubleshooting section.
Once the connection to the PLC has been made the Value for the tags will show under the Value column as shown above.
Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners.
-7-
The screen will then return to WinCCExplorer. Right click on Tag Management and choose, Add New Driver as shown below.
Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners.
-8-
Expand the Tag Management tree as seen below and right click on OPC Groups.
The Channel unit properties dialog will open. Click on the New button
Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners.
-9-
Name your Connection under the Connection properties dialog and choose Properties
Under the OPC Server Name enter: CimQuestInc.IGOPCAB.1 for the INGEAR AB OPC Server and click OK. This is called the ProgID and can be found in the help file for any INGEAR OPC Server as well as below.
ProgIDs INGEAR AB-CimQuestInc.IGOPCAB.1 INGEAR Modbus-CimQuest.IGMBOPC.1 INGEAR GECimQuest.IGGEOPC.1 INGEAR OmronCimQuest.IGOMOPC.1
Click OK
Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners.
- 10 -
Expand the OPC Groups Icon in WinCCExplorer and Right click on the Connection you created following the steps above. Choose New Group from the drop down as shown below.
The properties of the tag group will open as shown below. Name your group and click OK.
Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners.
- 11 -
OPC Tag Browsing Expand the Connection Icon from in the WinCCExplorer tree and right click on the ICON Called OPC Groups then choose System Parameter as shown here.
The OPC Item Manager will open. If you are connecting to an OPC Server on a different PC you will need to configure DCOM on both PCs. Please see http://www.opcactivex.com/dcom for details on DCOM configuration. This website will direct you to DCOM configuration information for all Windows Operating Systems including free tutorial videos. You will need Administration rights on both PCs to make these changes.
Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners.
- 12 -
You must click on the check boxes if you want to filter based on the tags Read and Write access under Access Authorization before you click on the Next button.
Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners.
- 13 -
The Browse Window above will open after clicking Next on the Filter Criteria dialog which will allow you to browse for the tags you want added to your project. In this example we will browse for tags under the ControllerTags group
Under the ControllerTags Group in our PLC there is a group called DInt that we highlight. All the tags in the DInt Group will be listed in the panel on the right as shown above. To highlight more than one tag at a time simply hold down on the Shift key and scroll to the end of the items you would like to add. In this example we will add all tags in the DInt array by highlighting them all and clicking on the Add Items button.
Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners.
- 14 -
Before click the Finish button it is important you highlight the group you want to add the tags to as shown to the right. You can have more than one group, but you have to pick one to add the chosen tags to. A warning that you need to choose a group will appear if this is not highlighted first. Once you highlight your group click the Finish button The dialog showing Please wait will show the progress of adding all the tags that have been selected.
Once the tags are added, the Please wait dialog will close and you can close the browse window by clicking on the X as shown below or add more tags to the same or different groups following the same method just shown.
Once the browse window is closed you can close the OPC Item Manager as show to the right or click on the Exit button.
Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners.
- 15 -
We can now return to the WinCCExplorer and see the tags that have been added by highlighting our group as shown below.
We can now start work in Graphic Designer Connecting with Graphic Designer We can now open Graphics Designer and test our tag connection as seen below.
Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners.
- 16 -
In this example we will choose an I/O Field on the Object Palette and place it on the form
See your WinCC V6 documentation for the other configuration items in the I/O-Field Configuration dialog not covered directly in this document.
Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners.
- 17 -
The update rate that the tag should be scanned at can be selected here. The Update rate is the rate the OPC Server will scan the PLC/device. This rate is controlled by WinCC V6 and not the OPC Server. For more information on Update rate configuration see your WinCC V6 documentation. The Update rate does not guarantee that the updates will return in this time, only that the OPC Server will attempt to read them at this rate. There are many factors involved in the rate tags can be read and is outside the scope of this paper.
Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners.
- 18 -
The WinCC Runtime Screen will open and the value in the PLC can now be seen in the I/O Field as seen below.
You are now done with the example in this document. Please see your WinCC V6 documentation or any additional features or functions beyond the I/O field connection shown in this document. The Dynamic Tag Configuration that follows is only needed if you are not browsing for tags as shown in this example. Dynamic Tag Configuration: If tags are not added into the OPC Server or you prefer not to browse for tags for some reason you can configure Dynamic tags in WinCC V6 using PLC/Device addresses. If using Dynamic Tags, a Driver must still first be configured under EditComm Settings and a new device must be configured in the OPC Server at a minimum. Start by right clicking on the Group as we created above in WinCCExplorer. Choose New tag from the options as shown to the right.
Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners.
- 19 -
This Item Name, SWTBtestCPU.Tag2@DInt[0]|VT_I4, would be used to connect to a tag DInt[0] in the PLC. Click OK when finished At this point this tag can now be accessed inside Graphics Designer as shown earlier in this document above when connecting to browsed tags.
Meaning of the parts of the Dynamic Tag/Item Name Entered above: SWTBtestCPU is the device name in the OPC Server Tag2 is a name given to the tag and can be any name your choosing. @Dint[0] is the actual PLC address being read |VT_I4 is the data type for this address (a full listing of these data types are in the INGEAR OPC Server help file)
Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners.
- 20 -
<name>
@<address>
|DATA_TYPE ,<length>
Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners.
- 21 -