Configure data

更新时间:
复制 MD 格式

After you build a scene, you can add components to the models in the scene. Configure a component's data source to associate it with the Thing Specification Language (TSL) model data of a twin node. This lets you display the real-time data, status, and alert information of the digital twin model.

Prerequisites

You have completed the following operations. For more information, see the following topics:

Important

The TSL model data for a twin node is obtained from an added data source. If the data source contains no data, the configured components will not display any data. To preview component details and display effects, you can simulate device data based on the type of data source that you added. For example, you can use the device emulator to simulate data reporting from a device or call the ImportDTData operation to map data to twin nodes.

For more information about data sources, see Data source overview.

Add a component

  1. In the scene editing workbench, click Data Configuration on the top toolbar.

    The component list appears on the left side of the workbench. If no components are added, the list is empty.

  2. On the left side of the workbench, click the Add Component icon 添加.

    The Create Component panel opens on the right side of the workbench.

    创建组件

  3. In the Create Component panel, enter a Component Name. In the scene editing area, select one or more model modules to associate, and then click Next.

    Important

    Each Component Name must be unique within the current scene.

    关联模型

  4. Click the Data Source drop-down list. In the Select Twin Entity Graph Node panel, click the target node, then click OK.

    In the Select Twin Entity Graph Node panel, you can click Edit to open the twin workbench, where you can configure twin nodes and TSL model properties.

    Important

    If a twin node and its TSL model properties are used as a data source for a component, deleting the node or modifying the properties causes a configuration error. This error prevents the component from displaying data correctly. Delete these items with caution.

  5. Click the corresponding tab to configure the component style, and then click Done. The style settings are as follows.

Data panel

Note

A single component can have a maximum of five data panels.

On the Data Panel tab, click Add Manually or Add Automatically and follow the steps to configure the data panel.

Note

The Add Automatically option is available only if the data panel list is empty.

Automatic addition

  1. Select a style and click Next.

    Type

    Description

    Status Monitoring

    Lets you select multiple TSL models to automatically add corresponding status data cards. The cards display property names and values.

    Data Trend

    Uses time as the x-axis to show historical data trends for one or more properties.

  2. Select one or more TSL model properties, and then click OK.

Manual addition

In the Add Panel Block panel, click Data Display to configure the panel display.

  • Data Display

    1. Click Select TSL Model, select the TSL model, and then click OK.

    2. From the Display Style drop-down list, select a style and click OK.

      Style

      Description

      Data Status

      Lets you configure the display name, display unit, and whether to enable card alerts.

      If you enable card alerts, you must set an alert range. If the TSL model data falls within this range, the card's background color turns red as a warning.

      Gauge

      Lets you configure the gauge shape (ring or bar), display name, display unit, and colors for different value ranges. You can set a maximum of three ranges.

      Progress Chart

      Lets you configure the progress chart shape (ring or bar), display name, display unit, and the minimum and maximum progress values.

      Chart

      Lets you configure the display name, display unit, chart color, and the chart's time range (last seven days or custom).

      Water Level Chart

      Lets you configure the display name, display unit, and the minimum and maximum water level area values.

After configuration, you can preview the component in the Data Panel Preview area.image

Optional operations:

  • Add: On the Data Panel tab, to the right of the data panel list, click the Add icon and follow the steps to configure a new data panel.

  • Delete: On the Data Panel tab, move your mouse pointer over a data panel in the list. Click the delete 删除 icon and follow the prompts.

  • To sort panels, click Sort in the Data Panel Preview window. Select a panel with your mouse pointer and move it to a new position. Click Done to complete the sorting.

    The data panels on the Data Panel tab are also sorted to reflect the new order.

Status style

Note
  • A single component can have a maximum of three status styles.

  • Each status style can have a maximum of three value ranges.

  • Within a single component, you can configure only one status style for each TSL model property.

  1. On the Status Style tab, click Add Status Style.

  2. Click Select TSL Model, select the desired TSL model, and click OK.

  3. Set the status colors for different value ranges and click OK.

    image

After you complete the configuration, check the style of the corresponding data on the preview page.

Alert indicator

Note

A single component can have a maximum of three alert indicators.

On the Alert Indicator tab, click Add Alert Style. Select a condition type, complete the alert configuration, and click OK.

Type

Configuration description

Conditional Comparison

Use conditional operators (>, <, =) to configure the threshold, prompt text, icon, and icon color for a single TSL model data alert.

Custom

Use an expression to configure the conditions, prompt text, icon, and icon color for alerts on one or more TSL model data points. For more information about supported rule expressions, see Rule expressions.

Important

Each expression can contain a maximum of three parameters. The parameter name is the property identifier and can be up to 512 characters long.

Save and preview

  1. Click the Save icon 保存 on the right side of the top toolbar to save the scene configuration.

  2. Click the Preview icon 预览 on the right side of the top toolbar to preview the real-time data, status, and alerts for the models in the scene.