Alarm information is a common function of serial port screens, and we have introduced the basic usage of alarm information to realize the display and management of alarm information. This topic describes how to query alarm information and view alarm details.Previously, we introduced the basic usage of alarm information and implemented the display and management of alarm information. This topic describes two advanced uses of alarm information:
Query alarm information. If there are a large number of alarms, we need to quickly find the alarm information we want through queries.
View the details of the alarm information. If an alarm message is long and the window is small, we need to view the complete alarm information by viewing the details.
Although it is said to be advanced usage, it is actually very simple, and you don't need to write **, just design the interface and add binding rules.
To create a project from a template, copy the HMI Template App to the HMI Log Message.
It is best not to put the first project in another directory, because you need to modify the path in the configuration file to put it in other directories, and then consider putting it in other directories after you are familiar with it. Do not use Chinese and spaces in the path to avoid unnecessary trouble.
Use awstudio to open the project. in the log message directory abovejson file. Inside there is an empty window, on which the interface is designed to resemble the following:
Main window.
Detail window.
The display and management of alarm information have been described above, but only the binding rules for querying and viewing details are described here.
4.1 Data binding for the query.
4.1.1 Alarm level.
4.1.2 Alarm start date.
4.1.3 The alarm end date.
4.1.4 Alarm device.
4.1.5 Keywords.
4.1.6 Query commands.
4.1.8 Specify the model of the window.
Specifies that the model of the window is log message
4.2 View the data binding for details.
4.2.1 Alarm level.
4.2.2 The date and time of the alarm.
4.2.3 Alarm device.
4.2.4 Keywords.
4.2.5 Specify the model of the window.
Specifies that the model of the window is log message
The name of the window to view details (the xml file has the same name as the window name) is fixed and must be Log Message Detail
Modify the design default data settingsjson file, enable alarm information:
Run the demo program in the bin directory.This project does not write interface-related **, awstudio generates some **frameworks in the src pages directory, these ** are not used, you can delete it or leave it alone, but you can't add it to the compilation.
In practice, you can make adjustments based on the demo log message3, and you don't need to repeat the above process, but it's best to understand how it works.
zlg**:ZLG Developer Community:
For more technical dry goods, please pay attention to "ZLG Zhiyuan Electronics" WeChat***