Hello, friends, I am Lei Gong!
A recent project used KingFusion to implement the real-time alarm function. It records how KingFusion quickly accesses the alarm data in KingSCADA and displays the real-time alarm data on the KingFusion client.
Note: KingSCADA test version: KingSCADA 3.7
1. Implementation process
2. Realize the effect
Publish the KingFusion client alarm project to the operation and maintenance center, add, deploy, and start the client project in the operation and maintenance center, and then view the alarm data display effect in the running state.
1. Trigger the alarm in the KingSCADA running interface (the upper part is KingSCADA, the lower part of the browser displays KingFusion).
2. Confirm the alarm from KingSCADA, and KingFusion will display the confirmation status.
3. Confirm the alarm information from the Kingfusion side
(there are some problems with this function during the test. The actual IO point alarm cannot be confirmed from the KF, but the alarm information can be confirmed from the KS side. However, the memory variable alarm point used for testing can be confirmed on both sides)
4. When the alarm information is automatically restored, the KS side displays alarm recovery and the KF side alarm information disappears.
3. Implementation steps
1. New KingSCADA alarm project
Create a KingSCADA alarm project, create two alarm points, switch alarm points (alarm point 1 and alarm point 2), and drag the alarm control to display real-time alarm information.
2. Create a new KingFusion data source project
Open the KingFusion Development Center, click to enter the data source engineering configuration, and create a new data source access project.
Select data source access project management and create a new KS_BJ01 access project.
After entering the project, create the data source KS_BJSJ.
Data source type: select KingSCADA;
connection method: dynamic library;
IP: fill in the IP of the computer where KingSCADA is located;
data type: select real-time data and alarm data;
real-time library port: 8800;
alarm library port: 12347;
timeout (ms): 3000 ;
Web listening port: 9433;
Then create a connection object, click on the data source KS_BJSJ, a new connection object will pop up, enter the connection name, in the select user window that pops up for authorized users, select the user, click Test on the left back, and it will prompt that the test connection is successful.
Finally, publish the project to the operation and maintenance center, add, deploy, and start.
3. Create a new KingFusion client project
3.1. Configure alarm data source
3.1.1. From the main interface of the development center, click Client Engineering Configuration to enter the client development interface.
3.1.2. Create a client project; select data source management, enter the corresponding basic information in the new data source interface, select the project name and match the KS data source name.
3.1.3. Note: The name here must be consistent with the name of the data source, otherwise it will cause errors and fail to connect to KingSCADA.
3.1.4. After creation, click Update Variable. After the update success prompt box pops up, complete the configuration of the alarm data source.
3.1.5. Click to update variables, prompt -4, what is the reason?
**Error reason:** Because KingSCADA is not running.
Solution : Just run KingSCADA.
3.1.6. When I click to update variables, it prompts 536904118. What is the reason?
Reason for the error : The error code is returned by KS. The error code means that KS is not authorized.
Solution : KS applies for authorization.
3.2. Configure alarm window interface
3.2.1. In the client project, select page management, create a new page, and real-time alarm window.
3.2.2. Double-click to enter the created interface. From the chart component on the left, find the alarm window and drag it to the drawing area.
3.2.3. Click to select the alarm window control and configure the following in the properties.
Basic properties: Select "Real-time Alarm Window" for type.
Data source configuration: Select the data source "KS_BJSJ" created previously.
3.3. Alarm project release and operation
Publish the newly created client alarm project to the operation and maintenance center, add, deploy, and start the client project in the operation and maintenance center interface, and then view the effect of the alarm data in the running state.
4. Postscript
The above is a record of the process of using KingFusion to realize real-time alarm based on the alarm function of KingSCADA. If there are any errors, you are welcome to criticize and correct them.