Data Model
Data model is description of the properties, status and other information of the device.
Model List
Click the Model
menu in the Develop Manage
navigation item on the left column
When the model's most recent model config (JSON) import has abnormal errors, it will be displayed in the publish Status column of the list
Model Add
Click the Add
button to slide out the new form on the right
Fill in Name
, Model
, Number of modules
, Note
and click OK to complete the save
- Name: The name of the data model. You can choose a meaningful name.
- Machine Type: data model machine type, usually the device model
- Modules: One device corresponds to the number of acquisition terminals (HMI), for example: one screen and one machine is: 1, and so on, n screens and one machine is n
- Notes: Notes on the data model for easy reference
Config
Click the Config
button to enter the details page
JSON Import
After the model parameters are successfully imported, the model will be automatically published
If the imported model is the same as the previous model, and the original parameters are not modified, the code table configuration and alarm configuration of the original parameters will be retained.
The JSON format is:
{
"mk":"{mk}", "un":{un},
"env": [
{
"code":"mach_sts", "name":"Running status", "unit":"",
"type":"u16", "dp":0, "rw":"rw"
},
{
"code":"{code}", "name":"{name}", "unit":"{unit}",
"type":"{type}", "dp":{dp}, "rw":"{rw}"
},
// ...
],
"run": [
{
"code":"{code}", "name":"{name}", "unit":"{unit}",
"type":"{type}", "dp":{dp}
},
// ...
],
"err": [
{
"code":"{code}", "desc":"{desc}"
},
// ...
]
}
env
is the environment parameter, the parameter mach_sts (must be included in the main module), the rw parameter** can be **r
(read-only),w
(write-only),rw
(read and write),ww
(double write)run
is the running parameter. In this environment, the rw parameter can only ber
(read-only)err
is the exception parameter. In this environment, the rw parameter can only ber
(read-only).⚠️Note
- The parameter code can
only
be a combination ofalphanumeric characters
andunderscores
except the__diff
suffix. The charactersiot_sts
,ts
,dn
,req
,rid
,root
,time
andtimestamp
are reserved words. Import is prohibited. - When there is no associated device under the model, repeated import is an overwrite operation
- When the model has related devices, repeated import is accumulative operation. If the same parameter
display type
is different, the import will report an error. Ifdisplay type
is the same andstorage type
is different, it will report an error based on compatibility. For example:u32
can be changed tou16
, but not vice versa. - When the model is multi-module (n screens one machine), the parameters between modules cannot be repeated and the extension module (not un0) cannot contain the parameter mach_sts
- The parameter code can
If an abnormal occurs after importing, it will be prompted on the Tab page. After the import is successful, the abnormal prompt disappears.
JSON Details
Click the JSON Details
button to display the parameter configuration used by the current model
Click the Download
button to download the model configuration. After modification, you can modify the parameters through JSON import
Operate
Edit
Click the Edit
button in the parameter list
Environment parameters, Abnormal parameters You can edit Name, Unit
- Name: data model parameter name
- Unit: Model parameter unit, such as temperature is °C
Running parameters You can also add Difference calculation
- Difference: The numeric type parameters in the running parameters can be used for difference calculation. After enabling, there will be an additional parameter ending with _diff. When calculating statistics, use this field for difference calculation. Reference Case
Code table
Used to configure the data source of the component in DV. When the data source parameter has been configured in the code table in the object model, you can check the matching code table and select the indicator that needs to match the code table.
For example, add the parameter machine status (mach_sts) in the code table
value: 1 content: power on, value: 0 content: power off. When the component in dv is configured with a data source that uses this parameter, check the matching code table and select this indicator (mach_sts). If the indicator is 1, it will automatically convert to power on. Similarly, 0 will automatically convert to power off.
Click the More
button and click Code Table
- Value: As in the example 1->Power on, key is 1
- Content: The value is the power on
Alarm
Configure alarm rules to generate alarm information. Multiple alarm rules can be configured, and third-party applications can process their own business based on the alarm information.
Click the Alarm
-> Add Alarm
button to configure Alarm Level, Trigger Condition, Trigger Value, Alarm Message
- Alarm level: Custom alarm level in the system, Serious > Primary > Warning
- Trigger conditions and trigger values: For example, when the indoor temperature temp_inner condition is greater than (>) and the value is 30, an alarm message will be sent
- Alarm message: The message sent when the alarm condition is triggered
Operate
Edit
Click the More
button and select Edit
to slide out the edit box
- Name: The name of the data model. You can set a meaningful name.
- Machine Type: Machine Type, usually the device model
- Notes: Notes on the data model for easy reference
Delete Device
Delete all devices under the model and clear all device data
Click the More
button Click the Device
Delete
When the model is not published, it can be deleted
Click the More
button Click the Delete
Enable/Disable
Click the More
button Click Enable/Disable