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
- Select Project > System Settings > Libraries > L2-Region or L3-Country or L4-Project.
- In the Library Configurator tab, click New and select New Library Object.
- 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
- Click Save .
- In the New Object dialog box, enter a name and description for the custom library.
- Click OK.
- The custom library is added to System Browser.
- In the Library Configurator tab, click New and select New Object Model Folder.
- (Optional) Complete the following fields for keeping track of changes made to this block:
- Version
- Revision
- Date
- Notes
- Click Save .
- 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
- In System Browser, select the newly created OPC UA object model library block.
- Select the Import tab.
- Click Browse.
- In the Open dialog box, navigate to and select the configuration (JSON) file that you prepared.
- Click Open.
- The complete path of the selected file appears in the field. The Source Items preview displays all available items.
- Transfer the DPTs to import from the Source Items list to the Items to Import list .
- Click Import.
- A confirmation message displays.
- Click Yes.
- The Import tab displays the Import in progress page. When the import completes successfully, the Import dialog box displays its outcome.
- Click OK to close the dialog box.
3 – Export the Data Model
- Select Project > System Settings > Libraries.
- Select the SORIS tab.
- Drag the custom object model from System Browser into the SORIS Objects expander.
- In the SORIS Objects expander, select the check box that corresponds to the custom object model.
- In the [custom object model] – Properties expander, click Select All to select all the properties.
- (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.
- Click Save .
- The system creates the following files: [name].cs, [name].java, [name].owl, [name].yaml.
- 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.