Based on the special use of alarms in Zijinqiao software - continuous reminder of alarms

The processing logic of the alarm function of the Zijinqiao configuration software system is that once the alarm condition is reached once, if the field measurement value has always met the current alarm condition, only the first alarm record at the beginning will be prompted. However, if it is necessary to give an alarm prompt after the current field measurement value continues to meet the alarm condition after the alarm occurs, this requires secondary development. The following example gives a solution to this requirement.

The specific requirements of the user are: When the on-site measured value meets the condition (here assumed to be greater than 3.9 or less than 3.5), the alarm is triggered immediately. The alarm should also be triggered when the next data also satisfies the condition (cannot be reported). Specifically, if the received data is not in the range of 3.5 to 3.9 and the value does not change, the alarm is reported in 60 seconds. If the received data is not in the range of 3.5 to 3.9, and the value is changed, the synchronization generates an alarm. The deviation alarm is taken as an example for explanation.

The following figure is a flow chart of the function implementation:

基于紫金桥软件中报警的特殊使用方法—对报警进行持续提示

Implementation:

First, the picture element configuration

1. Create an Access database in the project directory and create a new data table ALM1 as shown below:

基于紫金桥软件中报警的特殊使用方法—对报警进行持续提示

2. In the point configuration, create new simulation points TEST, TEST1, TEST2 and report relation data source point RP as shown below:

基于紫金桥软件中报警的特殊使用方法—对报警进行持续提示

3. Created the intermediate variable RECY. (The following will explain its role)

4, configuration report relationship source point connection string, specifically click on the button behind the connection string text box in the figure to configure as shown below:

基于紫金桥软件中报警的特殊使用方法—对报警进行持续提示

The resulting string is:

"Provider=Microsoft.Jet.OLEDB.4.0; Data Source="+GetAppPath()+"\Sql\AlmDB.mdb;User Id=admin;Password=;"

5. Create a new window Draw1, a free report ALM, a text object, and a button in the Zijinqiao development environment as shown below:

基于紫金桥软件中报警的特殊使用方法—对报警进行持续提示

6. Animated connection of associated text objects - analog input and output of TEST.PV, used to manually change the value of TEST.PV to simulate the scene.

7. Connect the animation of the button to connect the mouse script: #ALM.SaveExcel("",1,1); Later, you should verify whether the system can achieve the expected function by viewing the saved Excel file.

Second, the system control logic configuration

1, window script cycle script configuration, this part of the script is mainly to achieve the system flow chart read data from the relational data table and displayed on the report control. As shown below:

基于紫金桥软件中报警的特殊使用方法—对报警进行持续提示

2. In the free report ALM/free report setting/relational database connection setting, the source of the report relational library is configured, as shown below:

基于紫金桥软件中报警的特殊使用方法—对报警进行持续提示

3. After the response, the script/SQL is correctly returned to the script to determine whether the current TEST.PV meets the deviation alarm condition. If it is satisfied, the variable RECY is set to 1 otherwise set to 0, where RECY is an intermediate variable to trigger the relationship. The library is inserted into the switch function of the alarm record. The script is as follows:

基于紫金桥软件中报警的特殊使用方法—对报警进行持续提示

4, screen / script / conditional script configuration, here we have created a new conditional script InsertRecord as shown below, and the script control logic configuration as shown below:

基于紫金桥软件中报警的特殊使用方法—对报警进行持续提示

The logic for inserting an alarm record into a relational library is implemented by this conditional script.

Third, the operation of the project, the actual effect of the test system

1. Manually change TEST.PV=9.7 to meet the deviation alarm condition greater than 3.9 or less than 3.5 for a period of time as shown below:

基于紫金桥软件中报警的特殊使用方法—对报警进行持续提示

2. Manually change TEST.PV=3.6 does not meet the deviation alarm condition (greater than 3.9 or less than 3.5)

3, manually change TEST.PV = 1 to meet the deviation alarm conditions (greater than 3.9 or less than 3.5) for a period of time

4. Click the "Export" button to save the contents of the free report as an excel format file.

5, open the Excel table as shown below:

基于紫金桥软件中报警的特殊使用方法—对报警进行持续提示

6, analysis of the form record

Through the analysis of the table we can draw clear conclusions:

(1) If the current field measurement value satisfies the alarm condition and is inconsistent with the previous alarm value, an alarm will also be generated, that is, the relationship data table is inserted and displayed on the free report. For example, the first record in the table is TEST.PV=0 and the second record is TEST.PV=9.7.

(2) If the current field measurement meets the alarm condition and remains unchanged, the system inserts a record into the relational data table for 60 seconds and displays it on the free report control, for example when TEST.PV=9.7. That is, it meets the user's requirement that "if the received data has not been within the range of 3.5~3.9, then 60 seconds to report a police".

(3) If the current alarm value does not meet the alarm condition, no alarm will be generated. For example, let TEST.PV=3.6 not be recorded in the exported table. That is, the system only records the alarm record.

基于紫金桥软件中报警的特殊使用方法—对报警进行持续提示

(4) When the measured value of the field changes from the normal value to the value that meets the alarm condition, an alarm will be generated immediately. For example, if TEST.PV=3.6 becomes TEST.PV=1, an alarm will be generated. The 14th record in the Excel table is

TEST.PV=3.6 becomes an alarm generated when TEST.PV=1.

In summary, the tested system meets the needs of the user and can operate correctly and stably.


Solar Application

The major application of solar energy are as follows: (a) Solar water pumping (b) Solar led lights (c) Solar distillation (d) Solar portable power (e) Solar drying of agricultural and animal products (f) Solar Carport (g) Solar Battery (h) Solar electric power generation (i) Solar thermal power production (j) Solar green houses.

Sunket is professional on supplying all these solar products

Solar Application,Solar Lights ,Solar Pump System,Solar Carport,Portable Power Station

Wuxi Sunket New Energy Technology Co.,Ltd , https://www.sunketsolar.com