Setting a Custom Object Model for Data Aggregation

Scenario: You want to aggregate data by generating an individual node, which has multiple OPC UA nodes as properties. On this purpose you must prepare and import the custom data model, and then export this configuration to an OWL file.

 

Workflow diagram:

 

 

Prerequisites:

  • You prepared the OPC UA data model (JSON) file to import, which defines the custom object model that you require. For background information, see JSON File for Object Models.
  • For enabling the alarm functionality and event notification, in the OPC UA data model (JSON) file to import, you also specified the configuration of the following mandatory properties: Alarm.AlarmDPE, Identifier, AlarmMessage, AlarmStatus, and AlarmTimestamp.
    For more details on the configuration of those properties, see OPC UA Mandatory Properties for Custom Object Models.
  • You are trained and authorized to work with system libraries. Also you are authorized to handle libraries for the specific customization level (L4-Project, L3-Country, or L2-Region) where you want to create the new library.
  • System Manager is in Engineering mode.
  • System Browser is in Management View.

 

Steps:

1 – Create the Object Model Library Block
  1. Select Project > System Settings > Libraries > L2-Region or L3-Country or L4-Project.
  1. In the Library Configurator tab, click New and select New Library Object.
  1. In the General Settings expander, do the following:
    a. Specify the following fields: Discipline and System.
    b. (Optional) Complete the following fields for keeping track of changes made to this library object:
    - Level tag (available only for L4-Project libraries)
    - Version
    - Date
    - Languages
    - Dependencies
  1. Click Save .
  1. In the New Object dialog box, enter a name and description for the custom library.
  1. Click OK.
  • The custom library is added to System Browser.
  1. In the Library Configurator tab, click New and select New Object Model Folder.
  1. (Optional) Complete the following fields for keeping track of changes made to this block:
  • Version
  • Revision
  • Date
  • Notes
  1. Click Save .
  1. In the New Object dialog box, enter a name and description, and click OK.
  • The new object model block is added to the custom library.

 

2 – Import the Data Model
  1. In System Browser, select the newly created OPC UA object model library block.
  1. Select the Import tab.
  1. Click Browse.
  1. In the Open dialog box, navigate to and select the configuration (JSON) file that you prepared.
  1. Click Open.
  • The complete path of the selected file appears in the field. The Source Items preview displays all available items.
  1. Transfer the DPTs to import from the Source Items list to the Items to Import list .
  1. Click Import.
  • A confirmation message displays.
  1. Click Yes.
  • The Import tab displays the Import in progress page. When the import completes successfully, the Import dialog box displays its outcome.
  1. Click OK to close the dialog box.

 

3 – Export the Data Model
  1. Select Project > System Settings > Libraries.
  1. Select the SORIS tab.
  1. Drag the custom object model from System Browser into the SORIS Objects expander.
  1. In the SORIS Objects expander, select the check box that corresponds to the custom object model.
  1. In the [custom object model] – Properties expander, click Select All to select all the properties.
  1. (Optional) The Export Files Full Path expander provides the following default output directory: [Installation Drive]:\[Installation Folder]\[GMSMainProject]Data\[OPC_UA_Client]\SORISFiles. You may want to click Browser, and specify a different output directory.
  1. Click Save .
  • The system creates the following files: [name].cs, [name].java, [name].owl, [name].yaml.
  1. Copy and paste the OWL file ([name].owl) into the data models adapter installation folder:
    C:\Program Files (x86)\[Company Name]\SORIS OPC UA Adapter\DataModels.
  • The object model is now available in the Object model drop-down list of the OPC UA Client Configuration Data Settings section in the OPC UA.