KingFusion connects to KingIOServer data through a dynamic library

Hello, everyone, I am Lei Gong!
This section mainly tests the operation of KingFusion accessing KingIOServer data through the dynamic library, realizing fast subscription, writing back real-time data and client display.

Note:
1. Windows version: When KingFunsion interacts with KingIOServer data, both dynamic library and network methods can be used, and dynamic library is recommended.
2. Linux version: When data interaction between KingFunsion and KingIOServer, the data interaction can only be realized through the network. (KingIOServer version: KingIOServer3.7 Industrial Internet version)
insert image description here

1. Test results

Running effect:
1. KingFusion running interface:
insert image description here

2. KingIOServer running interface

insert image description here

2. Operation steps

1. KingIOServer project

The creation of the KingIOServer project can refer to
"[KingSCADA] How to Build a Hardware System and Related Variables".

2. Create a data source project

2.1. Create a new data source project

Open KingFusion's development center , click to enter the data source engineering configuration , and enter the data source development system.

insert image description here

In the data source development system —> click [Data Source Access Project Management] —> click the [New] button —> enter the project name —> click the [OK] button.

insert image description here

2.2. Create a data source object

2.2.1. Double-click the data source to access the project name to enter the project configuration interface.

insert image description here

2.2.2. Click the [New] button —> select [KingIOServer_Windows] for the data source type —> click the [OK] button.

insert image description here

2.2.3. Create a new data source object
1>. Data source name : required; (Chinese is not recommended).
2>, Connection method : select dynamic library, required;
3>, IP: IP of KingIOServer running device, required;

insert image description here

2.3, Create a new connection object

2.3.1. Refer to the following steps to operate:

1>. Connection name : custom, required;
2>. Authorized user : click to select a user in the pop-up interface;

insert image description here

2.3.2. Test

1>. After filling in the information, you can click the test button to test whether the connection to KingIOServer is normal. If the connection is successful, a prompt of successful connection will pop up.

insert image description here

2>. If the connection fails, you can check whether KingIOServer is running and whether the input parameters are correct.

2.3.3. Release

1>. After completing the above configuration, the data source access project is created.
2>. Close the project configuration interface, select the corresponding project, and publish the data source access project.

insert image description here
insert image description here

3>, then enter the operation and maintenance center, add, deploy, and start the released project in the operation and maintenance center .

insert image description here

3. Client engineering

3.1. For the creation process of the client project, please refer to "[KingFusion] Steps to Create a Client Project with KingFusion3.6".

3.2. Open the KingFusion development center , and click to enter the client engineering configuration .

insert image description here

3.3. Enter the client development interface, select the client project to be entered, double-click the project name, and enter the client project configuration interface.

insert image description here

3.4. On the client configuration interface, click [Data Source Management] —> click [New] —> fill in the data source [Name] —> select [APP Name] and [Data Source Name] —> click the [OK] button.

insert image description here

3.5. After the data source is created, click [Update Variable], and [Update Data Source Variable Successfully] will pop up, indicating that the data source can be accessed normally.

insert image description here

3.6. Create a new project variable.
Click [Project Variable] on the project configuration interface, click the [New] button, select [Analog] for the type, select the mapping relationship, and select the variable to be mapped to KingIOServer. The dynamic library connection method is shown in the pop-up window below. In the query/subscription method, only query can be selected. (Note: Subscriptions can only be connected via the Internet)

There will be many variable points in the actual project. At this time, it is time-consuming and laborious to create one by one. At this time, it can be realized by batch import.
Click the [Quick Add] button, the following window will pop up, select the data source just added, it can be automatically enumerated to the KingIOServer variable, select the variable to be added, and then click the [OK] button to import in batches.

insert image description here

The import report will pop up, and you can view the number of successfully imported variables, the number of failed import variables, and warning information.

insert image description here

3.7. Interface associated variables

Open the interface where variables need to be connected, double-click the text, and add values ​​to it to output animation connections.
Click "+", select [Value Output] -> [Analog Value Output], and associate the corresponding variable.

insert image description here

3.8. Save interface

insert image description here

3.9. Return to the client project interface, publish the client project, add, deploy, and start the client project in the operation and maintenance center.

insert image description here

postscript

The above is the test process for KingFusion to connect to KingIOServer data through a dynamic library. In case of failure to connect to KingIOServer, you can manually
change the nginxType field in the KF configuration file KingFusion3.6\config\proxyconfig.json to 2 (the default is 1), restart the operation and maintenance agent after the modification, and redeploy the KP and data interface APP.

Guess you like

Origin blog.csdn.net/u013097500/article/details/131697832