Control program editing method, device, equipment and storage medium

By generating editing strategies and extracting control information to edit control programs, the problem of low efficiency caused by different editing methods of different users is solved, and efficient program editing is achieved.

CN115657585BActive Publication Date: 2025-01-21GOERTEK INC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211306774.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-24
Publication Date
2025-01-21
Estimated Expiration
2042-10-24

AI Technical Summary

Technical Problem

The prior art cannot effectively regulate the means of editing and controlling programs for different users, resulting in serious impact on program editing efficiency and accuracy.

Method used

By generating the editing strategy of the target device based on the device requirement information, the control information in the editing reference library is obtained and extracted, and the control program of the target device is edited based on this information.

Benefits of technology

It greatly improves the efficiency of program editing, effectively standardizes the means for users to edit programs, and avoids the problem of low efficiency caused by different editing means of different users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115657585B_ABST
    Figure CN115657585B_ABST
Patent Text Reader

Abstract

The present invention discloses a control program editing method, device, equipment and storage medium. The present invention discloses: generating an editing strategy corresponding to a target device according to device requirement information, acquiring an editing reference library corresponding to the target device according to the editing strategy, extracting control information required by the target device from the editing reference library, and editing the control program of the target device according to the control information; since the present application establishes an editing strategy for the target device according to the device requirement information, thereby extracting control information required by the target device from the editing reference library according to the editing strategy, and then generating the control program of the target device according to the control information, the program editing efficiency is greatly improved, and since the present application extracts control information for editing the control program from the editing reference library corresponding to the target device according to the device requirement, the means for users to edit the program is effectively standardized, and the problem of low program editing efficiency caused by different means for different users to edit the program is effectively avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electrical control technology, and in particular to a control program editing method, device, equipment and storage medium. Background Art

[0002] When different users (for example, electrical engineers) edit the control program of the same device, since different users have different writing methods such as process, ideas and structure of the program, different users need to spend a lot of time to understand and interpret the program structure and process that have been edited by other users. The existing technology cannot effectively standardize the means of editing programs by different users, which seriously affects the efficiency and accuracy of program editing.

[0003] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention

[0004] The main purpose of the present invention is to provide a control program editing method, device, equipment and storage medium, aiming to solve the technical problem that the prior art cannot effectively standardize the means of editing programs by different users, which seriously affects the efficiency and accuracy of program editing.

[0005] To achieve the above object, the present invention provides a control program editing method, the method comprising the following steps:

[0006] Generate an editing strategy corresponding to the target device according to the device requirement information;

[0007] Acquire an editing reference library corresponding to the target device according to the editing strategy, and extract control information required by the target device from the editing reference library;

[0008] The control program of the target device is edited according to the control information.

[0009] Optionally, acquiring an editing reference library corresponding to the target device according to the editing strategy includes:

[0010] Acquire an original reference library corresponding to the target device according to the device requirement information;

[0011] Screening the original reference information in the original reference library according to the editing strategy to obtain target reference information;

[0012] An editing reference library corresponding to the target device is constructed based on the target reference information.

[0013] Optionally, extracting the control information required by the target device from the editing reference library includes:

[0014] Determine each object to be controlled in the target device according to the editing strategy;

[0015] Obtain variable information of each object to be controlled;

[0016] The control information required by the target device is extracted from the editing reference library according to each variable information.

[0017] Optionally, extracting the control information required by the target device from the editing reference library according to each variable information includes:

[0018] Determine the target control point of each object to be controlled, as well as the variable name and variable address of each target control point according to each variable information;

[0019] The control information required by the target device is extracted from the editing reference library according to the variable name and the variable address.

[0020] Optionally, editing the control program of the target device according to the control information includes:

[0021] Acquire a function block corresponding to each object to be controlled in the target device according to the control information;

[0022] Acquire pin data of each pin in the function block according to the hardware device information of the target device and the preset control logic of the target device;

[0023] A control program of the target device is edited according to the pin data and the function block.

[0024] Optionally, after editing the control program of the target device according to the control information, the method further includes:

[0025] Obtaining a formula to be verified corresponding to the control program from a preset formula library according to the control information;

[0026] Obtaining the code to be verified corresponding to the control program from a preset code library according to the control information;

[0027] The control program is program-verified according to the formula to be verified and the code to be verified.

[0028] Optionally, after editing the control program of the target device according to the control information, the method further includes:

[0029] Determining annotation information of each control object of the target device according to the control information;

[0030] Generate program annotations according to the annotation information;

[0031] The program comments are imported into the control program.

[0032] In addition, to achieve the above object, the present invention also provides a control program editing device, the control program editing device comprising:

[0033] A program editing module is used to generate an editing strategy corresponding to the target device according to the device requirement information;

[0034] An editing reference module, used for acquiring an editing reference library corresponding to the target device according to the editing strategy, and extracting control information required by the target device from the editing reference library;

[0035] The program editing module is further used to generate a control program for the target device according to the control information.

[0036] In addition, to achieve the above-mentioned purpose, the present invention also proposes a control program editing device, which includes: a memory, a processor, and a control program editing program stored in the memory and executable on the processor, and the control program editing program is configured to implement the steps of the control program editing method described above.

[0037] In addition, to achieve the above-mentioned purpose, the present invention further proposes a storage medium, on which a control program editing program is stored, and when the control program editing program is executed by a processor, the steps of the control program editing method described above are implemented.

[0038] The present invention generates an editing strategy corresponding to a target device according to device requirement information, obtains an editing reference library corresponding to the target device according to the editing strategy, extracts control information required for the target device from the editing reference library, and edits a control program for the target device according to the control information; since the present invention establishes an editing strategy for the target device according to the device requirement information, thereby extracting the control information required for the target device from the editing reference library according to the editing strategy, and then generating a control program for the target device according to the control information, the program editing efficiency is greatly improved. Since the present application extracts the control information for editing the control program from the editing reference library corresponding to the target device according to the device requirement, the means by which users edit programs are effectively standardized, and the problem of low program editing efficiency caused by different means of editing programs by different users is effectively avoided. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is a structural diagram of a control program editing device for a hardware operating environment involved in an embodiment of the present invention;

[0040] Figure 2 A schematic flow chart of a first embodiment of a control program editing method of the present invention;

[0041] Figure 3 A schematic flow chart of a second embodiment of a control program editing method of the present invention;

[0042] Figure 4 A schematic flow chart of a third embodiment of a control program editing method of the present invention;

[0043] Figure 5 It is a structural block diagram of the first embodiment of the control program editing device of the present invention.

[0044] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION

[0045] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0046] Reference Figure 1 , Figure 1 A schematic diagram of the structure of a control program editing device for a hardware operating environment according to an embodiment of the present invention.

[0047] like Figure 1 As shown, the control program editing device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wireless-Fidelity, Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM), or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk storage. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0048] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the control program editing device, and may include more or less components than those shown in the figure, or combine certain components, or arrange the components differently.

[0049] like Figure 1As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a control program editing program.

[0050] exist Figure 1 In the control program editing device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the control program editing device of the present invention can be set in the control program editing device, and the control program editing device calls the control program editing program stored in the memory 1005 through the processor 1001, and executes the control program editing method provided by the embodiment of the present invention.

[0051] The embodiment of the present invention provides a control program editing method, referring to Figure 2 , Figure 2 It is a flowchart diagram of a first embodiment of a control program editing method of the present invention.

[0052] In this embodiment, the control program editing method includes the following steps:

[0053] Step S10: Generate an editing strategy corresponding to the target device according to the device requirement information.

[0054] It should be understood that the executor of the method of this embodiment can be a control program editing device with data processing, network communication and program running functions, such as a computer, or other devices or equipment that can achieve the same or similar functions. The above-mentioned control program editing device (hereinafter referred to as the program editing device) is used as an example for explanation here.

[0055] It should be noted that the device requirement information may be electrical design requirement information of the target device, for example, the device requirement information may include a cylinder for controlling the target device, etc. The target device may be an electrical device that requires electrical control or electrical design. The editing strategy may be a strategy for editing control information carried by a control system corresponding to the target device.

[0056] It should be understood that in order to effectively control the electrical equipment that needs to be controlled, the program editing device of this embodiment generates an editing strategy for the control information carried by the control system corresponding to the target device based on the electrical design requirement information input by the user, and edits the control information of the control system of the target device through the editing strategy, thereby achieving control of the target device.

[0057] Step S20: acquiring an editing reference library corresponding to the target device according to the editing strategy, and extracting control information required by the target device from the editing reference library.

[0058] It should be noted that the editing reference library can be an editing reference database containing historical operation information generated by the program editing device according to the historical editing log; the above historical editing log can be a log recording the control program of the target device edited by the historical user; the above historical operation information can be relevant information of the historical user programming operation, for example, the historical editing information and historical control information can include the formula, function and database information used in the historical user programming process. The above control information can be relevant information for editing the control program, and the control information can include the function block data of the editing program, the pin data corresponding to the function block and the programming function information.

[0059] The above historical user may be a user who has edited the control program in the past. The above editing reference library may include information such as the variable name and variable address of each control object of the target device, and the specific control point of each control object.

[0060] It should be understood that in order to effectively standardize the editing means and methods of the control program of the target device by different users, the program editing device of this embodiment builds an editing reference library based on the historical operation information of the historical users editing the control program in advance, so that when the user inputs the device requirement information, it generates the relevant editing strategy based on the device requirement information, obtains the editing reference library of the target device according to the editing strategy, and extracts the control information related to the editing strategy from the editing reference library, thereby realizing the rapid positioning of the control information required for the target device and effectively standardizing the editing means and methods of the control program of the target device by different users.

[0061] Step S30: Editing the control program of the target device according to the control information.

[0062] It should be noted that the control program can be the control program carried by the control system corresponding to the target device. In order to meet the device control requirements of different users on the target device, the user can edit the control program of the target device based on their respective electrical design requirement information, thereby realizing the control of the target device.

[0063] Furthermore, in order to effectively edit the control program, the above step S30 may include:

[0064] Acquire a function block corresponding to each object to be controlled in the target device according to the control information;

[0065] Acquire pin data of each pin in the function block according to the hardware device information of the target device and the preset control logic of the target device;

[0066] A control program of the target device is edited according to the pin data and the function block.

[0067] It should be noted that the function block may be a function block that pre-encapsulates a control program for an object to be controlled. The pin may be a function interface in the function block, and the program editing device may dock the function interface of the function block based on the pin data to achieve control of the function block, and the pin data may be function interface data. The preset control logic may be a preset program writing rule logic.

[0068] It should be understood that in order to effectively edit the control program, the program editing device of this embodiment obtains the function blocks corresponding to each object to be controlled in the target device according to the control information, and obtains the pin data of each pin in the function block according to the hardware device information of the target device and the preset control logic of the target device, so that the pins can be controlled based on the pin data to achieve control of the function blocks corresponding to each object to be controlled, and the control program of the target device is edited according to the pin data and the function blocks.

[0069] Furthermore, in order to effectively avoid errors in editing the control program, after the above step S30, the following steps may be included:

[0070] Obtaining a formula to be verified corresponding to the control program from a preset formula library according to the control information;

[0071] Obtaining the code to be verified corresponding to the control program from a preset code library according to the control information;

[0072] The control program is program-verified according to the formula to be verified and the code to be verified.

[0073] It should be noted that the preset formula library can be a preset database storing Excel formulas or other formulas. The above-mentioned formula to be verified can be a formula used by the editing control program. The above-mentioned preset code library can be a preset database storing standard codes.

[0074] It should be understood that in order to verify the edited control program to avoid program editing errors, the program editing device of this embodiment obtains the formula to be verified corresponding to the control program from the preset formula library according to the control information, obtains the code to be verified corresponding to the control program from the preset code library according to the control information, and verifies the formulas and codes in the edited control program according to the formula to be verified and the code to be verified to achieve program verification of the control program.

[0075] Furthermore, in order to improve the user experience and editing efficiency of subsequent user editing programs, after the above step S30, the following steps may be included:

[0076] Determining annotation information of each control object of the target device according to the control information;

[0077] Generate program annotations according to the annotation information;

[0078] The program comments are imported into the control program.

[0079] It should be noted that the comment information may be relevant comments of various editing information in the process of editing the control program.

[0080] This embodiment generates an editing strategy corresponding to the target device according to the device requirement information, obtains the editing reference library corresponding to the target device according to the editing strategy, extracts the control information required for the target device from the editing reference library, and edits the control program of the target device according to the control information; since the present invention establishes an editing strategy for the target device according to the device requirement information, thereby extracting the control information required for the target device from the editing reference library according to the editing strategy, and then generating the control program of the target device according to the control information, the program editing efficiency is greatly improved. Since the present application extracts the control information for editing the control program from the editing reference library corresponding to the target device according to the device requirements, the means by which users edit programs are effectively standardized, and the problem of low program editing efficiency caused by different means of editing programs by different users is effectively avoided.

[0081] refer to Figure 3 , Figure 3 It is a flowchart diagram of a second embodiment of a control program editing method of the present invention.

[0082] Based on the above first embodiment, in this embodiment, the step of acquiring the editing reference library corresponding to the target device according to the editing strategy includes:

[0083] Step S211: Acquire the original reference library corresponding to the target device according to the device requirement information.

[0084] It should be noted that the original reference library may be a reference library containing all historical user operation information on the control program of the target device.

[0085] It should be understood that in order to ensure the comprehensiveness of the information in the reference library and to avoid the problem of low programming efficiency due to insufficient information, the program editing device of this embodiment records and saves all historical operation information of historical users on the control program of the target device in advance, and then constructs the original reference library based on the historical operation information.

[0086] Step S212: Screening the original reference information in the original reference library according to the editing strategy to obtain target reference information.

[0087] It should be noted that the original reference information may be all historical operation information in the original reference library and all functional block information of the target device, etc. The target reference information may be the reference information required by the user obtained after screening.

[0088] It should be understood that in order to refine and simplify the reference information and thus eliminate invalid information that the user does not need, the program editing device of this embodiment determines the design requirements of the user's electrical design based on the editing strategy, determines the information screening conditions based on the design requirements, and screens the original reference information in the original reference library based on the information screening conditions to obtain the target reference information corresponding to the design requirements, that is, the reference information required by the user for this electrical design.

[0089] Step S213: constructing an editing reference library corresponding to the target device based on the target reference information.

[0090] It should be understood that in order to streamline the original reference library to facilitate user information acquisition, the program editing device of this embodiment constructs an editing reference library corresponding to the target device based on the target reference information, thereby enabling the user to quickly locate the reference information when editing the program.

[0091] This embodiment obtains the original reference library corresponding to the target device according to the device requirement information, filters the original reference information in the original reference library according to the editing strategy to obtain the target reference information, and constructs the edited reference library corresponding to the target device based on the target reference information; since this embodiment filters the original reference information in the original reference library according to the editing strategy to obtain the target reference information, it realizes the refinement of information in the original reference library, effectively improves the efficiency of information acquisition, and constructs the edited reference library corresponding to the target device based on the target reference information, thereby realizing the simplification of the reference library, improving the accuracy of the information in the edited reference library, and improving the efficiency of program editing.

[0092] refer to Figure 4 , Figure 4 It is a flowchart diagram of a third embodiment of a control program editing method of the present invention.

[0093] Based on the above first embodiment, in this embodiment, the step of extracting the control information required by the target device from the editing reference library includes:

[0094] Step S221: Determine each object to be controlled in the target device according to the editing strategy.

[0095] It should be noted that there are multiple objects to be controlled in the target device, and the objects to be controlled may be functional components or functional modules in the target device.

[0096] It should be understood that in order to accurately locate the object to be controlled in the target device, the program editing device in this embodiment determines each object in the target device according to the hardware information corresponding to the target device, and determines the object to be controlled among the objects according to the editing strategy.

[0097] Step S222: Obtain variable information of each object to be controlled.

[0098] It should be noted that the variable information may be the variable name and variable address of each object to be controlled.

[0099] It should be understood that, in this embodiment, the program editing device determines the system variables of the control system corresponding to the target device according to the editing strategy, and determines the variable name and variable address of each object to be controlled according to the system variables.

[0100] Step S223: extracting the control information required by the target device from the editing reference library according to each variable information.

[0101] It should be understood that the program editing device of this embodiment locates the specific control point of each object to be controlled according to each variable information, thereby determining the target control point of each object to be controlled, determines the variable name and variable address of each target control point according to the system variables, and extracts the control information required by the target device from the editing reference library according to the variable name and the variable address.

[0102] Further, in order to accurately extract the control information required by the target device from the edit reference library, the above step S223 may include:

[0103] Step S2231: determining the target control point of each object to be controlled, as well as the variable name and variable address of each target control point according to each variable information;

[0104] Step S2232: extracting the control information required by the target device from the editing reference library according to the variable name and the variable address.

[0105] It should be noted that the target control point may be a specific location on the object to be controlled that needs to be controlled. The variable name may be a parameter change name of the target control point. The variable address may be a parameter change address of the target control point.

[0106] This embodiment determines each object to be controlled in the target device according to the editing strategy, obtains variable information of each object to be controlled, and extracts control information required by the target device from the editing reference library according to each variable information; since this embodiment determines each object to be controlled in the target device according to the editing strategy, control positioning of the target device is achieved, and control information required by the target device is extracted from the editing reference library according to the variable information of each object to be controlled, thereby improving the efficiency of control information extraction.

[0107] In addition, an embodiment of the present invention further provides a storage medium, on which a control program editing program is stored. When the control program editing program is executed by a processor, the steps of the control program editing method described above are implemented.

[0108] Since the storage medium adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought by the technical solutions of the above embodiments, which will not be described one by one here.

[0109] Reference Figure 5 , Figure 5 It is a structural block diagram of the first embodiment of the control program editing device of the present invention.

[0110] like Figure 5 As shown, the control program editing device proposed in the embodiment of the present invention includes:

[0111] A program editing module 10 is used to generate an editing strategy corresponding to a target device according to device requirement information;

[0112] An editing reference module 20, configured to obtain an editing reference library corresponding to the target device according to the editing strategy, and extract control information required by the target device from the editing reference library;

[0113] The program editing module 10 is further used to generate a control program for the target device according to the control information.

[0114] Furthermore, the editing reference module 20 is also used to obtain an original reference library corresponding to the target device according to the device requirement information; filter the original reference information in the original reference library according to the editing strategy to obtain target reference information; and construct an editing reference library corresponding to the target device based on the target reference information.

[0115] Furthermore, the editing reference module 20 is also used to determine each object to be controlled in the target device according to the editing strategy; obtain variable information of each object to be controlled; and extract control information required by the target device from the editing reference library according to each variable information.

[0116] Furthermore, the editing reference module 20 is also used to determine the target control point of each object to be controlled, as well as the variable name and variable address of each target control point according to each variable information; and extract the control information required by the target device from the editing reference library according to the variable name and the variable address.

[0117] Furthermore, the program editing module 10 is also used to obtain the function blocks corresponding to each object to be controlled in the target device according to the control information; obtain the pin data of each pin in the function block according to the hardware device information of the target device and the preset control logic of the target device; and edit the control program of the target device according to the pin data and the function block.

[0118] Furthermore, the control program editing device also includes:

[0119] The program verification module 30 is used to obtain the formula to be verified corresponding to the control program from a preset formula library according to the control information; obtain the code to be verified corresponding to the control program from a preset code library according to the control information; and perform program verification on the control program according to the formula to be verified and the code to be verified.

[0120] Furthermore, the program editing module 10 is also used to determine annotation information of each control object of the target device according to the control information; generate program annotations according to the annotation information; and import the program annotations into the control program.

[0121] This embodiment generates an editing strategy corresponding to the target device according to the device requirement information, obtains the editing reference library corresponding to the target device according to the editing strategy, extracts the control information required for the target device from the editing reference library, and edits the control program of the target device according to the control information; since the present invention establishes an editing strategy for the target device according to the device requirement information, thereby extracting the control information required for the target device from the editing reference library according to the editing strategy, and then generating the control program of the target device according to the control information, the program editing efficiency is greatly improved. Since the present application extracts the control information for editing the control program from the editing reference library corresponding to the target device according to the device requirements, the means by which users edit programs are effectively standardized, and the problem of low program editing efficiency caused by different means of editing programs by different users is effectively avoided.

[0122] It should be understood that the above is only an example and does not constitute any limitation on the technical solution of the present invention. In specific applications, technicians in this field can make settings as needed, and the present invention does not limit this.

[0123] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of the present invention. In practical applications, technicians in this field can select part or all of them according to actual needs to achieve the purpose of the present embodiment, and no limitation is made here.

[0124] In addition, for technical details that are not described in detail in this embodiment, reference can be made to the control program editing method provided in any embodiment of the present invention, and will not be repeated here.

[0125] In addition, it should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0126] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0127] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory (ROM) / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0128] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A control program editing method, characterized in that: The control program editing method comprises: Generate an editing strategy corresponding to the target device according to the device requirement information; Acquire an editing reference library corresponding to the target device according to the editing strategy, and extract control information required by the target device from the editing reference library, wherein the editing reference library is a database containing historical operation information of historical users generated according to historical editing logs; Editing a control program of the target device according to the control information; The acquiring the editing reference library corresponding to the target device according to the editing strategy includes: Acquire an original reference library corresponding to the target device according to the device requirement information; Screening the original reference information in the original reference library according to the editing strategy to obtain target reference information; Building an editing reference library corresponding to the target device based on the target reference information; The extracting the control information required by the target device from the editing reference library includes: Determine each object to be controlled in the target device according to the editing strategy; Obtain variable information of each object to be controlled; The control information required by the target device is extracted from the editing reference library according to each variable information.

2. The control program editing method according to claim 1, characterized in that: The step of extracting the control information required by the target device from the editing reference library according to each variable information includes: Determine the target control point of each object to be controlled, as well as the variable name and variable address of each target control point according to each variable information; The control information required by the target device is extracted from the editing reference library according to the variable name and the variable address.

3. The control program editing method according to any one of claims 1 to 2, characterized in that: The step of editing the control program of the target device according to the control information comprises: Acquire a function block corresponding to each object to be controlled in the target device according to the control information; Acquire pin data of each pin in the function block according to the hardware device information of the target device and the preset control logic of the target device; A control program of the target device is edited according to the pin data and the function block.

4. The control program editing method according to any one of claims 1 to 2, characterized in that: After editing the control program of the target device according to the control information, the method further includes: Obtaining a formula to be verified corresponding to the control program from a preset formula library according to the control information; Obtaining the code to be verified corresponding to the control program from a preset code library according to the control information; The control program is program-verified according to the formula to be verified and the code to be verified.

5. The control program editing method according to any one of claims 1 to 2, characterized in that: After editing the control program of the target device according to the control information, the method further includes: Determining annotation information of each control object of the target device according to the control information; Generate program annotations according to the annotation information; The program comments are imported into the control program.

6. A control program editing device, characterized in that: The control program editing device comprises: A program editing module is used to generate an editing strategy corresponding to the target device according to the device requirement information; An editing reference module, used to obtain an editing reference library corresponding to the target device according to the editing strategy, and extract control information required by the target device from the editing reference library, wherein the editing reference library is a database containing historical operation information of historical users generated according to historical editing logs; The program editing module is further used to generate a control program for the target device according to the control information; The editing reference module is further used to obtain an original reference library corresponding to the target device according to the device requirement information; filter the original reference information in the original reference library according to the editing strategy to obtain target reference information; and construct an editing reference library corresponding to the target device based on the target reference information; The editing reference module is further used to determine each object to be controlled in the target device according to the editing strategy; obtain variable information of each object to be controlled; and extract control information required by the target device from the editing reference library according to each variable information.

7. A control program editing device, characterized in that: The control program editing device comprises: a memory, a processor, and a control program editing program stored in the memory and executable on the processor, wherein the control program editing program is configured to implement the control program editing method according to any one of claims 1 to 5.

8. A storage medium, characterized in that: The storage medium stores a control program editing program, and when the control program editing program is executed by the processor, the control program editing method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Electrical design method and electrical design system

    CN112541203A