Custom logic programming method and system, electronic equipment and medium
By introducing an independent programming interface in the lower computer programming, users can independently design process logic and load it into the lower computer, solving the inflexible and high-cost problems of traditional programming methods and achieving more efficient and flexible lower computer programming.
Patent Information
- Application Number
- CN202411569112.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-03-18
AI Technical Summary
The traditional lower computer programming method has problems such as inflexibility, low timeliness and high labor costs, which is difficult to meet the rapid changes and diversity of lower computer customization needs in different industries.
By providing an independent programming interface, users can independently set the module parameters and routing connections of the function block, generate target process logic, and load it into the lower computer, which executes the target logic program according to the set time slice cycle.
It realizes the flexibility of process logic design while reducing time and labor costs, and can quickly respond to changes in user needs and improve production flexibility and efficiency.
Smart Images

Figure CN119644897A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of open programming technology, and in particular to a custom logic programming method, system, electronic device and medium. Background Art
[0002] At present, in the field of industrial automation, slave computers are widely used as key components in various production equipment, and their performance directly affects production efficiency and product quality. In order to meet the specific needs of different industries, slave computers usually need to have certain programmable capabilities to adapt to different working environments and task requirements. However, the traditional slave computer programming method mainly relies on manufacturers to customize and develop according to the specific needs of users. This method has the following obvious disadvantages:
[0003] 1. Inflexibility: Due to the long customized development cycle, when user needs change, it is difficult to quickly adjust the working mode or parameter settings of the lower computer, which affects the flexibility of production.
[0004] 2. Low efficiency: The entire process from proposing a demand to obtaining a lower-level computer program that meets specific needs takes a long time. This inefficiency is particularly prominent when the equipment operating status needs to be adjusted in an emergency.
[0005] 3. High labor costs: Every change requires the intervention of professional developers, which not only increases labor costs, but may also lead to problems such as poor communication and misunderstanding, further affecting the progress of the project.
[0006] Generally, the requirements for lower computers vary in different industries. For example, in the manufacturing industry, it may be necessary to frequently adjust parameters such as speed and position on the production line; while in the field of logistics and warehousing, more emphasis is placed on the direction control and safety settings of the handling equipment. These differentiated application scenarios require the lower computer to have a higher degree of customization. Therefore, there is an urgent need for a more flexible and open secondary development programming method that can directly give customization permissions to end users through a convenient medium, so as to achieve a more efficient and low-cost lower computer programming solution. Summary of the invention
[0007] In view of this, the embodiments of the present application at least provide a custom logic programming method, system, electronic device and medium, which can reduce time cost and labor cost while improving the flexibility of process logic design.
[0008] This application mainly includes the following aspects:
[0009] In a first aspect, an embodiment of the present application provides a custom logic programming method, which is applied to a process logic autonomous customization system, wherein the process logic autonomous customization system includes a host computer and a slave computer; the method includes:
[0010] Providing an autonomous programming interface for process engineering via the host computer;
[0011] In response to the user's setting operation of module parameters of at least one functional block and routing connections between functional blocks according to process requirements on the autonomous programming interface, a target process logic is generated; the module parameters include input parameters, output parameters and internal logic algorithms;
[0012] In response to the target operation of the user on the target process logic, loading the target logic program generated based on the target process logic into the lower computer;
[0013] In response to the user's operation on the target logic program, the lower computer cyclically executes the target logic program according to a set time slice to achieve the process requirement.
[0014] In a possible implementation, in response to the user's triggering operation on the logic loading control on the autonomous programming interface, the preset programming logic is read from the lower computer, and the preset programming logic is displayed on the autonomous programming interface.
[0015] In a second aspect, the embodiment of the present application further provides a process logic autonomous customization system, the process logic autonomous customization system comprising an upper computer and a lower computer; wherein,
[0016] The upper computer is used to provide an autonomous programming interface for process engineering; in response to a user setting operation on the module parameters of at least one functional block and the routing connection between the functional blocks according to process requirements on the autonomous programming interface, generate a target process logic; the module parameters include input parameters, output parameters and internal logic algorithms; in response to the user's target operation on the target process logic, load the target logic program generated based on the target process logic into the lower computer;
[0017] The lower computer is used to respond to the user's operation on the target logic program and cyclically execute the target logic program according to a set time slice to achieve the process requirement.
[0018] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the custom logic programming method described in the first aspect or any possible implementation manner of the first aspect.
[0019] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the custom logic programming method described in the first aspect or any possible implementation scheme of the first aspect are executed.
[0020] The embodiments of the present application provide a custom logic programming method, system, electronic device and medium, which generate a target process logic by responding to a user's setting operation on the module parameters of the function blocks and the routing connections between the function blocks on an autonomous programming interface; in response to a user's download operation on the target process logic, load the target logic program generated based on the target process logic into a lower computer; in response to a user's running operation on the target logic program, the lower computer cyclically executes the target logic program according to a set time slice to achieve process requirements. Compared with the traditional lower computer programming method that mainly relies on manufacturers to perform customized development according to the specific needs of users, the embodiments of the present application provide a flexible and open secondary development programming method, which gives customization authority to users through an autonomous programming interface, allowing users to independently design process logic, while reducing time and labor costs, and improving the flexibility of process logic design.
[0021] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0023] Figure 1 A flow chart of a custom logic programming method provided by an embodiment of the present application is shown;
[0024] Figure 2 A schematic diagram showing the working process of the process logic autonomous customization system provided in an embodiment of the present application;
[0025] Figure 3 A schematic diagram showing a parameter setting method provided in an embodiment of the present application;
[0026] Figure 4 A schematic diagram showing an input setting method provided in an embodiment of the present application;
[0027] Figure 5 A schematic diagram showing a menu routing setting method provided in an embodiment of the present application;
[0028] Figure 6 A schematic diagram of a free programming page topology diagram provided in an embodiment of the present application is shown;
[0029] Figure 7 A schematic diagram showing the re-application of the free programming result provided in the embodiment of the present application is shown;
[0030] Figure 8 A functional module diagram of a custom logic programming system provided by an embodiment of the present application is shown;
[0031] Fig. 9 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0032] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art, under the guidance of the content of the present application, can add one or more other operations to the flowchart, or remove one or more operations from the flowchart.
[0033] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0034] In order to enable those skilled in the art to use the contents of this application, the following implementation methods are given in combination with the specific application scenario of "open programming of the lower computer". For those skilled in the art, the general principles defined here can be applied to other embodiments and application scenarios without departing from the spirit and scope of this application.
[0035] The following methods, devices, electronic devices or computer-readable storage media of the embodiments of the present application can be applied to any scenario that requires open programming of the lower computer. The embodiments of the present application are not limited to specific application scenarios. Any solution using the custom logic programming method and device provided by the embodiments of the present application is within the scope of protection of the present application.
[0036] It is worth noting that before this application was proposed, the traditional lower-level computer programming method mainly relied on manufacturers to customize and develop according to the specific needs of users. This method has the following obvious disadvantages:
[0037] 1. Inflexibility: Due to the long customized development cycle, when user needs change, it is difficult to quickly adjust the working mode or parameter settings of the lower computer, which affects the flexibility of production.
[0038] 2. Low efficiency: The entire process from proposing a demand to obtaining a lower-level computer program that meets specific needs takes a long time. This inefficiency is particularly prominent when the equipment operating status needs to be adjusted in an emergency.
[0039] 3. High labor costs: Every change requires the intervention of professional developers, which not only increases labor costs, but may also lead to problems such as poor communication and misunderstanding, further affecting the progress of the project.
[0040] Generally, different industries have different requirements for lower computers. For example, in manufacturing, it may be necessary to frequently adjust parameters such as speed and position on the production line; while in the field of logistics and warehousing, more emphasis is placed on the direction control and safety settings of handling equipment. These differentiated application scenarios require the lower computer to have a higher degree of customization.
[0041] In response to the above problems, the embodiment of the present application generates the target process logic by responding to the user's setting operation on the module parameters of the function blocks and the routing connection between each function block on the autonomous programming interface; in response to the user's target operation on the target process logic, the target logic program generated based on the target process logic is loaded into the lower computer; in response to the user's operation on the target logic program, the lower computer executes the target logic program in a loop according to the set time slice to achieve the process requirements. The embodiment of the present application provides a flexible and open secondary development programming method, which gives the user customization authority through the autonomous programming interface, allowing the user to independently design the process logic, while reducing time and labor costs, and can also improve the flexibility of process logic design.
[0042] To facilitate the understanding of the present application, the technical solution provided by the present application is described in detail below in conjunction with specific embodiments.
[0043] Figure 1This is a flow chart of a custom logic programming method provided by an embodiment of the present application. Figure 1 As shown, the custom logic programming method provided in the embodiment of the present application is applied to a process logic autonomous customization system, wherein the process logic autonomous customization system includes a host computer and a slave computer; and includes the following steps:
[0044] S101: Providing an autonomous programming interface for process engineering via the host computer.
[0045] It should be noted that the host computer usually refers to a PC or server. The application software corresponding to the driver runs on the host computer. The host computer usually undertakes higher-level control and management tasks, such as debugging parameters, monitoring parameters, sampling curves, analyzing data or generating reports. The host computer communicates with the lower computer through a network or direct connection, sends instructions to the lower computer, and receives feedback information. The lower computer is such as an embedded system or a microcontroller. The lower computer is responsible for performing specific physical operations or control processes, such as motor control, sensor data acquisition, etc. It receives commands or data from the host computer and performs corresponding actions or processes information accordingly. The lower computer usually has real-time processing capabilities and can run independently. The lower computer may need to process complex control algorithms, such as PID control, to achieve precise positioning, speed control, etc. The driver is the actual carrier of the lower computer, and the lower computer and the driver can be regarded as the same concept.
[0046] For example, Figure 2 FIG. 1 is a schematic diagram showing the working process of the process logic autonomous customization system provided in the embodiment of the present application. Figure 2 As shown, the process logic autonomous customization system includes a host computer and a slave computer. In addition, Figure 2 The communication connection between the two and the working process are shown in the figure. Among them, the upper computer is usually the application software running on the PC, such as the debugging software corresponding to the driver. The driver is a physical entity, and the executor is the lower computer. The upper computer establishes a communication connection with the device (such as the driver) in a physical or virtual way. The upper computer sends a read or download instruction, and the device responds and executes the instruction. At the same time, the device can send instructions to the next level of execution layer (such as a motor). The lower computer can accept the instructions of the upper computer and execute the corresponding process requirements.
[0047] Among them, the autonomous programming interface provided in the embodiment of the present application is a graphical user interface, which can also be understood as a quick programming platform interface. Users can perform secondary development according to their own needs through the autonomous programming interface to customize process logic and control methods.
[0048] S102: In response to the user's setting operation of module parameters of at least one functional block and routing connections between functional blocks according to process requirements on the autonomous programming interface, a target process logic is generated; the module parameters include input parameters, output parameters and internal logic algorithms.
[0049] In specific implementation, the autonomous programming interface in the embodiment of the present application provides users with an open and easy-to-use secondary programming method. Users can independently design existing data, set input values in function blocks, perform algorithm combinations, associate output values with connectors or use them as function block inputs for the next algorithm design, generate required parameters, and form customized, modular, and portable process logic for production. Among them, process logic is the content that users usually edit to achieve, and the actual application scope should not be limited by this.
[0050] Here, in the functional blocks used in the embodiments of the present application, the internal logic algorithms include but are not limited to logical operations, mathematical operations, signal processing, etc. Any functional block can have one or more input parameters. Similarly, a functional block must have an output parameter. The output parameter can be used as input to other blocks or not. For example, Figure 2 The following figure shows the edited part of the target process logic displayed on the autonomous programming interface, such as Figure 2 As shown, multiple function blocks are displayed in the autonomous programming interface. Each function block has at least one input item. A function block can route the output value to the input value of another function block, and can also invert the connector parameters. Figure 3 A schematic diagram showing a parameter setting method provided in an embodiment of the present application is shown. Figure 3 As shown, to realize autonomous programming, users need to make input settings, algorithm settings and output settings.
[0051] In a possible implementation, the setting operation is a setting operation performed by the user using a preset programming method provided by the autonomous programming interface; the preset programming method includes at least one or more of the following methods: a parameter setting method and a menu routing setting method. Among them, the parameter setting method includes at least one or more of the following methods: an input setting method, an algorithm setting method, and an output setting method.
[0052] Here, the autonomous programming interface in the embodiment of the present application provides a variety of preset programming methods. In addition to the parameter setting method (based on input setting, algorithm setting and output setting), the route can also be set or deleted through the menu routing setting method. When setting the route, the input and output of the function block are dynamically connected to display the routing logic.
[0053] For example, Figure 4 A schematic diagram showing an input setting method provided in an embodiment of the present application is shown. Figure 4As shown, the input setting method includes the input control setting method and the menu routing setting method. The input value types include but are not limited to "not using method", "setting constant as input value method", "setting parameter as input value method", "setting parameter bit as input value method", "menu routing", etc. The menu routing setting method includes "output menu routing to function block input point method" and "input menu routing to function block output point method". The input control setting method can set the first 4 types of input value types.
[0054] For example, Figure 5 A schematic diagram showing a menu routing setting method provided in an embodiment of the present application is shown. Figure 5 As shown, the menu routing setting methods include "routing the output menu to the input point of the function block" and "routing the input menu to the output point of the function block". Routing can be for any function block, and input items can be selected through the menu bar, and output items can be selected through the menu bar.
[0055] Here, you can select the function block output value as the function block input through the input menu bar, or you can select the output value as the function block input value through the output menu bar.
[0056] S103: In response to the target operation of the user on the target process logic, the target logic program generated based on the target process logic is loaded into the lower computer.
[0057] The target operation includes one of an upload operation, a download operation, and a monitoring operation.
[0058] It should be noted that the user can write the self-developed customized process logic into the slave computer through the upper computer, and the upper computer can also read the preset programming logic stored in the slave computer and display it on the autonomous programming interface after reading.
[0059] Here, for the process logic that the user can develop and customize through the upper computer, specifically, after the user completes the target process logic on the autonomous programming interface provided by the upper computer, in response to the user's download operation for the target process logic, the target logic program generated based on the target process logic is loaded into the lower computer.
[0060] In addition, with respect to reading the preset programming logic stored in the lower computer, in one possible implementation, in response to the user's triggering operation on the logic loading control on the autonomous programming interface, the preset programming logic is read from the lower computer and displayed on the autonomous programming interface.
[0061] In a specific implementation, the user can click the "refresh control" on the autonomous programming interface to read the preset programming logic from the lower computer, and display the preset programming logic in a graphical and modular form on the autonomous programming interface.
[0062] For the case of reading the preset programming logic stored in the lower computer, the user can perform secondary editing in the autonomous programming interface after reading the preset programming logic to generate the target process logic, that is, in step S102, the target process logic is generated in response to the user's setting operation of the module parameters of at least one functional block and the routing connection between each functional block on the autonomous programming interface according to the process requirements, including the following steps: generating the target process logic in response to the user's secondary editing operation on the preset programming logic; wherein the secondary editing operation includes at least one of the following operations: setting operation of module parameters of at least one functional block, changing operation of routing connection between any two functional blocks, and adding operation of any functional block.
[0063] S104: In response to the user's operation on the target logic program, the lower computer cyclically executes the target logic program according to a set time slice to achieve the process requirement.
[0064] In a specific implementation, when a user wants to execute a target process logic, the user can trigger a running operation on the target logic program in the lower computer, so that the lower computer can execute the target logic program cyclically according to a set time slice.
[0065] Among them, the set time slice is set by the user according to the needs, and the lower computer cyclically executes the target logic program according to the set time slice to achieve the process requirements.
[0066] In the embodiment of the present application, the target process logic is generated by responding to the user's setting operation on the module parameters of the function block and the routing connection between each function block on the autonomous programming interface; in response to the user's download operation on the target process logic, the target logic program generated based on the target process logic is loaded into the lower computer; in response to the user's operation on the target logic program, the lower computer executes the target logic program in a loop according to the set time slice to achieve the process requirements. The embodiment of the present application provides a flexible and open secondary development programming method, which gives the user customization authority through the autonomous programming interface, allowing the user to independently design the process logic, while reducing time and labor costs, and can also improve the flexibility of process logic design.
[0067] In a possible implementation, if the process engineering is an existing project, the host computer provides an autonomous programming interface for the process engineering in step S101, including the following steps: the host computer automatically loads the module parameters of the completed function blocks corresponding to the process engineering and the connection parameters of the routing connections between the function blocks; and displays the completed function blocks and the completed routing connections between the function blocks on the autonomous programming interface.
[0068] In the specific implementation, after the user completes the creation of a process project on the upper computer, he can directly run it through the lower computer. Or after the creation of a process project or part of the process project, the user can automatically load the process project through the autonomous programming interface provided by the upper computer and add or modify it based on it.
[0069] In a possible implementation, during the process of the lower computer executing the target logic program, the upper computer monitors the input value and output value of each functional block and displays the abnormality in a special way. The abnormality refers to a state. When the input requirement and the input value do not match, an abnormal state will occur. After the lower computer completes the execution of the target logic program, the upper computer verifies whether the running effect is consistent with the expected effect.
[0070] In specific implementations, the traditional lower-computer programming method requires manufacturers to develop customized parameters and modify the lower-computer program according to the process, and the customized functions are integrated in the lower-computer. The embodiment of the present application provides a visual and easy-to-use programming method. Users can set single or multiple function block inputs, outputs and algorithms in the autonomous programming interface according to the complexity of the logic, download the customized program, turn on the enable, and start monitoring to monitor data changes. The customized program is executed in a loop in the lower-computer to meet customer process requirements.
[0071] In a possible implementation, the autonomous programming interface displays at least one of the following controls: a communication button, an access button, a help button, and an enable switch.
[0072] For example, Figure 6 A schematic diagram of a free programming page topology diagram provided in an embodiment of the present application is shown. Figure 6 As shown in the figure, there is a function menu bar on the autonomous programming interface, which provides some function buttons. In addition, for the function blocks added on the autonomous programming interface, users can select input parameters and enter specific values through the input controls, select specific algorithms through the algorithm modules, and select output parameters through the output controls. When the lower computer executes the target logic program, the upper computer can monitor the input and output values of each function block, and can display special abnormalities.
[0073] Here, the operation process of the process logic self-customization system is explained as an example:
[0074] Step 1: Create a new project on the host computer, and all function blocks in free programming are invalid by default; if you open an existing project, free programming automatically loads the last function block setting value.
[0075] Step 2: The user sets the input, algorithm and output of a single or multiple function blocks according to process requirements to generate the required new parameter A' (or multiple parameters).
[0076] Step 3: Download and start running, monitor the input and output values, and verify whether the results are consistent with expectations.
[0077] Step 4: When the host computer connector is enabled, the lower computer will execute the custom logic function block setting cyclically when it is powered on; when the connector is disabled, the lower computer custom logic function block cyclic execution stops.
[0078] Step 5: Reverse application of the new parameter: If parameter A selects a connector and maps it to the new parameter A', the actual value of parameter A becomes the value of A'.
[0079] Step 6: Implement programming application functions.
[0080] Exemplarily, taking a conventional AI combination function requirement as an example, the user sets the module parameters of at least one function block and the routing connection between each function block on the autonomous programming interface. Specifically, when the frequency setting source of the inverter is PID setting, the feedback source of the PID process control is determined by the combination of AI1 and AI2; wherein, the AI combination types include: AI1+AI2, AI1-AI2, the average value of AI1 and AI2, the maximum value of AI1 and AI2, and the minimum value of AI1 and AI2. Traditional method: The lower computer needs to add parameters to support these combination types for user selection. If the user has new combination requirements, the lower computer needs to be modified repeatedly, the development cycle is long, the response is not timely, and it causes a waste of manpower and chip space. The embodiment of the present application: If you want to add AI1+AI2, you only need to select AI1 and AI2 for input 1 and input 2 of function block 1 on the free programming page of the upper computer, and select addition for the algorithm. Figure 7 A schematic diagram showing the re-application of the free programming result provided in the embodiment of the present application is shown in FIG. Figure 7 As shown, the specific parameters are replaced by U and F, and the feedback signal source will display the result of AI1+AI2 as the value, and the function can be realized. In addition, the embodiment of the present application is also applicable to more complex scenarios, such as the output value after calculation, which is used as the input of other function blocks again, and is used for multiple calculations.
[0081] It should be noted that the embodiment of the present application adopts a flexible and open secondary development programming method, and through a convenient medium, gives the customization authority to the user, allowing the user to independently combine the data algorithm to meet the field application, which can reduce time and labor costs and improve product flexibility. Specifically, this new custom logic programming application and method provides a visual programming method, which can realize the logic, algorithm and other information processing of one or more parameters, integrated in the lower computer, and convenient for customized applications. The specific effects are manifested in the following aspects:
[0082] Effect 1. Visualization form: graphical and list form.
[0083] Effect 2. Editing method: Supports online and offline editing.
[0084] Effect 3. Saving method: The free programming program can be saved with the project, or it can be saved independently as a programming file.
[0085] Effect 4. Loading method: programming files can be loaded automatically and can also be transplanted and reused.
[0086] Effect 5: Enable switch, one-button control of the lower computer customized cycle start and stop to meet process requirements.
[0087] Effect 6: Online enable is turned on, the program is started, the input and output monitoring values are refreshed, and the programming effect is fed back.
[0088] Effect 7: If the setting is wrong, the function block will be highlighted and alarm will be given;
[0089] Effect 8: Record programming instructions
[0090] Effect 9: Program the recipe, print and save.
[0091] Based on the same application concept, the embodiments of the present application also provide a process logic autonomous customization system corresponding to the process logic autonomous customization method provided in the above embodiments. Since the principle of solving the problem by the system in the embodiments of the present application is similar to the process logic autonomous customization method in the above embodiments of the present application, the implementation of the system can refer to the implementation of the method, and the repeated parts will not be repeated.
[0092] Figure 8 FIG. 8 is a functional module diagram of a custom logic programming system 800 provided in an embodiment of the present application. Figure 8 As shown, the process logic autonomous customization system 800 includes a host computer 810 and a slave computer 820; wherein,
[0093] The upper computer 810 is used to provide an autonomous programming interface for process engineering; in response to a user setting operation on module parameters of at least one functional block and routing connections between functional blocks according to process requirements on the autonomous programming interface, a target process logic is generated; the module parameters include input parameters, output parameters and internal logic algorithms; in response to the user's target operation on the target process logic, a target logic program generated based on the target process logic is loaded into the lower computer 820;
[0094] The lower computer 820 is used to respond to the user's operation on the target logic program and cyclically execute the target logic program according to a set time slice to achieve the process requirement.
[0095] In a possible implementation, Figure 8 As shown, the upper computer 810 is also used to: respond to the user's triggering operation on the logic loading control on the autonomous programming interface, read the preset programming logic from the lower computer 820, and display the preset programming logic on the autonomous programming interface.
[0096] In a possible implementation, Figure 8 As shown, the host computer 810 is also used to: respond to the user's secondary editing operation on the preset programming logic to generate the target process logic; wherein the secondary editing operation includes at least one of the following operations: setting operation of module parameters for at least one functional block, changing operation of routing connection between any two functional blocks, and adding operation for any functional block.
[0097] In a possible implementation, the setting operation is a setting operation performed by the user using a preset programming method provided by the autonomous programming interface; the preset programming method includes at least one or more of the following methods: a parameter setting method, a menu routing setting method.
[0098] In a possible implementation, Figure 8 As shown, the host computer 810 is also used to: automatically load the module parameters of the function blocks that have been set up corresponding to the process engineering and the connection parameters of the routing connections between the function blocks; and display the routing connections between the function blocks that have been set up and the completed function blocks on the autonomous programming interface.
[0099] In a possible implementation, Figure 8 As shown, during the process of the lower computer 820 executing the target logic program, the upper computer 810 monitors the input value and output value of each functional block and displays the abnormality specially; after the lower computer 820 completes the execution of the target logic program, the upper computer 810 verifies whether the running effect is consistent with the expected effect.
[0100] In a possible implementation, the autonomous programming interface displays at least one of the following controls: a communication button, an access button, a help button, and an enable switch.
[0101] In the embodiment of the present application, the target process logic is generated by responding to the user's setting operation on the module parameters of the function block and the routing connection between each function block on the autonomous programming interface; in response to the user's download operation on the target process logic, the target logic program generated based on the target process logic is loaded into the lower computer; in response to the user's operation on the target logic program, the lower computer executes the target logic program in a loop according to the set time slice to achieve the process requirements. The embodiment of the present application provides a flexible and open secondary development programming method, which gives the user customization authority through the autonomous programming interface, allowing the user to independently design the process logic, while reducing time and labor costs, and can also improve the flexibility of process logic design.
[0102] Based on the same application concept, see Fig. 9 As shown, it is a structural diagram of an electronic device 900 provided in an embodiment of the present application, including: a processor 910, a memory 920 and a bus 930, the memory 920 stores machine-readable instructions executable by the processor 910, when the electronic device 900 is running, the processor 910 and the memory 920 communicate with each other through the bus 930, and the machine-readable instructions are executed by the processor 910 when running to perform the steps of the custom logic programming method as described in any of the above embodiments.
[0103] In the embodiment of the present application, the target process logic is generated by responding to the user's setting operation on the module parameters of the function block and the routing connection between each function block on the autonomous programming interface; in response to the user's download operation on the target process logic, the target logic program generated based on the target process logic is loaded into the lower computer; in response to the user's operation on the target logic program, the lower computer executes the target logic program in a loop according to the set time slice to achieve the process requirements. The embodiment of the present application provides a flexible and open secondary development programming method, which gives the user customization authority through the autonomous programming interface, allowing the user to independently design the process logic, while reducing time and labor costs, and can also improve the flexibility of process logic design.
[0104] Based on the same application concept, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the custom logic programming method provided in the above embodiment are executed.
[0105] Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, etc. When the computer program on the storage medium is run, the above-mentioned custom logic programming method can be executed, and the customization authority is given to the user through an autonomous programming interface, allowing the user to independently design the process logic, while reducing time and labor costs, and improving the flexibility of process logic design.
[0106] In the embodiment of the present application, the computer program can also execute other machine-readable instructions when run by the processor to execute other methods described in the embodiment. For the specific execution method steps and principles, please refer to the description of the embodiment, which will not be repeated here.
[0107] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0108] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0109] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0110] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0111] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.
[0112] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A custom logic programming method, characterized in that: Applied to a process logic self-customization system, the process logic self-customization system includes a host computer and a slave computer; the method includes: Providing an autonomous programming interface for process engineering via the host computer; In response to the user's setting operation of module parameters of at least one functional block and routing connections between functional blocks according to process requirements on the autonomous programming interface, a target process logic is generated; the module parameters include input parameters, output parameters and internal logic algorithms; In response to the target operation of the user on the target process logic, the target logic program generated based on the target process logic is loaded into the lower computer; the target operation includes one of an upload operation, a download operation, and a monitoring operation; In response to the user's operation on the target logic program, the lower computer cyclically executes the target logic program according to a set time slice to achieve the process requirement.
2. The method according to claim 1, characterized in that The method further comprises: In response to the user's triggering operation on the logic loading control on the autonomous programming interface, the preset programming logic is read from the lower computer, and the preset programming logic is displayed on the autonomous programming interface.
3. The method according to claim 2, characterized in that The response user performs setting operations on module parameters of at least one functional block and routing connections between functional blocks according to process requirements on the autonomous programming interface to generate target process logic, including: In response to the user's secondary editing operation on the preset programming logic, generating the target process logic; The secondary editing operation includes at least one of the following operations: a setting operation for module parameters of at least one functional block, a changing operation for a routing connection between any two functional blocks, and an adding operation for any functional block.
4. The method according to claim 1, characterized in that: The setting operation is a setting operation performed by the user using a preset programming method provided by the autonomous programming interface; the preset programming method includes at least one or more of the following methods: Parameter setting method, menu routing setting method.
5. The method according to claim 1, characterized in that If the process engineering is an existing project, the host computer provides an autonomous programming interface for the process engineering, including: The host computer automatically loads the module parameters of the function blocks that have been set up corresponding to the process engineering and the connection parameters of the routing connections between the function blocks; The function blocks that have been set up and the completed routing connections between the function blocks are displayed on the autonomous programming interface.
6. The method according to claim 1, characterized in that The method further comprises: During the process of the lower computer executing the target logic program, the upper computer monitors the input value and output value of each function block and displays the abnormality in a special manner; After the lower computer completes the execution of the target logic program, the upper computer verifies whether the running effect is consistent with the expected effect.
7. The method according to claim 1, characterized in that The autonomous programming interface displays at least one of the following controls: a communication button, an access button, a help button, and an enable switch.
8. A process logic autonomous customization system, characterized in that: The process logic autonomous customization system includes a host computer and a slave computer; wherein, The upper computer is used to provide an autonomous programming interface for process engineering; in response to a user setting operation on the module parameters of at least one functional block and the routing connection between the functional blocks according to process requirements on the autonomous programming interface, generate a target process logic; the module parameters include input parameters, output parameters and internal logic algorithms; in response to the user's target operation on the target process logic, load the target logic program generated based on the target process logic into the lower computer; The lower computer is used to respond to the user's operation on the target logic program and cyclically execute the target logic program according to a set time slice to achieve the process requirement.
9. An electronic device, characterized in that: include: Processor, memory and bus, the memory storing machine-readable instructions executable by the processor, when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the custom logic programming method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the custom logic programming method according to any one of claims 1 to 7 are executed.