Managing Model Element Library


The model element library contains all accessible model elements within the current OU, including:

  • Custom Elements: Model elements created when building custom models in the current OU, as well as elements directly created within the model element library.

  • Shared Elements: Model elements shared by other OUs with the current OU.


You can configure frequently referenced model elements in the model element library and reference them when configuring models, improving the management and usage efficiency of model elements.

Prerequisites


Ensure you have the necessary permissions outlined in Add and Manage Data Within a Group </docs/modelling-tool/en/dev/reference/permission.html#edit>.

Create Model Elements


Follow these steps to create new model elements in the model element library:

  1. Go to Model Element Library > Custom Elements, select the Feature or Command tab, and click Create Feature.

  2. On the Model Definition page, click Create, then choose to create Feature (Attribute or Measurement Point) or Command based on your needs.

Create Attributes


  1. In the Create Feature pop-up window, select Attribute under Type and configure the following information based on the interface instructions:

    • Name: The name of the attribute.

    • Identifier: The unique identifier for the attribute.

    • Group: The group to which the attribute belongs. Only users with permissions for the group can view and use elements within it.

    • Data Type: The data type of the attribute. For more information, refer to Data Types.

    • Description: A description of the attribute.

  2. Click Save to complete the creation of the attribute.

  3. Repeat the above steps to create additional attributes.

Create Measurement Points


  1. In the Create Feature pop-up window, select Measurement Point under Type and configure the following information based on the interface instructions:

    • Name: The name of the measurement point.

    • Identifier: The unique identifier for the measurement point.

    • Measurement Point Type: A required field Measurement Point Type is used to differentiate characteristics of measurement point data. During data storage, different types of measurement point data can be categorized. During data retrieval, different processing capabilities can be applied to various types of data. The descriptions of each measurement point type are as follows:

      • AI: Measurement point data of the AI type is generally numerical data and can be aggregated during data retrieval.

      • DI: Measurement point data of the DI type is typically device status data and supports change query during retrieval.

      • PI: Measurement point data of the PI type is usually power calculation data and can be aggregated during retrieval.

      • General: For measurement point data of other types besides the above, it is generally used for uploading non-numeric data.


    • Data Type: The available data types vary depending on the selected measurement point type.

      • AI: The available data types are enum, integer, float, and double.

      • DI: The available data types are enum and integer.

      • PI: Only the double data type is available.

      • General: The available data types include date, dateTime, integer, float, double, enum, string, array, map, and object.

      For more information, refer to Data Types.


    • Quality Bit: Specifies whether the measurement point value represents data quality. If set to Yes, configure as follows:

      • Quality Bit: The system uses a predefined array-based data quality indicator that cannot be modified. You can click View to see predefined quality bit parameters and descriptions.

      • Value: Specifies the data type for the measurement point. The supported types are integer, float, and double.


    • Description: A description of the measurement point.


2. Click Save to create the measurement point.

3. Repeat the above steps to create additional measurement points.

Note

After creating a new measurement point, you must promptly configure a storage policy for its measurement point data. Otherwise, when a device integrates to the cloud, measurement point data will not be stored in the time-series data management system by default. For detailed steps on configuring storage policies, see ‘Configure TSDB Storage </docs/time-series-data/en/dev/cloudpolicy/configuring_tsdb_storage.html>’_.

Create Commands


  1. On the Custom Elements > Command page, click Create Command, select Command under Type, and configure the information as prompted, including:

    • Name: The name of the service.

    • Identifier: The unique identifier for the service.

    • Input Parameters: Specifies input parameters for the service, including whether the parameter requires a value during invocation, its maximum/minimum value, and a default value if the parameter is required but not provided.

    • Output Parameters: Defines the return results after the command execution, specifying whether a value is required for the parameter, the value type, range, and default value.

    • Description: A description of the service.


  2. Click Save to create the command.

  3. Repeat the above steps to create additional commands.

Results


After creating elements, you can view the newly created elements in the Custom Elements list:

  • Click the Edit button to modify elements in the list.

  • Select … > Clone to duplicate elements in the list.

  • Select … > Delete to remove elements from the list.

  • Click the View button to view elements that you do not have permission to modify.