Entity Model Example
This section uses the example of Furnace in the plant to demonstrate the creation of entity model.
Template | Template Attribute | Instance | Instance Attribute |
---|---|---|---|
Furnace | Temperature | Furnace A | Humidity, pressure |
Creating Entity Template
- Log in to supOS, and then click to go to the design center.
- Select Object Model Management > Object Template > Entity Template.
- Click next to Entity Template, and then enter the basic information of the template.
Parameter | Description |
---|---|
Template Name | Furnace. |
Alias | The unique ID of the template. Generated by default and can be customized. |
APP | Indicates the template is created on supOS or applications. system means the template is created on supOS. info Select Visible to Other Apps to display the current template on all applications. |
Parent Template | Select an entity template to be the parent template of the current one. |
Main Display Fields | Used as keywords when searching for instances under the template during instance attribute binding. |
Tags | Add tags to the template from Tag Management for easy search and categorization. |
Function Sets | Select a function set to endow its features to the template. |
- Click Attributes, add Temperature as an attribute.
- Set the basic information of the template attribute.
General parameter description Parameter Description Name Temperature Type Double or Float. Attribute data type. Data Sources Leave it as empty. whyTemplate attributes are general attributes, which will be inherited by specific instances. It is recommended to add specific data sources to corresponding instance.
Read And Write Status Select whether the attribute value can be changed by writing back data. Storage Policy - Persistence: Whether to synchronize the value changes to supOS.
- History: Whether to keep all change records of the value for future analysis.
Compression Parameters Compress data with SDT (Spining Door Transformation) to reduce the space that history records take up. - Compression Value: Set a percentage of the value range, or an absolute value as the input parameter of SDT.
- Maximum Upload Cycle: The maximum time interval between 2 collecting records. When reaching the set value, and data has no changes, the last recorded value will be uploaded.
info- The higher the Compression Parameters, the heavier the data is compressed.
- No matter how high the Compression Parameters is, the time interval of collecting data cannot exceed Maximum Upload Cycle.
infoDifferent types of data corresponds to different parameters.
Specific data type parameter description Parameter Data Type Description Defaults All types except Object. The default data value. Length String String length. Upper Range Limit/Lower Range Limit/Unit Integer/Long/Float/Double/Decimal Attributes of different types of data. Click Configure to customize units. Effective Precision Decimal The number of significant figures of the data value. Decimal Precision Decimal The number of digits after the decimal point of the data value. Decimal Double/Float Decimal precision of the data value. Template Name Object Click Select template, and select an entity template to be bound with the current template to form a relation between them. Storage Field Object Field Display Object tipClick Binding Relationship on the Attributes page, drag attributes from the right side to the left to bind them.
- Under Alarm rules, click New to add an alarm that will be triggered when the temperature is higher than 85°C.
- Set Condition to > and Limit to 85.
- Set a buffer temperature of 5 by selecting Value to be Dead Zone Type and entering 5 under Dead Zone Value. An alarm will go off when the temperature hits 80°C.
infoAlarm rules are only available for numeric and boolean type of data.
- (Optional) Click Services, and create a new service.
Parameter | Description |
---|---|
Timeout(s) | Set the timeout period for running the service. |
Information Input | Add fields to be the input information of the service. |
Information Output | Set the output data type. info Only JSON can be parsed by supOS automatically. |
Object Selector | Click to select attributes or embedded services from templates and instances in supOS, and then change the script based on specific requirements. |
For details of embedded services, see Embedded Service.
- (Optional) Click Events, and create a new event.
Presently, only two embedded data sets are available. You can write scripts to define new events.
- (Optional) Click Subscriptions, and create a new subscription.
Parameter | Description |
---|---|
Subscription Method |
|
Script | Write a script to realize the custom subscription. |