Search

CN-122019004-A - Method and system for realizing interface function of equipment main control screen configuration drive board

CN122019004ACN 122019004 ACN122019004 ACN 122019004ACN-122019004-A

Abstract

The present application relates to the field of program configuration technologies, and in particular, to a method and a system for implementing an interface function of a device main control screen configuration driver board. The method comprises the steps of receiving interface configuration information input by a user through a configuration interface of a main control screen, storing the interface configuration information into a configuration file, reading and analyzing the configuration file when a main control program of the main control screen is started, constructing a logic control unit of each physical interface based on the interface configuration information, generating an interface function mapping table, responding to a control instruction input by the user through a device control interface of the main control screen, determining a target peripheral device, a corresponding target physical interface and a corresponding target logic control unit according to the control instruction, and calling the target logic control unit to enable the target logic control unit to send the control instruction through the target physical interface, wherein the control instruction is used for controlling the target peripheral device. The application can realize flexible control of various peripheral devices by using a set of main control program, and reduces the program cost.

Inventors

  • HOU RUIFENG
  • HOU LIMING
  • JIA SHILI
  • SU SHENG
  • WANG YINGJIE

Assignees

  • 河北普兰特生物科技有限公司

Dates

Publication Date
20260512
Application Date
20260124

Claims (10)

  1. 1. The method for realizing the interface function of the equipment main control screen configuration driving board is characterized by being applied to a system for realizing the interface function of the equipment main control screen configuration driving board, and the method is executed by the main control screen and comprises the following steps: Interface configuration information input by a user through a configuration interface of the main control screen is received, and the interface configuration information is stored into a configuration file, wherein the interface configuration information is used for defining logic functions of at least one physical interface; when a main control program of the main control screen is started, reading and analyzing the configuration file, constructing a logic control unit of each physical interface based on the interface configuration information, and generating an interface function mapping table; responding to a control instruction input by the user through a device control interface of the main control screen, determining a target peripheral device according to the control instruction, and inquiring the interface function mapping table to determine a target physical interface and a target logic control unit corresponding to the target peripheral device; And calling the target logic control unit to enable the target logic control unit to send the control instruction through the target physical interface, wherein the control instruction is used for controlling the target peripheral device.
  2. 2. The method for implementing the interface function of the device main control screen configuration driver board according to claim 1, wherein the logic function of each physical interface includes a physical interface identifier, an associated peripheral device type, an adapted protocol type, and a data parsing rule; The logic control unit for constructing each physical interface based on the interface configuration information and generating an interface function mapping table comprises: for each physical interface, loading a protocol driving module from a pre-configured protocol plug-in library according to the protocol type of the physical interface, and packaging the protocol driving module and the data analysis rule of the physical interface to obtain a logic control unit of the physical interface; Binding the physical interface identifier of each physical interface, the associated peripheral device type and the logic control unit into an association relation, and forming the interface function mapping table by the association relation of each physical interface.
  3. 3. The method for implementing the interface function of the device main control screen configuration driving board according to claim 1, wherein the control instruction includes an identifier of the target peripheral device and an operation type, and the operation type includes start control, stop control, parameter adjustment and data acquisition; the calling the target logic control unit comprises the following steps: The protocol driving module of the target logic control unit encodes the control instruction into a data frame conforming to the communication protocol of the target peripheral device and sends the data frame to the target peripheral device; And when the operation type is the data acquisition, receiving the peripheral device data after the format conversion and verification of the received original data of the target peripheral device by the target logic control unit based on the built-in data analysis rule, and updating and displaying the peripheral device data on a display interface of the main control screen.
  4. 4. The method for implementing the interface function of the equipment main control screen configuration driving board according to claim 1, wherein the interface configuration information further comprises a logic linkage rule, and the logic linkage rule defines trigger conditions and execution actions between different peripheral devices; after the target logic control unit finishes executing the control instruction of the target peripheral device, the method further comprises the following steps: detecting whether the running state of the target peripheral device meets the triggering condition defined in the logic linkage rule or not; If yes, determining a cooperative peripheral device to be triggered according to the logic linkage rule; Inquiring the interface function mapping table, and calling a cooperative physical interface and a cooperative logic control unit which are bound with the cooperative peripheral device; And calling the cooperative logic control unit to execute the execution action defined in the logic linkage rule so as to realize cooperative control across peripheral devices.
  5. 5. The method for implementing the interface function of the device main control screen configuration driver board according to claim 1, wherein after the receiving the interface configuration information input by the user through the configuration interface of the main control screen, the method further comprises: Verifying the interface configuration information based on a pre-configured verification rule base, wherein the verification rule base comprises an electrical compatibility rule and a protocol matching rule, the electrical compatibility rule is used for verifying electrical signal compatibility between a physical interface type and an associated peripheral device type, and the protocol matching rule is used for verifying matching between a protocol type of the physical interface and hardware communication capacity; And if any one of the electric compatibility rule and the protocol matching rule is not checked, displaying check error information containing error types and correction suggestions on the configuration interface, and stopping storing the interface configuration information to the configuration file.
  6. 6. The method for implementing the device master control screen configuration driver board interface function of claim 1, further comprising: If the protocol type adapted by the target peripheral device is not configured in the configuration file, a new protocol driving module corresponding to the new protocol type is constructed; Registering the new protocol driving module into a protocol plug-in library, and updating a list of protocol types which can be selected in the configuration interface after the new protocol types are successfully registered, so that the new protocol types become user selectable items.
  7. 7. The method for implementing the device master control screen configuration driver board interface function of claim 1, further comprising: the target logic control unit monitors the communication link quality data of the target physical interface and acquires the running state data of the target peripheral device through the target physical interface; comparing each index value in the received running state data and the received communication link quality data transmitted by the target logic control unit with a corresponding performance threshold value respectively; if the running state data has indexes which do not meet the corresponding performance threshold values, sending an index exceeding prompt signal; And if the index which does not meet the corresponding performance threshold exists in the communication link quality data, triggering an interface configuration self-adaptive adjustment mechanism.
  8. 8. The method for implementing the interface function of the device main control screen configuration driver board according to claim 7, wherein the trigger interface configuration adaptive adjustment mechanism comprises: determining a link index type which does not meet a corresponding performance threshold in the communication link quality data; Determining an optimization strategy according to the link index type, wherein the optimization strategy comprises at least one of replacing a protocol driving module, adjusting communication parameters of a corresponding protocol driving module and adjusting a data analysis rule; updating interface configuration information of the target physical interface based on the optimization strategy; reconstructing a target logic control unit of the target physical interface based on the updated interface configuration information; and updating the association relation among the target physical interface, the reconstructed target logic control unit and the target peripheral device in the interface function mapping table.
  9. 9. The system for realizing the interface function of the equipment main control screen configuration driving board is characterized by comprising a main control screen, a driving board and a configuration file storage module, wherein the main control screen comprises a configuration interface, an equipment control interface and a main control program; The configuration interface is used for receiving interface configuration information input by a user; the equipment control interface is used for receiving the control instruction input by the user; the driving board is connected with the main control screen and the peripheral device, integrates a plurality of physical interfaces, and is used for receiving a control instruction issued by the main control screen through the logic control unit and sending the control instruction to the peripheral device through the physical interfaces; And the configuration file storage module is used for storing the interface configuration information.
  10. 10. The system according to claim 9, wherein the main control program is configured to execute the method for implementing the device main control screen configuration driver board interface function according to any one of claims 1 to 8.

Description

Method and system for realizing interface function of equipment main control screen configuration drive board Technical Field The application relates to the technical field of program configuration, in particular to a method and a system for realizing interface functions of a device main control screen configuration drive board. Background In the field of industrial control, when the same driving board and main control screen program are used to realize free switching and accurate control on different peripheral devices such as a water pump, an air conditioner, an internal circulation fan and the like, the prior art generally needs to develop corresponding dedicated application programs aiming at interface functions of different peripheral devices, and write different programs into the main control screen to meet specific control requirements. However, the implementation mode needs to develop a program for each peripheral separately, so that the maintenance cost of the system is greatly increased, and a plurality of programs coexist and easily generate code redundancy, so that the error probability is improved, and the requirements of flexible access and efficient management and control of a plurality of peripherals in an industrial scene can not be met. Disclosure of Invention In order to solve the problem of high maintenance cost caused by independently developing programs for each peripheral interface in a multi-peripheral access scene in the prior art, the application provides a method and a system for realizing the interface function of a device main control screen configuration drive board. In a first aspect, the present application provides a method for implementing an interface function of a device main control screen configuration driving board, which adopts the following technical scheme: a realization method for equipment master control screen configuration drive board interface function includes: Interface configuration information input by a user through a configuration interface of the main control screen is received, and the interface configuration information is stored into a configuration file, wherein the interface configuration information is used for defining logic functions of at least one physical interface; when a main control program of the main control screen is started, reading and analyzing the configuration file, constructing a logic control unit of each physical interface based on the interface configuration information, and generating an interface function mapping table; responding to a control instruction input by the user through a device control interface of the main control screen, determining a target peripheral device according to the control instruction, and inquiring the interface function mapping table to determine a target physical interface and a target logic control unit corresponding to the target peripheral device; And calling the target logic control unit to enable the target logic control unit to send the control instruction through the target physical interface, wherein the control instruction is used for controlling the target peripheral device. By adopting the technical scheme, the interface configuration information input by a user is received and stored, the configuration is analyzed and the logic control unit and interface function mapping table is constructed when the system is started, the corresponding unit is responded to the control instruction and called to control the peripheral equipment, the flexible control of a set of main control program to adapt to various peripheral equipment is realized, independent development programs for different peripheral equipment are not needed, the development and maintenance cost is greatly reduced, and the code redundancy and error probability are reduced. The application may be further configured in a preferred example that the logical function of each physical interface includes a physical interface identification, an associated peripheral device type, an adapted protocol type, and a data parsing rule; The logic control unit for constructing each physical interface based on the interface configuration information and generating an interface function mapping table comprises: for each physical interface, loading a protocol driving module from a pre-configured protocol plug-in library according to the protocol type of the physical interface, and packaging the protocol driving module and the data analysis rule of the physical interface to obtain a logic control unit of the physical interface; Binding the physical interface identifier of each physical interface, the associated peripheral device type and the logic control unit into an association relation, and forming the interface function mapping table by the association relation of each physical interface. By adopting the technical scheme, the logical function composition of the physical interface is clarified, the driving module is loaded from the protocol plug-in