Creating an OPC Device Type
An OPC device type translates between the tag based data structure on the OPC server and the ION based data structure in Power Monitoring Expert.
When you create the device type with the Device Type Editor, you first define the OPC tags that you want to access on the server, and then you map these tags to ION managers, modules, and registers. You can enter the OPC tag information manually in the Device Type Editor user interface, or use Microsoft Excel to define the tag list and then copy and paste it into the Device Type Editor. The mapping of OPC tags to ION registers is done by dragging tags onto ION registers, or the reverse, using the mouse pointer.
NOTE: You cannot use the Device Type Editor logging and calculation tool for OPC devices. Use the Virtual Processor service (VIP) to configure software logging for this devices.
Prerequisites
To create a device type for an OPC server, you need to know the details of its tag list. You can get this information from the OPC server documentation or the OPC server vendor. You can also get the tag list by browsing the OPC server with an OPC client such as the OPC Test Client we ship with PME. You can find the OPC Test Client, OpcTestClient.exe, in ...\
References
See the following references for information on how to use the Device Type Editor or information related to OPC tag definitions:
To create an OPC device type:
- In Device Type Editor, click File > New > OPC Device Type to open a New Mapping template.
- Enter the OPC tag information into the OPC Map table in the right display pane, in one of two ways:
- Add each tag manually in the Device Type Editor, using the available editing controls.
- Use Microsoft Excel to define the tag list, copy it, and paste it into the OPC Map table.
NOTE: The tag list columns in the Excel sheet must match the column content and positions in the Device Type Editor OPC Map table. .
NOTE: When entering a tag, only specify the tag name, with a leading period (.), do not include the OPC server or device name. For example, for the tag
Opcda://Server/OpcDa.1.Channel_1.Powers.Real_Powerenter.Powers.Real_Poweras the tag name in the OPC Map. - Map each OPC tag in the OPC Map to a measurement in the Measurement Tree in the left pane. To see the measurements in the tree, expand the managers and modules, for example Current > Phase Current > Current A,B,C, ... . Map the tags in one of two ways:
- Using the mouse, drag the measurement you want to map in the Measurement Tree onto the corresponding tag in the OPC Map.
- Using the mouse, drag the OPC tag you want to map in the Modbus OPC Map onto the corresponding measurement in the Measurement Tree.
NOTE: If you cannot find a suitable measurement in the Measurement Tree, add a new manager, module, and register to represent this measurement. To do this, right-click any of the existing managers in the Measurement Tree and choose the appropriate menu options.
- Configure the device type name and template name.
- In the Measurement Tree, click Factory Information > Factory 1 > FAC1 Device Type to open the String Register Details dialog for this register. In String Register Details, enter a device type name in the Value box. This name will be visible in the Management Console when you select a device type for a new device. Choose a name that identifies the OPC server, but does not match any of the existing device types.
Example: Use "OPC_ABC" as the device type name, where ABC identifies the server.
- In the Measurement Tree, click Factory Information > Factory 1 > FAC1 Template to open the String Register Details dialog for this register. In Edit String Register, enter a template name in the Value box. This name is used to match your new device type with a default Vista diagram, if you choose to create such a diagram. The template name should include the device type name followed by a version number that represents the version of your new device type.
Example: For a device type called "OPC_ABC", you could use a template name of "OPC_ABC_V1.0.0".
- In the Measurement Tree, click Factory Information > Factory 1 > FAC1 Device Type to open the String Register Details dialog for this register. In String Register Details, enter a device type name in the Value box. This name will be visible in the Management Console when you select a device type for a new device. Choose a name that identifies the OPC server, but does not match any of the existing device types.
- (Optional) Click Tools > Clean Measurement Tree to remove any Measurement Tree elements that have not been mapped to OPC tags. This makes it easier to find the relevant measurements in the Measurement Tree in Vista or an OPC client for example.
- Click File > Save, to save the new device type.
Related topics
- Creating an OPC Device Type
- Editing an OPC Device Type
- Installing a Device Type on the System