Вы находитесь на странице: 1из 21

How to Connect WinCC V6 to the InGear OPC Server

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)

Open the OPC Server from the Windows Start menu as shown below.

Configuring the INGEAR OPC Server

Start menu as shown below. Configuring the INGEAR OPC Server When the INGEAR AB OPC Server

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 don’t 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 Edit Comm 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.

use of dynamic tags is covered at the end of this document. © Copyright Software Toolbox

© Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners. - 1 -

How to Connect WinCC V6 to the InGear OPC Server

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 you’re connecting to something other than a ControlLogix then click on the Quick Start button as shown below.

then click on the Quick Start button as shown below. Once you click on Open L5K

Once you click on Open L5K you can browse to the L5K file as seen below.

on Open L5K you can browse to the L5K file as seen below. Click Open and

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 -

How to Connect WinCC V6 to the InGear OPC Server

How to Connect WinCC V6 to the InGear OPC Server When the OPC Server is done

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 won’t be used can be deleted.

Tag groups a nd tags that won’t be used can be deleted. The first thing to

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.

to the Edit menu and choosing Comm Settings as shown below. © Copyright Software Toolbox Inc.

© Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners. - 3 -

How to Connect WinCC V6 to the InGear OPC Server

When entering Dynamic tags only without the L5K import, selecting Edit Comm Settings would be the first step to configure a Driver so that the OPC server knows how it will communicate to your PLC.

The Driver Selection dialog will open showing the configured drivers. If your IP address is shown correctly simply click Cancel. If it’s wrong or you are not sure click on Configure. You can change your IP address to the correct one and close the dialog.

your IP address to the correct one and close the dialog. When manually configuring the Driver

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.

Click on the Quick Start Configuration to guide you through. © Copyright Software Toolbox Inc. 2002-2006,

© Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners. - 4 -

How to Connect WinCC V6 to the InGear OPC Server

Next we will check the device configuration by right clicking on the device name as shown below (“SWTBtestCPU” in our case) and choosing Properties.

(“SWTBtestCPU” in our cas e) and choosing Properties. When manually configuring the OPC Server or doing

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.

in the InGear OPC Server for details about these settings. © Copyright Software Toolbox Inc. 2002-2006,

© Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners. - 5 -

How to Connect WinCC V6 to the InGear OPC Server

The Device Properties window will open as shown below. Check to make sure the Driver that we configured above is selected. Verify that the PLC Node is the same as the Slot number that your ControlLogix CPU is located in. Check the INGEAR AB OPC Server help file if your ControlLogix is on a different rack from the Ethernet module you are using. In this case a route path will have to be entered and specifics on creating a route path for various types of configurations, including ControlLogix Gateway, are included in the INGEAR AB OPC Server help file. The help file is accessible from the Help button on the Device Properties dialog as shown below.

Help button on the Device Properties dialog as shown below. Once these items have been verified

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 Edit Comm 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 -

How to Connect WinCC V6 to the InGear OPC Server

Select a group under the device as shown below. In this case a group named “Dint” was selected. The tags configured under this group are shown in the right pane.

configured under this group are shown in the right pane. Click on the Debug icon to

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.

file lists the errors under the Troubleshooting section. Once the connection to the PLC has been

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 -

How to Connect WinCC V6 to the InGear OPC Server

2)

Configuring WinCC V6

Open WinCC V6 and Create a New project (or open an existing one) and click OK.

a New project (or open an existing one) and click OK. Name your project a nd
a New project (or open an existing one) and click OK. Name your project a nd

Name your project a nd click Create or selec t a previous project.

The screen will then return to WinCCExplorer. R ight click on Tag Management and choose, Add New Driver as shown below.

Tag Management and choose, Add New Driver as shown below. © Copyright Software Toolbox Inc. 2002-2006,

© Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners. - 8 -

How to Connect WinCC V6 to the InGear OPC Server

Choose OPC.chn from the Add new Driver bin list and click Open.

OPC.chn from the Add new Dr iver bin list and click Open. Expand the Tag Management

Expand the Tag Management tree as seen below and right click on OPC Groups.

tree as seen below and right click on OPC Groups. The Channel unit properties dialog will

The Channel unit properties dialog will open. Click on the New button

unit properties dialog will open. Click on the New button © Copyright Software Toolbox Inc. 2002-2006,

© Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners. - 9 -

How to Connect WinCC V6 to the InGear OPC Server

Name your Connection under the Connection properties dialog and choose Properties

the Connection properties dialog and choose Properties Under the OPC Server Name enter: CimQuestInc.IGOPCAB.1 for

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.

ProgID’s

INGEAR AB-CimQuestInc.IGOPCAB.1 INGEAR Modbus-CimQuest.IGMBOPC.1 INGEAR GE–CimQuest.IGGEOPC.1 INGEAR Omron–CimQuest.IGOMOPC.1

Click OK

INGEAR Omron –CimQuest.IGOMOPC.1 Click OK Click OK on the Connection properties dialog. © Copyright
INGEAR Omron –CimQuest.IGOMOPC.1 Click OK Click OK on the Connection properties dialog. © Copyright

Click OK on the Connection properties dialog.

© Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners. - 10 -

How to Connect WinCC V6 to the InGear OPC Server

Click OK on the Channel unit properties dialog.

OPC Server Click OK on the Channel unit properties dialog. Expand the OPC Groups Icon in
OPC Server Click OK on the Channel unit properties dialog. Expand the OPC Groups Icon in

Expand the OPC Groups Icon in WinCCExplorer and R ight 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.

The properties of the tag group will open as shown below. Name your group and click

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 -

How to Connect WinCC V6 to the InGear OPC Server

The group name is something meaningful to your project.

We can now begin adding Tags to the project.

your project. We can now begin adding Tags to the project. OPC Tag Browsing Expand the

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.

OPC Groups then choose System Parameter as shown here. The OPC Item Manager will open. If

The OPC Item Manager will open.

Parameter as shown here. The OPC Item Manager will open. If you are connecting to an

If you are connecting to an OPC Server on a different PC you will need to configure DCOM on both PC’s. 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 PC’s to make these changes.

© Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners. - 12 -

How to Connect WinCC V6 to the InGear OPC Server

Expand and browse for the INGEAR Server’s ProgID as shown below. Highlight the ProgID and click on the Browse Server button.

Highlight the ProgID and click on the Browse Server button. ProgIDs INGEAR AB CimQuestInc.IGOPCAB.1 INGEAR Modbus

ProgIDs INGEAR AB

CimQuestInc.IGOPCAB.1

INGEAR Modbus -

CimQuest.IGMBOPC.1

INGEAR GE –

CimQuest.IGGEOPC.1

INGEAR Omron –

CimQuest.IGOMOPC.1

The Filter Criteria dialog will open after you click on the Browse server button above. See your WinCC V6 for information on the Filter Criteria.

See your WinCC V6 for information on the Filter Criteria. You must click on the check

You must click on the check boxes if you want to filter based on the tag’s Read and Write access under Access Authorization before you click on the Next button.

Access Authorization before you click on the Next button. © Copyright Software Toolbox Inc. 2002-2006, All

© Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners. - 13 -

How to Connect WinCC V6 to the InGear OPC Server

How to Connect WinCC V6 to the InGear OPC Server The Browse Window above will open

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

we will browse for tags under the ControllerTags group Under the ControllerTags Group in our PLC

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 -

How to Connect WinCC V6 to the InGear OPC Server

How to Connect WinCC V6 to the InGear OPC Server The Add Tags dialog will open

The Add Tags dialog will open once you click on the Add Items button on the browse window. The Add Tags dialog lets you modify the tag name as read f rom the server when imported into WinCC V6. You can add any Prefix or Suffix that will help distinguish the tags in your project. See the WinCC V6 help for more information if needed.

In this example we will add SWTB to the Prefix. Now click Finish.

example we will add SWTB to the Prefix. Now click Finish. Before click the Finish button

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

first. Once you highlight your group click the Finish button The dialog showing Please wa it…

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.

or different groups following the same method just shown. Once the browse window is clos ed
or different groups following the same method just shown. Once the browse window is clos ed

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 -

How to Connect WinCC V6 to the InGear OPC Server

We can now return to the WinCCExplorer and see the tags that have been added by highlighting our group as shown below.

have been added by highlighting our group as shown below. We can now start work in

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.

Designer and test our tag connection as seen below. © Copyright Software Toolbox Inc. 2002-2006, All

© Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners. - 16 -

How to Connect WinCC V6 to the InGear OPC Server

In this example we will choose an I/O Field on the Object Palette and place it on the form

an I/O Field on the Object Palette and place it on the form The I/O Field

The I/O Field configuration will open. Click on the

the form The I/O Field configuration will open. Click on the button to select a tag.

button to select a tag.

will open. Click on the button to select a tag. See your WinCC V6 documentation for

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 -

How to Connect WinCC V6 to the InGear OPC Server

Expand the tree to the tag group configure and choose the tag we created above.

tag group configur e and choose the tag we created above. The update rate that the
tag group configur e and choose the tag we created above. The update rate that the

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.

Click OK once finished.

© Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners. - 18 -

How to Connect WinCC V6 to the InGear OPC Server

Click on the Run button to start WinCC runtime as shown below.

on the Run button to start WinCC runtime as shown below. The WinCC Runtime Screen will

The WinCC Runtime Screen will open and the value in the PLC can now be seen in the I/O Field as seen below.

in the PLC can now be seen in the I/O Field as seen below. You are

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 Edit Comm 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.

Choose New tag from the options as shown to the right. © Copyright Software Toolbox Inc.

© Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners. - 19 -

How to Connect WinCC V6 to the InGear OPC Server

How to Connect WinCC V6 to the InGear OPC Server Enter a name for this Tag

Enter a name for this Tag that will be used in WinCC V6 then click on S elect. See your WinCC V6 about any of the other options on this dialog.

WinCC V6 about any of the other options on this dialog. This Item Name, SWTBtestCPU.Tag2@DInt[0]|VT_I4 ,

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 -

How to Connect WinCC V6 to the InGear OPC Server

This matrix below will help you to match the data type suffix used in Dynamic Tags to the WinCC V6 data type

OPC Native Type

WinCC V6 Data Type

Range

VT_BOOL

Boolean (bit value)

True / False

VT_BOOL | VT_ARRAY

Array of Booleans

 

VT_I1

Signed Byte (8 bit value)

128 to 127

VT_I1 | VT_ARRAY

Array of Signed Bytes

 

VT_UI1

Unsigned Byte (8 bit value)

0-255

VT_UI1 | VT_ARRAY

Array of Unsigned Bytes

 

VT_I2

Signed Short (16 bit value)

-32786 to 32767

VT_I2 | VT_ARRAY

Array of Signed Shorts

 

VT_UI2

Unsigned Short (16 bit value)

0 – 65535

VT_UI2 | VT_ARRAY

Array of Unsigned Shorts

 

VT_I4

Signed Long (32 bit value)

-2147483648 to 2147483647

VT_I4 | VT_ARRAY

Array of Signed Longs

 

VT_UI4

Unsigned Long (32 bit value)

0 to 4294967295

VT_I4 | VT_ARRAY

Array of Unsigned Longs

 

VT_R4

Float (IEEE Single Precision Real)

1.40239846E-45 to

3.40282347E+38

VT_R4 | VT_ARRAY

Array of Floats

 

VT_BSTR

ASCII String

Length Option required

More detailed information on the syntax of Dynamic tags is show below.

Dynamic Tags Fully Qualified Path Syntax

The client specifies the Dynamic Tag in its OPC Item Address field in WinCC flexible

Syntax:

<device>.<subgroup>.<name>@<address>|DATA_TYPE,<length>

<device>.

This is the name of the Device to receive the dynamic tag. The device

<subgroup>.

must exist in the OPC Server Project Workspace (optional) – A device subgroup may be specified as part of the dynamic

<name>

tag. The device subgroup must exist in the OPC Server Project Workspace This is the name of the tag the client will dynamically create. If the name

@<address>

already exists in the OPC Server Workspace, the existing tag is used, otherwise a new tag is created. This is the data source of the tag. If the Device is a ControlLogix, this is

|DATA_TYPE

the atomic name of the tag. If the Device is a PLC / SLC / Micrologix, this is the data table file address This is the data type of the tag. Valid types are VT_I1, VT_UI1, VT_I2,

,<length>

VT_UI2, VT_I4, VT_UI4, VT_R4, VT_BSTR (optional) – This is the length of the tag, and is used to specify the number of ASCII characters of the tag is a VT_BSTR type or the number of elements if the tag is a VT_ARRAY.

© Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide. All trademarks are property of their respective owners. - 21 -