A method and system for configuring interface variables, a mixing station
By automatically identifying and storing the mapping relationship between interface hardware addresses and variables in engineering equipment, the problem of low interface binding efficiency is solved, and automatic binding and efficient system debugging and maintenance are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHANGDE SANY MACHINERY CO LTD
- Filing Date
- 2022-09-30
- Publication Date
- 2026-06-12
AI Technical Summary
In existing technologies, the binding of interface hardware addresses and variables in engineering equipment is inefficient and requires frequent manual operations, resulting in low efficiency.
By identifying the mapping relationship between interface hardware addresses and variables in electrical drawings and automatically storing it in the target area of the lower-level machine, the accuracy and consistency of the mapping relationship are ensured through layer-by-layer verification using a mini-program and the upper-level machine.
Automatic binding of interface hardware addresses and variables was achieved, which improved binding efficiency, reduced the probability of incorrect mapping, reduced manual workload, and improved work efficiency in system debugging and maintenance.
Smart Images

Figure CN115878511B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of interface configuration, specifically to a method and system for configuring interface variables, and a mixing plant. Background Technology
[0002] In existing technologies, control systems for engineering equipment typically include an industrial control computer (i.e., the host computer), a controller, and its distributed expansion modules (i.e., the slave computers). Before the control system can perform its operations, both the host and slave computers need to be configured. Therefore, slave computer engineers perform software programming engineering practices based on electrical drawings, manually binding the controller's I / O hardware addresses (INPUT and OUTPUT) one-to-one with the corresponding input and output variables to complete the slave computer configuration. Once all slave computer configurations are complete, the control system can start running. During the operation of the control system, the slave computer executes the corresponding program content based on the input variables collected from the corresponding hardware INPUT address, performs calculations, assigns values to the output variables, and outputs digital or analog quantities and various communication data through the OUTPUT address, thereby controlling various actuators to perform corresponding actions.
[0003] As the scale of electrical equipment in engineering projects increases, the process of manually binding interface hardware addresses and variables requires frequent manual operations by lower-level engineers, resulting in low efficiency. Summary of the Invention
[0004] In view of this, this application provides a method and system for configuring interface variables, as well as a mixing plant, which solves the technical problem of low efficiency in binding interface hardware addresses and variables in the prior art.
[0005] According to one aspect of this application, this application provides a method for configuring interface variables, comprising: identifying interface hardware addresses and variables in an electrical drawing to obtain a mapping relationship between the interface hardware addresses and variables; and storing the mapping relationship in a target area of a lower-level machine.
[0006] In one possible implementation, storing the mapping relationship in the target area of the lower-level machine includes: sending the mapping relationship to the upper-level machine; the upper-level machine sending the mapping relationship to the lower-level machine; and the lower-level machine storing the mapping relationship in the target area of the lower-level machine.
[0007] In one possible implementation, identifying the interface hardware addresses and variables in the electrical drawings to obtain the mapping relationship between the interface hardware addresses and variables includes: identifying the interface hardware addresses and variables in the electrical drawings and generating an interface configuration relationship document, wherein the interface configuration relationship document includes the mapping relationship between the interface hardware addresses and variables; sending the mapping relationship to the host computer includes: converting the interface configuration relationship document into a configuration document that can be recognized by the host computer and sending the configuration document to the host computer; converting the interface configuration relationship document into a configuration document that can be recognized by the host computer includes: comparing the variables in the interface configuration relationship document with the variables in the standard variable database; when the comparison result is a match, converting the interface configuration relationship document into a configuration document that can be recognized by the host computer; when the comparison result is a mismatch, outputting a first prompt message to prompt the user to review and correct the electrical drawings.
[0008] In one possible implementation, the host computer sending the mapping relationship to the slave computer includes: the host computer generating a data packet that the slave computer can parse based on the configuration document, and sending the data packet to the slave computer; the host computer generating the data packet that the slave computer can parse based on the configuration document includes: the host computer comparing the variables in the configuration document with variables in a standard variable database; when the comparison result is a match, the host computer generating the data packet that the slave computer can parse based on the configuration document; when the comparison result is a mismatch, the host computer outputting a second prompt message, the second prompt message being used to prompt for correction of the configuration document.
[0009] In one possible implementation, the lower-level machine stores the mapping relationship in its target area, comprising: the lower-level machine parsing the data packet to obtain the mapping relationship, and comparing the variables in the mapping relationship with variables in a standard variable database; when the comparison result is a match, the lower-level machine stores the mapping relationship in its target area; when the comparison result is a mismatch, the lower-level machine outputs a third prompt message, which is used to prompt for correction of the mapping relationship.
[0010] In one possible implementation, after sending the data packet to the lower-level machine, the method further includes: the lower-level machine sending a feedback data packet to the upper-level machine based on the received data packet; when the upper-level machine determines, based on the feedback data packet, that the data packet received by the lower-level machine is inconsistent with the data packet sent by the upper-level machine, it resends the data packet to the lower-level machine.
[0011] In one possible implementation, after storing the mapping relationship in the target area of the lower-level machine, the method further includes: the upper-level machine correcting the mapping relationship and sending the corrected mapping relationship to the lower-level machine; after receiving the corrected mapping relationship sent by the upper-level machine, the lower-level machine updates the mapping relationship stored in the target area to the corrected mapping relationship.
[0012] In one possible implementation, after sending the mapping relationship to the host computer, the method further includes: the host computer obtaining the real-time status values of the variables corresponding to the variables in the mapping relationship, and displaying the mapping relationship and the real-time status values of the variables.
[0013] As a second aspect of this application, this application provides a system for configuring interface variables, comprising: a mini-program for identifying interface hardware addresses and variables in electrical drawings to obtain a mapping relationship between interface hardware addresses and variables; and a control device for storing the mapping relationship in a target area of a lower-level machine.
[0014] In one possible implementation, the applet is used to identify interface hardware addresses and variables in electrical drawings, generate an interface configuration relationship document, the interface configuration relationship document including the mapping relationship between interface hardware addresses and variables; and convert the interface configuration relationship document into a configuration document; wherein, the control device includes: a host computer, which is used to generate a data packet that the lower-level machine can parse based on the configuration document, and send the data packet to the lower-level machine; and a lower-level machine, which parses the data packet, obtains the mapping relationship, and stores the mapping relationship in the target area of the lower-level machine.
[0015] As a third aspect of this application, this application also provides a mixing plant, including: the system for configuring interface variables as described above.
[0016] The method for configuring interface variables provided in this application identifies the interface hardware addresses and variables in electrical drawings, obtains the mapping relationship between the interface hardware addresses and variables, and automatically stores the mapping relationship in the target area of the lower-level machine for subsequent use. This achieves automatic binding of interface hardware addresses and variables, improves binding efficiency, reduces the probability of incorrect mapping between variables and interface hardware addresses when manually sorting the mapping relationship, and also reduces the workload of electrical engineers. In addition, during the debugging or maintenance of the control system, when the mapping relationship between interface hardware addresses and variables is modified, the mapping relationship between interface hardware addresses and variables can be directly modified, and the modified mapping relationship between interface hardware addresses and variables can be reconfigured, improving work efficiency. Attached Figure Description
[0017] The above and other objects, features, and advantages of this application will become more apparent from the more detailed description of the embodiments of this application in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the embodiments of this application to explain this application and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.
[0018] Figure 1 The diagram shown is a flowchart illustrating a method for configuring interface variables according to an embodiment of this application.
[0019] Figure 2 The diagram shown is a flowchart illustrating a method for configuring interface variables according to another embodiment of this application.
[0020] Figure 3 The diagram shown is a flowchart illustrating a method for configuring interface variables according to another embodiment of this application.
[0021] Figure 4 The diagram shown is a flowchart illustrating a method for configuring interface variables according to another embodiment of this application.
[0022] Figure 5 The diagram shown is a flowchart illustrating a method for configuring interface variables according to another embodiment of this application.
[0023] Figure 6 The diagram shown is a flowchart illustrating a method for configuring interface variables according to another embodiment of this application.
[0024] Figure 7 The diagram shown is a flowchart illustrating a method for configuring interface variables according to another embodiment of this application.
[0025] Figure 8 The diagram shown is a schematic diagram illustrating the working principle of a system for configuring interface variables according to an embodiment of this application.
[0026] Figure 9 The diagram shown is a structural schematic of an electronic device provided in an embodiment of this application. Detailed Implementation
[0027] In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified. All directional indications (such as up, down, left, right, front, back, top, bottom, etc.) in the embodiments of this application are only used to explain the relative positional relationships and movement of the components in a specific posture (as shown in the figures). If the specific posture changes, the directional indication will also change accordingly. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.
[0028] Furthermore, the reference to "embodiment" herein means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0029] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0030] Figure 1 The diagram shown illustrates a method for configuring interface variables provided in this application. Figure 1 As shown, the method for configuring interface variables includes the following steps:
[0031] Step S10: Identify the interface hardware addresses and variables in the electrical drawings to obtain the mapping relationship between the interface hardware addresses and variables;
[0032] Optionally, step S10 can be executed by the mini-program. Specifically, the designed electrical drawings are uploaded to the mini-program, which automatically recognizes the interface hardware addresses (hereinafter referred to as IO hardware addresses) and their corresponding variables in the electrical drawings, thereby establishing a mapping relationship between the IO hardware addresses and the variables.
[0033] Specifically, the mapping relationship between I / O hardware addresses and variables can be represented by a first table document, which can reflect the mapping relationship between I / O hardware addresses and variables. The first table document includes an Excel document.
[0034] Specifically, electrical drawings can be created using drawing software such as EPLAN, and then the drawing software can transmit the completed electrical drawings to the mini-program.
[0035] Step S20: Store the mapping relationship in the target area of the lower-level machine so that it can be called in subsequent program execution to realize the function of corresponding input signal detection and output signal enable.
[0036] Specifically, the target area may include a cache area and / or a non-cache area.
[0037] Optionally, the target area can be the ferroelectric storage area of the lower-level machine. Storing the mapping relationship in the ferroelectric storage area of the lower-level machine can prevent the mapping relationship from being lost due to power failure. In other words, even in the event of power failure, the mapping relationship will not be lost, which can improve the reliability of the storage of the mapping relationship.
[0038] The method for configuring interface variables provided in this application automatically binds interface hardware addresses and variables by identifying the mapping relationship between I / O hardware addresses and variables, and storing the mapping relationship in the target area of the lower-level machine for subsequent calls. This improves binding efficiency and reduces the probability of incorrect mapping between variables and I / O hardware addresses when manually sorting out the mapping relationship, thus reducing the workload of lower-level machine engineers. In addition, during the debugging or maintenance of the control system, when the mapping relationship between I / O hardware addresses and variables is modified, the mapping relationship can be directly modified, and the modified mapping relationship can be reconfigured, improving work efficiency.
[0039] In one possible implementation, such as Figure 2 As shown, step S20 (storing the mapping relationship in the target area of the lower-level machine) specifically includes the following steps:
[0040] Step S201: Send the mapping relationship to the host computer;
[0041] Specifically, step S201 can be executed by a mini-program. That is, after the mini-program identifies the mapping relationship between the interface hardware address and the variable according to the electrical drawing in step S10, the mini-program can send the mapping relationship to the host computer.
[0042] Step S202: The host computer sends the mapping relationship to the slave computer;
[0043] That is, the host computer receives the mapping relationship sent by the applet and sends the mapping relationship to the slave computer.
[0044] Step S203: The lower-level machine stores the mapping relationship in the target area of the lower-level machine.
[0045] That is, the lower-level machine receives the mapping relationship sent by the upper-level machine and stores the mapping relationship in the target area of the lower-level machine.
[0046] In one possible implementation, such as Figure 3 As shown, step S10 (identifying the interface hardware addresses and variables in the electrical drawings to obtain the mapping relationship between the interface hardware addresses and variables) specifically includes the following steps:
[0047] Step S101: Identify the interface hardware addresses and variables in the electrical drawings and generate an interface configuration relationship document, which includes the mapping relationship between interface hardware addresses and variables.
[0048] At this point, step S201 (sending the mapping relationship to the host computer) specifically includes the following steps:
[0049] Step S2011: Convert the interface configuration relationship document into a configuration document that can be recognized by the host computer;
[0050] Step S2012: Send the configuration document to the host computer.
[0051] Specifically, such as Figure 3 As shown, step S2011 (converting the interface configuration relationship document into a configuration document recognizable by the host computer) can specifically include the following steps:
[0052] Step S2013: Compare the variables in the interface configuration relationship document with the variables in the standard variable database;
[0053] The standard variable database stores standard variables. The mini program compares the variables in the interface configuration relationship document one by one with the standard variable database. The comparison process is as follows: the mini program determines whether the variables in the interface configuration relationship document match the standard variables in the standard variable database.
[0054] When the comparison result shows that the variables in the interface configuration relationship document match the standard variables in the standard variable database, step S2014 is executed, that is, the applet converts the interface configuration relationship document into a configuration document that can be recognized by the host computer.
[0055] When the comparison result shows that the variables in the interface configuration relationship document do not match the standard variables in the standard variable database, that is, when the applet determines that the variables in the interface configuration relationship document do not match the variables in the standard database, it indicates that there may be errors in the variables in the electrical drawings or that the applet made an error in recognizing the electrical drawings. At this time, step S2015 is executed.
[0056] Step S2014: Convert the interface configuration relationship document into a configuration document that can be recognized by the host computer; when the comparison result in step S2013 shows that the variables in the interface configuration relationship document match the standard variables in the standard variable database, it means that all the variables in the interface configuration relationship document match the standard variables in the standard variable database. After converting the interface configuration relationship document into a configuration document, the variables in the converted configuration document can match the standard variables in the standard variable database.
[0057] Step S2015: When the comparison result is a mismatch, output the first prompt message to prompt the user to review and correct the electrical drawings.
[0058] When the mini-program determines that the variables in the interface configuration relationship document do not match the variables in the standard database, it generates the first prompt message. The user (e.g., the lower-level engineer) reviews whether the variables in the electrical drawings are accurate. When the lower-level engineer reviews the electrical drawings and determines that the variables in the drawings do not match the standard variables in the standard variable database, the lower-level engineer corrects the electrical drawings according to the standard variables. The lower-level engineer can improve and repair the electrical drawings according to the prompts of the mini-program, which reduces the workload of manually reviewing electrical drawings, thereby improving the efficiency and accuracy of the lower-level engineer's review of electrical drawings.
[0059] Once the downstream engineer reviews the electrical drawings and confirms that the variables in the electrical drawings match the standard variables in the standard variable database, it indicates that there are no errors in the electrical drawings. The problem may be that the mini-program made an error or did not fully identify the variables during the automatic recognition process, resulting in a mismatch between the variables in the interface configuration relationship document and the variables in the standard database. In this case, the mini-program will automatically correct the variables in the interface configuration relationship document according to the standard variables to ensure that the variables in the interface configuration relationship document match the standard variables in the standard variable database.
[0060] Optionally, before step S2013, step S2011 may also include the following steps:
[0061] Step S20130: Process the interface configuration relationship document to generate a valid configuration relationship document. Step S2013 then compares the variables in the interface configuration relationship document with the variables in the standard variable database.
[0062] Specifically, when the interface configuration relationship document is represented as a first table document, step S120130 is specifically: to process the data in the first table document and generate a first valid table document;
[0063] Specifically, the data processing methods adopted by the mini-program when processing the data in the first table document may include: deleting blank columns in the first table document. For example, if the first table document is an Excel document, if all the cells in a row of the Excel document are blank, then the row of cells is deleted; similarly, if all the cells in a column of the Excel document are blank, then the column of cells is deleted.
[0064] In one possible implementation, such as Figure 4 As shown, step S202 (the host computer sends the mapping relationship to the slave computer) may specifically include the following steps:
[0065] Step S2021: The host computer generates a data packet that the slave computer can parse based on the configuration document;
[0066] Step S2022: Send the data packet to the lower-level machine.
[0067] Specifically, step S2021 (the host computer generates a data packet that the slave computer can parse based on the configuration document) may include the following steps:
[0068] Step S2023: The host computer compares the variables in the configuration document with the variables in the standard variable database;
[0069] The host computer compares the variables in the configuration document with the standard variable database; that is, the host computer determines whether the variables in the configuration document match the standard variables in the standard variable database.
[0070] The standard variable database stores standard variables. The host computer compares the variables in the configuration document one by one with the standard variable database. The comparison process is as follows: the host computer determines whether the variables in the configuration document match the standard variables in the standard variable database.
[0071] When the comparison result in step S2023 is a match, that is, when the host computer determines that the variable in the configuration document matches the variable in the standard database, step S2024 is executed, that is, the host computer generates a data packet that the lower-level machine can parse based on the configuration document.
[0072] When the matching result in step S2023 is a mismatch, that is, the host computer determines that the variables in the configuration document do not match the variables in the standard database, it means that there is an error in the variables in the configuration document of the mini program. At this time, step S2025 is executed.
[0073] Step S2024: The host computer generates a data packet that the slave computer can parse based on the configuration document;
[0074] When the comparison result in step S2023 is a match, the host computer determines that the variables in the configuration document match the variables in the standard database, indicating that the variables in the configuration document are all accurate. Therefore, the configuration document can be directly parsed to generate a data packet that the lower-level computer can parse, thereby improving the accuracy of the variables in the data packet.
[0075] Step S2025: When the comparison result is a mismatch, the host computer outputs a second prompt message, which is used to prompt the correction of the configuration document.
[0076] When the mini-program receives the second prompt message from the host computer, the mini-program reviews the configuration document according to the second prompt message. When the mini-program determines that the variables in the configuration document do not match the standard variables in the standard variable database, the mini-program corrects the configuration document according to the standard variables and resends the corrected configuration document to the host computer. That is, the mini-program also needs to perform the following steps: the mini-program corrects the configuration document according to the standard variables.
[0077] When the mini-program determines, based on the second prompt, that the variables in the configuration document match the standard variables in the standard variable database, it indicates that there are no errors in the configuration document within the mini-program. At this point, the mini-program sends the message that the configuration document is error-free to the host computer. The host computer then knows from this message that the configuration document is error-free. However, it is possible that an error occurred during the host computer's parsing of the configuration document (i.e., the parsing failed). Therefore, the host computer automatically corrects the variables in the data packet based on the second prompt, thus ensuring that the variables in the data packet are consistent with the standard variables in the standard variable database.
[0078] This application verifies the variables in the mapping relationship between IO hardware addresses and variables through a mini-program and a host computer, making the binding relationship between IO hardware addresses and variables in the lower-level program more accurate and reducing the probability of binding errors.
[0079] In one possible implementation, such as Figure 5 As shown, step S203 (the lower-level machine stores the mapping relationship in the target area of the lower-level machine) specifically includes the following steps:
[0080] Step S2031: The lower-level machine parses the data packet to obtain the mapping relationship;
[0081] Step S2032: Compare the variables in the mapping relationship based on the variables in the standard variable database;
[0082] The lower-level machine compares the variables in the mapping relationship with the standard variable database; that is, the lower-level machine determines whether the variables in the mapping relationship match the standard variables in the standard variable database.
[0083] Step S2033: When the comparison result is a match, the lower-level machine stores the mapping relationship in the target area of the lower-level machine;
[0084] When the comparison result in step S2032 is a match, the lower-level machine determines that the variable in the mapping relationship matches the variable in the standard database, and then stores the mapping relationship in the target area of the lower-level machine.
[0085] Step S2034: When the comparison result is a mismatch, the lower-level machine outputs a third prompt message, which is used to prompt the correction of the mapping relationship.
[0086] When the comparison result in step S301 is a mismatch, that is, when the lower-level machine determines that the variable in the mapping relationship does not match the variable in the standard database, it indicates that the mapping relationship obtained by the lower-level machine after parsing the data packet may be incorrect and needs to be corrected.
[0087] In one possible implementation, after step S2022 (sending the data packet to the lower-level device), the method further includes the following steps:
[0088] Step S2026: The lower-level device sends a feedback data packet to the upper-level device based on the received data packet;
[0089] Step S2027: When the host computer determines that the data packet received by the slave device is inconsistent with the data packet sent by the host computer based on the feedback data packet, it resends the data packet to the slave device.
[0090] Steps S2026 and S2027 ensure that the data packets received by the lower-level machine are consistent with the data packets sent by the upper-level machine, thereby reducing the probability of data packet content loss.
[0091] In one possible implementation, such as Figure 7 As shown, after step S203 (storing the mapping relationship in the target area of the lower-level machine), the method further includes the following steps:
[0092] Step S204: The host computer corrects the mapping relationship;
[0093] Step S205: The host computer sends the corrected mapping relationship to the slave computer;
[0094] Step S206: After receiving the corrected mapping relationship sent by the host computer, the lower-level machine updates the mapping relationship stored in the target area to the corrected mapping relationship.
[0095] When the host computer corrects the mapping relationship, it sends the corrected mapping relationship to the slave computer, and the slave computer updates the mapping relationship stored in the target area to the corrected mapping relationship.
[0096] In one possible implementation, the method for configuring interface variables also includes the following steps:
[0097] Step S23: The host computer obtains the real-time status value of the variable corresponding to the variable, and displays the mapping relationship between the interface hardware address in the communication data packet and the variable, as well as the real-time status value of the variable, on the interface point status page.
[0098] As a second aspect of this application, this application also provides a system for configuring interface variables. Figure 8 The diagram shown is a schematic of the working principle of a system for configuring interface variables provided in this application. Figure 8 As shown, the system for configuring interface variables includes:
[0099] Mini Program 1 is used to identify interface hardware addresses and variables in electrical drawings and obtain the mapping relationship between interface hardware addresses and variables.
[0100] That is, mini-program 1 is used to execute the above-described step S10.
[0101] Specifically, the drawings are uploaded to mini-program 1. Mini-program 1 automatically recognizes the electrical drawings, identifies the interface hardware addresses (hereinafter referred to as IO hardware addresses) in the drawings and their corresponding variables, thereby forming a mapping relationship between IO hardware addresses and variables. The representation of this mapping relationship can be a first table document, that is, the first table document can reflect the mapping relationship between IO hardware addresses and variables. The first table document includes an Excel document.
[0102] Control device 2 is used to store the mapping relationship in the target area of the lower-level machine.
[0103] Specifically, when the mini-program 1 is also used to identify the interface hardware addresses and variables in the electrical drawings, generate an interface configuration relationship document, which includes the mapping relationship between interface hardware addresses and variables; and convert the interface configuration relationship document into a configuration document, i.e., when step S2011 (including steps S2013 and S2014) is executed, the control device 2 includes:
[0104] The host computer 21 is used to generate a data packet that can be parsed by the slave computer based on the configuration document, i.e., to execute step S2021 (including steps S2023 and S2024), and to send the data packet to the slave computer, i.e., to execute step S2022; and
[0105] The lower-level machine 22 parses the data packet, obtains the mapping relationship, and stores the mapping relationship in the target area of the lower-level machine, that is, it executes steps S2031-S2033.
[0106] Optionally, the mini-program 1 can be independent of the host computer 21, that is, the mini-program 1, the host computer 21 and the slave computer 22 are independent, and the three are connected to each other to jointly execute the configuration interface variable method described above to realize the configuration of the slave computer.
[0107] Optionally, Mini Program 1 can be a standalone mini program. For example, Mini Program 1 can be a standalone mini program installed on a mobile terminal or computer by the lower-level engineer to perform electrical drawing verification functions, as detailed below:
[0108] Once the lower-level engineer completes the drawing, they upload the completed electrical drawing to the mini-program. Mini-program 1 can automatically identify the I / O hardware addresses and variables on the drawing and generate a mapping relationship between the I / O hardware addresses and variables on the lower-level machine. Then, mini-program 1 can automatically compare the variables in the mapping relationship between I / O hardware addresses and variables with the standard variables in the standard variable database. When the variables in the mapping relationship between I / O hardware addresses and variables do not match the standard variables in the standard variable database, mini-program 1 will promptly remind the lower-level engineer. The lower-level engineer can then review and correct the electrical drawing according to the prompts from the mini-program, thus facilitating the verification and correction of the lower-level engineer's drawings, improving the lower-level engineer's work efficiency and drawing accuracy.
[0109] Optionally, the mini-program 1 can also be integrated into the host computer 21, that is, the functions of the mini-program 1 are integrated into the host computer control system, and the generated configuration document can be verified during equipment debugging and use.
[0110] This application provides a system for configuring interface variables. A mini-program automatically identifies drawings and generates a mapping relationship between I / O hardware addresses and variables on the lower-level machine. This mapping relationship is automatically stored in the target area of the lower-level machine for subsequent use. This achieves automatic binding of interface hardware addresses and variables, improving binding efficiency and reducing the probability of incorrect mappings between variables and I / O hardware addresses when manually sorting the mapping relationship. It also reduces the workload of lower-level machine engineers. Furthermore, during control system debugging or maintenance, when the mapping relationship between I / O hardware addresses and variables is modified, the mini-program can directly modify the mapping relationship and reconfigure the modified mapping relationship, further improving work efficiency.
[0111] As a third aspect of this application, this application also provides a mixer truck that includes the system for configuring interface variables as described above.
[0112] Below, for reference Figure 9 This describes an electronic device according to embodiments of the present application. Figure 9 The diagram shown is a structural schematic of an electronic device provided in an embodiment of this application.
[0113] like Figure 9 As shown, the electronic device 600 includes one or more processors 601 and memory 602.
[0114] The processor 601 may be a central processing unit (CPU) or other form of processing unit with data processing and / or information execution capabilities, and may control other components in the electronic device 600 to perform desired functions.
[0115] The memory 601 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program information may be stored on the computer-readable storage medium, and the processor 601 may run the program information to implement the methods for configuring interface variables or other desired functions of the various embodiments of this application described above.
[0116] In one example, the electronic device 600 may also include an input device 603 and an output device 604, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).
[0117] The input device 603 may include, for example, a keyboard, a mouse, etc.
[0118] The output device 604 can output various information to the outside. The output device 604 may include, for example, a display, a communication network, and remote output devices connected thereto.
[0119] Of course, for the sake of simplicity, Figure 9 Only some of the components of the electronic device 600 relevant to this application are shown in this illustration; components such as buses, input / output interfaces, etc., are omitted. In addition, the electronic device 600 may include any other suitable components depending on the specific application.
[0120] In addition to the methods and devices described above, embodiments of this application may also be computer program products, which include computer program information that, when run by a processor, causes the processor to perform the steps in the methods for configuring interface variables according to various embodiments of this application as described in this specification.
[0121] Computer program products can be written in any combination of one or more programming languages to perform the operations of the embodiments of this application. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0122] Furthermore, embodiments of this application may also be computer-readable storage media storing computer program information thereon, which, when run by a processor, causes the processor to perform the steps in the methods for configuring interface variables according to various embodiments of this application.
[0123] Computer-readable storage media may take the form of any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0124] The basic principles of this application have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this application are merely examples and not limitations, and should not be considered as essential features of each embodiment of this application. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the application to the necessity of employing the aforementioned specific details for implementation.
[0125] The block diagrams of devices, apparatuses, devices, and systems involved in this application are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.
[0126] It should also be noted that in the apparatus, equipment, and methods of this application, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered as equivalent solutions of this application.
[0127] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of this application. Therefore, this application is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features of the invention herein.
[0128] The above are merely preferred embodiments of this application and are not intended to limit the scope of this application. Any modifications or equivalent substitutions made within the spirit and principles of this application shall be included within the protection scope of this application.
Claims
1. A method for configuring interface variables, characterized in that, include: The interface hardware addresses and variables in the electrical drawings are identified to obtain the mapping relationship between the interface hardware addresses and variables, and an interface configuration relationship document containing the mapping relationship between the interface hardware addresses and variables is generated. When the interface configuration relationship document is in the form of a first table document, the blank columns in the first table document are deleted to generate a first valid table document, and the first valid table document is used as a valid interface configuration relationship document. The variables in the valid interface configuration relationship document are compared with the standard variables in the standard variable database to determine whether the variables in the valid interface configuration relationship document match the standard variables in the standard variable database. When the comparison result is a match, the interface configuration relationship document is converted into a configuration document that can be recognized by the host computer; When the comparison result is a mismatch, the first prompt message is output to prompt the user to review and correct the electrical drawings; Send the configuration document to the host computer; The host computer compares the variables in the configuration document with the variables in the standard variable database; When the comparison result is a match, the host computer generates a data packet that the slave computer can parse based on the configuration document; When the comparison result is a mismatch, the host computer outputs a second prompt message, which is used to prompt the correction of the configuration document; The data packet is sent to the lower-level machine; The lower-level machine stores the mapping relationship in the target area of the lower-level machine.
2. The method for configuring interface variables according to claim 1, characterized in that, The lower-level machine stores the mapping relationship in the target area of the lower-level machine, including: The lower-level machine parses the data packet, obtains the mapping relationship, and compares the variables in the mapping relationship with the variables in the standard variable database; When the comparison result is a match, the lower-level machine stores the mapping relationship in the target area of the lower-level machine; When the comparison result is a mismatch, the lower-level machine outputs a third prompt message, which is used to prompt the correction of the mapping relationship.
3. The method for configuring interface variables according to claim 1, characterized in that, After sending the data packet to the lower-level machine, the method further includes: Based on the received data packet, the lower-level machine sends a feedback data packet to the upper-level machine; When the host computer determines, based on the feedback data packet, that the data packet received by the slave device is inconsistent with the data packet sent by the host computer, it resends the data packet to the slave device.
4. The method for configuring interface variables according to claim 1, characterized in that, After storing the mapping relationship in the target area of the lower-level machine, the method further includes: The host computer corrects the mapping relationship and sends the corrected mapping relationship to the slave computer; After receiving the corrected mapping relationship sent by the host computer, the lower-level machine updates the mapping relationship stored in the target area to the corrected mapping relationship.
5. The method for configuring interface variables according to claim 1, characterized in that, After sending the configuration document to the host computer, the method further includes: The host computer obtains the real-time status values of the variables corresponding to the variables in the mapping relationship, and displays the mapping relationship and the real-time status values of the variables.
6. A system for configuring interface variables, characterized in that, include: The mini-program is used to identify interface hardware addresses and variables in electrical drawings, obtain the mapping relationship between interface hardware addresses and variables, and generate an interface configuration relationship document containing the mapping relationship between interface hardware addresses and variables. When the interface configuration relationship document is in the form of a first table document, the blank columns in the first table document are deleted to generate a first valid table document, and the first valid table document is used as a valid interface configuration relationship document. as well as A control device is used to compare the variables in the valid interface configuration relationship document with the standard variables in the standard variable database to determine whether the variables in the valid interface configuration relationship document match the standard variables in the standard variable database. When the comparison result is a match, the interface configuration relationship document is converted into a configuration document that can be recognized by the host computer; When the comparison result is a mismatch, the first prompt message is output to prompt the user to review and correct the electrical drawings; Send the configuration document to the host computer; The host computer compares the variables in the configuration document with the variables in the standard variable database; When the comparison result is a match, the host computer generates a data packet that the slave computer can parse based on the configuration document; When the comparison result is a mismatch, the host computer outputs a second prompt message, which is used to prompt the correction of the configuration document; The data packet is sent to the lower-level machine; The lower-level machine stores the mapping relationship in the target area of the lower-level machine.
7. The system for configuring interface variables according to claim 6, characterized in that, The mini-program is used to identify interface hardware addresses and variables in electrical drawings and generate an interface configuration relationship document, which includes the mapping relationship between interface hardware addresses and variables. And convert the interface configuration relationship document into a configuration document; The control device includes: The host computer is used to compare the variables in the configuration document with the variables in the standard variable database; When the comparison result is a match, the host computer generates a data packet that the slave computer can parse based on the configuration document; When the comparison result is a mismatch, the host computer outputs a second prompt message, which is used to prompt the correction of the configuration document; Send the data packet to the lower-level machine; and The lower-level machine parses the data packet, obtains the mapping relationship, and stores the mapping relationship in the target area of the lower-level machine.
8. A mixing plant, characterized in that, include: The system for configuring interface variables as described in claim 6 or 7.