Custom function block development system and operation and debugging method

By using templated design and UID identification mechanism, the problems of asynchronous updates and high resource consumption of custom function blocks in DCS and PLC systems are solved, enabling efficient development and debugging of custom function blocks and improving system execution efficiency and user experience.

CN116431472BActive Publication Date: 2025-11-11NANJING GUODIAN NANZI WEIMEIDE AUTOMATION CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310220798.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-09
Publication Date
2025-11-11
Estimated Expiration
2043-03-09

AI Technical Summary

Technical Problem

In existing technologies, custom function blocks in DCS and PLC systems suffer from problems such as asynchronous updates, low reusability, difficult debugging, and high resource consumption, which affect system efficiency and stability.

Method used

A template-based design separates the definition and instance of custom function blocks. A UID identification mechanism and a dynamic subscription mechanism are used to achieve synchronous updates and debugging of custom function blocks, reducing resource consumption.

Benefits of technology

It enables synchronous updates and efficient debugging of custom function blocks, saves system space and communication bandwidth, and improves system execution efficiency and user-friendliness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116431472B_ABST
    Figure CN116431472B_ABST
Patent Text Reader

Abstract

The application discloses a self-defined function block development system and a running and debugging method, and the system comprises a function block library, a self-defined function block development tool, a function block diagram configuration tool and a function block diagram executor. The self-defined function block development tool uses basic function blocks and existing self-defined function blocks to form user self-defined function blocks which are stored in the function block library; the function block diagram configuration tool comprises a function block diagram editor and a function block diagram debugger; the function block diagram executor comprises a debugging manager and a function block diagram execution engine; the debugging manager receives a debugging request of the function block diagram debugger, informs the function block diagram execution engine to obtain a latest debugging subscription queue, the function block diagram execution engine receives a function block diagram created by the function block diagram editor, performs processing and operation, generates debugging data, and the debugging manager responds to the debugging request.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a custom function block development system and its operation and debugging method, belonging to the field of industrial process control technology. Background Technology

[0002] Real-time control systems such as DCS and PLCs are widely used in existing technologies, and programming control strategies is one of their core functions. As general-purpose control systems, DCS and PLCs typically provide built-in basic algorithm function blocks for constructing control strategies, including basic mathematical, logical, timing, data acquisition, and control regulation algorithms. For different control scenarios or different controlled objects, users need dedicated control algorithms to meet their specific requirements. Furthermore, for control strategies with a large amount of repetitive control logic, users need to encapsulate these repetitive, independently functional components into independent function blocks. When using these blocks, users no longer need to repeatedly design the relevant control logic; they only need to select the encapsulated custom function block to complete the corresponding function.

[0003] In existing technologies, the main problems with user-defined function blocks include the following aspects:

[0004] First, the implementation of custom function blocks involves grouping a series of related function blocks, selecting certain input and output variables from these function blocks as the input and output variables of the combined function block, and hiding the internal implementation details on the interface by displaying individual function blocks. Once a custom function block is instantiated, the function blocks it contains are also instantiated. When the implementation of a custom function block is updated, the instances of the already created custom function blocks cannot be updated synchronously. Furthermore, once a custom function block is updated or an error is fixed, all instances of that type of custom function block that have been created must be deleted from the function block graph, then re-added, and connections with other function blocks must be established and parameters set. This results in functional and usability deficiencies and poor user-friendliness. Second, when defining a custom function block, it cannot contain other custom function blocks. Related functions must be rebuilt and implemented using basic function blocks, resulting in low reusability. Third, in the runtime online debugging environment, only the input, output, and parameter data of the custom function block can be viewed; the real-time runtime data such as the input, output, and parameters of the individual function blocks contained within its implementation cannot be viewed. Exceptions and errors in the control logic are difficult to locate, affecting the debugging efficiency of the system and the stable operation of the controlled objects. Finally, the control processing unit typically uses miniaturized embedded devices with relatively limited computing and storage resources. Each custom function block instance downloaded to the control processing unit contains instances of all the function blocks that constitute that function block's internal implementation, resulting in a large amount of storage space and computing resources being consumed within the control processing unit, leading to low processing efficiency. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a custom function block development system and running and debugging method, which can develop, run and debug custom function blocks and improve execution efficiency.

[0006] To achieve the above objectives, the present invention is implemented using the following technical solution:

[0007] This invention provides a custom function block development system, including a function block library, a custom function block development tool, a function block diagram configuration tool, and a function block diagram executor;

[0008] The function block library contains basic function blocks and custom function blocks. The custom function block development tool uses basic function blocks and existing custom function blocks to form new custom function blocks and store them in the function block library.

[0009] The function block diagram configuration tool includes a function block diagram editor and a function block diagram debugger. The function block diagram editor creates function block diagrams based on basic function blocks and custom function blocks in the function block library.

[0010] The function block graph executor includes a debug manager and a function block graph execution engine. The debug manager receives debug requests from the function block graph debugger, sends a command to the function block graph execution engine to obtain the latest debug subscription queue, and sends debug data to the function block graph debugger. The function block graph execution engine receives function block graph information, performs processing calculations, and updates debug data.

[0011] Furthermore, the function block library adopts queue management, including a built-in area and a user area. The built-in area stores non-editable basic function blocks; the user area stores custom function blocks, which can be added, deleted, or updated.

[0012] Furthermore, the basic function block and the custom function block have a unique type identifier TID and an identifier Flag used to distinguish between the basic function block and the custom function block;

[0013] The custom function block contains a unique identifier (SID) within that custom function block.

[0014] Furthermore, the function block diagram includes the definition of custom function blocks, and the list of function blocks and the list of function block instances contained in the internal implementation. Each function block instance has a unique identifier OID. The function blocks contained in the custom function block instance are identified by OID.SID. The SID can be set at multiple levels to allow for multi-level nesting of custom function blocks.

[0015] A method for running and debugging a custom function block development system according to any of the preceding claims, the method comprising the following steps:

[0016] The custom function block development tool uses basic function blocks or existing custom function blocks to form new custom function blocks through logical combination, association, parameter setting, encapsulation and interface exposure, which are then stored in the function block library.

[0017] The function block diagram editor creates function block diagrams using basic function blocks and custom function blocks from the function block library;

[0018] The function block diagram execution engine receives the function block diagram downloaded by the function block diagram configuration tool through the communication network, and parses the custom function block definitions and the list of function block instances in the function block diagram;

[0019] The debug manager receives a debug request from the function block graph debugger, places the UID of the debug request function block into its debug subscription queue, and notifies the function block graph execution engine to obtain the latest debug subscription queue. The UID is in the form of OID that identifies the function block instance and OID.SID that identifies the function blocks contained within the custom function block instance.

[0020] The function block diagram execution engine receives the function block diagram, processes it, performs calculations, and updates the debugging data.

[0021] Furthermore, the function block graph execution engine receives and processes the function block graph, including:

[0022] Parse the custom function block definition and the list of function blocks (TemplList) contained in the internal implementation of the function block diagram, and place them in the custom function block template area;

[0023] Parse the list of function block instances ObjList from the function block diagram and place it in the program area;

[0024] Create a debug data area. Debug data within the debug data area is managed in blocks. Each data block corresponds to the debug data of a function block instance and is identified by the UID of that function block instance.

[0025] Furthermore, the debug manager periodically retrieves the corresponding real-time data block and its identifier UID from the debug data area based on the debug request UID in the debug request queue, and publishes it to the function block diagram configuration tool through the data publishing interface for real-time data display.

[0026] Furthermore, the function block graph execution engine receives the function block graph, processes it, performs calculations, and updates the debugging data, including: the function block graph execution engine periodically retrieves function block instances from the program area and performs calculations;

[0027] b. If the function block instance is a basic function block, the function block graph execution engine retrieves its input data based on the connection relationship between function blocks, calls the function block algorithm, calculates according to the set parameters, and obtains the output data;

[0028] c. If the function block instance is a custom function block, the function block graph execution engine obtains the input data based on the connection relationship between the function blocks, and then finds the internal implementation of the corresponding custom function block from the custom function block template area according to the TID of the custom function block instance. The input parameters are passed to the input of the function block contained in the corresponding internal implementation to obtain each function block contained in the internal implementation of the custom function block.

[0029] If the function blocks contained within the implementation of the custom function block are custom function blocks, then repeat step c; if they are basic function blocks, the function block graph execution engine jumps to step b. After each function block contained within the implementation of the custom function block is executed, the data is output.

[0030] Furthermore, if the UID of a function block instance is in the request queue of the debug manager, the function block graph execution engine copies the real-time data of that function block instance to the debug data area and identifies the corresponding data block with its UID.

[0031] Compared with the prior art, the beneficial effects achieved by the present invention include:

[0032] The template-based design separates the definition and instance of custom function blocks. Multiple instances of the same type of custom function block correspond to the same custom function block definition template, and updates to the template are synchronously updated to the created instances. The execution of the same type of custom function block also corresponds to the same template. You only need to pass the parameters to the template to execute the corresponding function block, saving system space.

[0033] Using a UID identification mechanism, custom function blocks and any nested function blocks within their implementations can be uniquely identified by a UID, which corresponds one-to-one with instances of custom function blocks and their internal implementations in the execution system. Debugging data for any instance of a custom function block and its internal function blocks can be accessed through the UID, supporting the debugging of custom function blocks.

[0034] By adopting a dynamic subscription mechanism, only the functional block data that needs to be debugged is requested, which effectively saves system space and communication bandwidth. Attached Figure Description

[0035] Figure 1 This is a control strategy diagram of a custom function block development system provided in an embodiment of the present invention;

[0036] Figure 2 This is a structural diagram of the function block library provided in an embodiment of the present invention;

[0037] Figure 3 This is a diagram of the development tool for custom function blocks provided in an embodiment of the present invention;

[0038] Figure 4 This is a structural diagram of the function block diagram executor provided in an embodiment of the present invention; Detailed Implementation

[0039] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.

[0040] Example 1

[0041] like Figure 1 As shown, the present invention provides a custom function block development system, including a function block library, a custom function block development tool, a function block diagram configuration tool, and a function block diagram executor.

[0042] The function block library is a management repository for function blocks. Each function block contains input data, output data, parameter data, and an algorithm. The function block library contains two types of function blocks: basic function blocks and custom function blocks. Basic function blocks are built into the system, while custom function blocks are custom-developed by users using custom function block development tools, employing basic function blocks and existing custom function blocks to fulfill specific user functional requirements.

[0043] Each type of function block contains a unique type identifier (TID) and a flag to distinguish between basic and custom function blocks. For example, TIDs of 1-500 represent basic function blocks, while TIDs of 501 and above represent custom function blocks. A Flag of 0 represents a built-in basic function block, and a Flag of 1 represents a user-defined function block.

[0044] like Figure 2 As shown, the function block library is managed using a queue, comprising a built-in area and a user area. The function blocks in the built-in area are fixed to the system's built-in basic function blocks and cannot be edited. The user area is for managing custom function blocks, where users can add, delete, or update custom function blocks.

[0045] The custom function block development tool uses basic function blocks and existing custom function blocks to form new custom function blocks, which are then stored in the function block library.

[0046] The function block diagram configuration tool includes a function block diagram editor and a function block diagram debugger. The function block diagram editor creates a function block diagram by instantiating basic function blocks and custom function blocks provided in the function block library, setting the parameters of the function block instances and the connection relationships between the function block instances.

[0047] Each function block instance in the function block diagram has a unique identifier (OID). The function blocks contained within the implementation of a custom function block instance are identified by OID.SID. The SID can be set at multiple levels, representing multi-level nesting of custom function blocks. The form of the OID used to identify a function block instance and the OID.SID used to identify the function blocks contained within the implementation of a custom function block is called UID. UID can uniquely identify a function block instance or a specific function block contained within a custom function block instance.

[0048] The function block diagram is generated by the function block diagram editor and includes the definition of custom function blocks and a list of function blocks (TemplList) contained in their internal implementation, as well as a list of function block instances (ObjList). Each function block instance contains the input data, output data, parameters, and connection relationships between function blocks.

[0049] The function block diagram configuration tool downloads the function block diagram to the function block diagram executor for computation via a communication network. Simultaneously, the function block debugger sends the UID of the function block instance to be debugged, or the UID of the function blocks contained within the implementation of a custom function block instance, to the function block diagram executor and subscribes to debug data.

[0050] When the function block diagram configuration tool receives debugging data issued by the function block diagram executor, it finds the function block instance to be debugged based on the UID contained in the data block and displays the real-time running data and status of the corresponding function block instance on the interface.

[0051] The function block graph executor consists of a debug manager and a function block graph execution engine. The debug manager receives debug requests from the function block graph debugger and notifies the function block graph execution engine to obtain the latest debug subscription queue. The function block graph execution engine receives and parses the custom function block definitions and the list of function blocks contained within them in the function block graph, and performs the calculations.

[0052] Custom function block development tools use basic function blocks or existing custom function blocks to form new user-defined function blocks through logical combination, association, parameter setting, encapsulation and interface exposure.

[0053] Each custom function block has a unique identifier TID, and the function blocks contained in its internal implementation have unique identifiers SID within that custom function block. For example... Figure 3 As shown. Once the custom function block is developed, it is added to the function block library.

[0054] The nested custom function blocks contain function block subscription requests and publish displays that identify the specified function blocks in the form of UID using OID + multi-level SID.

[0055] like Figure 4As shown, the function block diagram executor includes a debug manager and a function block diagram execution engine. After receiving a debug request from the function block diagram debugger in the function block diagram configuration tool, the debug manager places the UID of the requested debug function block instance into its debug subscription queue and notifies the function block diagram execution engine to obtain the latest debug subscription queue.

[0056] The function block diagram execution engine receives the function block diagram downloaded by the function block diagram configuration tool through the communication network, parses the custom function block definitions and the function block list (TemplList) contained in the internal implementation of the function block diagram, and places them in the custom function block template area (TS); it parses the function block instance list (ObjList) in the function block diagram, places the function block instances in the program area (CS), and creates a debug data area (DS). In the debug data area, debug data is managed in blocks, with each data block corresponding to the debug data of a function block and identified by the UID of that function block.

[0057] The function block graph executor periodically retrieves each function block instance from the program area CS. If the function block instance is a basic function block, its input data is retrieved according to the connection relationship, the function block's algorithm is invoked, calculations are performed according to the set parameters, and the output data is obtained. If the function block instance's UID is in the debug request queue of the debug manager, its real-time data is copied to the debug data area DS, and the corresponding data block is identified by its UID.

[0058] If the function block instance is a custom function block, its input data is retrieved based on the connection relationship. Then, from the custom function block template area TS, the corresponding internal implementation of the custom function block is found based on the TID of the custom function block type. The input parameters are passed to the input of the corresponding internal function block, and the algorithm of each function block contained in the internal implementation is called sequentially to obtain the output data of each function block contained in the internal implementation. If the UID of the function block contained in the internal implementation is in the request queue of the debug manager, its real-time value is copied to the debug data area DS, and the corresponding data block is identified by its UID. When the function block contained in the internal implementation is a custom function block, the above process is repeated. If the UID of the custom function block instance is in the request queue of the debug manager, its real-time data is copied to the debug data area DS, and the corresponding data block is identified by its UID.

[0059] The debug manager periodically retrieves the corresponding real-time data from the debug data area DS of the function block diagram executor according to the debug request UID in the debug request queue, and publishes it along with the UID of the data block identifier to the function block diagram configuration tool through the data publishing interface for real-time data display and viewing.

[0060] This invention adopts a template-based design, separating the definition and instance of custom function blocks. Multiple instances of the same type of custom function block correspond to the same custom function block definition template, and updates to the template are synchronously updated to the created instances. The execution of the same type of custom function block also corresponds to the same template. Only the parameters need to be passed into the template to execute the corresponding function block, saving system space.

[0061] Example 2

[0062] The present invention also provides a method for running and debugging a custom function block development system, the method comprising the following steps:

[0063] The custom function block development tool uses basic function blocks and existing custom function blocks to form new user-defined function blocks through logical combination, association, parameter setting, encapsulation and interface exposure, and stores them in the function block library;

[0064] The function block diagram editor creates function block diagrams using basic function blocks and custom function blocks from the function block library;

[0065] The function block diagram configuration tool downloads the function block diagram to the function block diagram executor via a communication network;

[0066] The function block diagram execution engine receives the function block diagram downloaded by the function block diagram configuration tool through the communication network, and parses the custom function block definitions and the list of function block instances in the function block diagram.

[0067] When the debug manager receives a debug request from the function block graph debugger, it places the UID of the debug request function block instance into its debug subscription queue and notifies the function block graph execution engine to obtain the latest debug subscription queue.

[0068] The function block diagram execution engine processes the received function block diagram, performs calculations, and updates the debug subscription data in the debug data area according to the latest debug subscription queue in the debug manager.

[0069] Further feasible and specific operational steps are as follows:

[0070] Step 1: The function block library contains built-in basic function blocks with TIDs from 1 to 500, and custom function blocks with TIDs greater than 500. Using the custom function block development tool, encapsulate and combine three basic function blocks with TIDs 2, 3, and 1, and SIDs 1, 2, and 3 into a custom function block with TID 502, and add it to the function block library. Then, encapsulate function blocks with TIDs 1 and 502, and several function blocks with TIDs 2 and SIDs 1-5, into a custom function block with TID 503, and add it to the function block library.

[0071] Step 2: Use the function block diagram configuration tool to create a function block diagram. The function block diagram contains several function block instances with TIDs 1, 502, 2, 503, 3, and 502, and OIDs 1-6, and adds them to the ObjList of the function block diagram. Add the internal implementations of the custom function blocks with TIDs 502 and 503 to the TemplateList of the function block diagram. Download the function block diagram to the function block diagram executor via the communication network.

[0072] Step 3: The function block diagram executor receives the function block diagram downloaded by the function block diagram configuration tool, parses the custom function block definitions and implementations with TIDs 502 and 503 from the TemplateList, and places them in the custom function block template area TS; it parses the function block instances from the ObjList and places them in the program area CS.

[0073] Step 4: In the function block diagram configuration tool, use the function block diagram debugger to view the real-time running data and status of the function block instance. For example, to view the data of the function block instance with OID 5, send UID=5 as a subscription request to the debug manager of the function block diagram executor; to view the real-time data and status of the internal function block with SID 1 in the custom function block instance with OID 4, send UID=4.1 as a subscription request to the debug manager of the function block diagram executor.

[0074] Step 5: In the function block diagram executor, the debug manager retrieves data from the debug data area DS of the function block diagram execution engine based on the UID in the debug request queue. If a UID is matched, the data is retrieved and sent to the function block diagram debugger of the function block diagram configuration tool through the data publishing interface for real-time display.

[0075] Step 6: Simultaneously with Step 5, the function block graph execution engine periodically retrieves function block instances from the program area CS for execution. The specific steps are as follows:

[0076] 6.1 If the function block instance is a basic function block, its input data is retrieved according to the connection relationship, the function block's algorithm is called, and the output data is obtained by calculating according to the set parameters. If the UID of the function block instance is in the debug request queue of the debug manager, its real-time data is copied to the debug data area DS, and the corresponding data block is identified as its UID.

[0077] 6.2 If the function block instance is a custom function block, then retrieve its input data according to the connection relationship, and then find the corresponding internal implementation of its custom function block from the custom function block template area TS according to the TID of the custom function block type. Pass the input parameters to the input of the corresponding internal function block, and obtain each function block contained in its internal implementation in turn.

[0078] If the function block it contains is a basic function block, proceed to step 6.1; if the function block it contains is a custom function block, repeat step 6.2. After each function block it contains is executed, the output data of the custom function block instance is obtained. If the UID of the custom function block instance is in the request queue of the debug manager, its real-time data is copied to the debug data area DS, and the corresponding data block is identified by its UID.

[0079] like Figure 4 As shown, the function block graph execution engine obtains a function block instance with OID 1 and TID 1 from the program area CS and calculates the output. Then, it obtains a function block instance with OID 2 and TID 502, retrieves a custom function block template with TID 502 from the custom function block template area TS, and executes the function blocks with TID 2 and SID 1, TID 3 and SID 2, and TID 1 and SID 3 in sequence. The function block with TID 2 and SID 1 satisfies the debug request with UID 2.1. After the function block is calculated, its data is copied to the debug data area and the data block is marked with UID = 2.1, and so on.

[0080] This invention employs a UID identification mechanism, where custom function blocks and any nested function blocks within their internal implementations can be uniquely identified by a UID, which corresponds one-to-one with instances of custom function blocks and their internal implementations in the execution system. Debugging data for any instance of a custom function block and its internal components can be accessed via the UID, supporting the debugging of custom function blocks. Furthermore, a dynamic subscription mechanism is used, requesting only the function block data that needs debugging, effectively saving system space and communication bandwidth.

[0081] Example 3

[0082] The present invention also provides a custom function block development system and a computer-readable storage medium. The system includes a processor and a storage medium, wherein the storage medium is used to store instructions, and the processor is used to perform operations according to the instructions to execute the steps of a method for running and debugging a custom function block development system.

[0083] Example 4

[0084] The steps of a method for running and debugging a custom function block development system are disclosed on a computer-readable storage medium storing a computer program that, when executed by a processor, implements such a method.

[0085] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0086] This application is described with reference to flowchart illustrations and / or block diagrams of methods, systems, and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0087] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0088] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0089] In the function block diagram configuration tool, the present invention adopts a templated custom function block definition method. The instantiation of the custom function block only adds the function block itself, without the need to instantiate and create all the function blocks contained in its internal implementation. The implementation update of the custom function block takes effect immediately on the already instantiated function blocks of the same type.

[0090] It supports the nested definition and debugging of custom function blocks, adopts a dynamic subscription to debugging data and a mechanism identified by UID, and only requests function blocks that need to display real-time data for debugging, saving data space and network transmission bandwidth.

[0091] The function library graph executor also adopts a template mechanism. Custom function blocks only need to add the function block itself, without needing to instantiate and create all the function blocks implemented inside it, saving system space and improving execution efficiency.

[0092] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A custom function block development system, characterized in that, Includes a function block library, a custom function block development tool, a function block diagram configuration tool, and a function block diagram executor; The function block library contains basic function blocks and custom function blocks. The custom function block development tool uses basic function blocks and existing custom function blocks to form new custom function blocks and store them in the function block library. The function block diagram configuration tool includes a function block diagram editor and a function block diagram debugger. The function block diagram editor creates function block diagrams based on basic function blocks and custom function blocks in the function block library. The function block graph executor includes a debug manager and a function block graph execution engine. The debug manager receives debug requests from the function block graph debugger, sends a command to the function block graph execution engine to obtain the latest debug subscription queue, and sends debug data to the function block graph debugger. The function block graph execution engine receives function block graph information, performs processing operations, and creates a debug data area. The debug data in the debug data area is managed in blocks, and each data block corresponds to the debug data of a function block instance and is identified by the UID of that function block instance.

2. The custom function block development system according to claim 1, characterized in that, The function block library is managed by a queue and includes a built-in area and a user area. The built-in area stores uneditable basic function blocks, while the user area stores custom function blocks that can be added, deleted, or updated.

3. The custom function block development system according to claim 1, characterized in that, The basic function block and the custom function block have a unique type identifier TID and an identifier Flag used to distinguish between the basic function block and the custom function block; The custom function block contains a unique identifier (SID) within that custom function block.

4. A custom function block development system according to claim 1, characterized in that, The function block diagram includes the definition of custom function blocks, and the list of function blocks and function block instances contained in the internal implementation. Each function block instance has a unique identifier OID. The function blocks contained in the custom function block instance are identified by OID.SID. The SID can be set at multiple levels to allow for multi-level nesting of custom function blocks.

5. A method for running and debugging a custom function block development system according to any one of claims 1-4, characterized in that, The method includes the following steps: The custom function block development tool uses basic function blocks or existing custom function blocks to form new custom function blocks through logical combination, association, parameter setting, encapsulation and interface exposure, which are then stored in the function block library. The function block diagram editor creates function block diagrams using basic function blocks and custom function blocks from the function block library; The function block diagram execution engine receives the function block diagram downloaded by the function block diagram configuration tool through the communication network, and parses the custom function block definitions and the list of function block instances in the function block diagram; The debug manager receives debug requests from the function block graph debugger, places the UID of the debug request function block into its debug subscription queue, and notifies the function block graph execution engine to obtain the latest debug subscription queue. The UID is in the form of OID, which identifies a function block instance, and OID.SID, which identifies the function blocks contained within a custom function block instance. The function block diagram execution engine receives the function block diagram, processes it, performs calculations, updates debug data, and creates a debug data area. Debug data within the debug data area is managed in blocks, with each data block corresponding to the debug data of a function block instance and identified by the UID of that function block instance.

6. The method for running and debugging a custom function block development system according to claim 5, characterized in that, The function block diagram execution engine receives and processes function block diagrams, including: Parse the custom function block definition and the list of function blocks (TemplList) contained in the internal implementation of the function block diagram, and place them in the custom function block template area; Parse the list of function block instances ObjList from the function block diagram and place it in the program area; Create a debug data area. Debug data within the debug data area is managed in blocks. Each data block corresponds to the debug data of a function block instance and is identified by the UID of that function block instance.

7. The method for running and debugging a custom function block development system according to claim 6, characterized in that, The debug manager periodically retrieves the corresponding real-time data block and its identifier UID from the debug data area based on the debug request UID in the debug request queue, and publishes it to the function block diagram configuration tool through the data publishing interface for real-time data display.

8. The method for running and debugging a custom function block development system according to claim 6, characterized in that, The function block graph execution engine receives function block graphs, processes them, performs calculations, and updates debug data, including: the function block graph execution engine periodically retrieves function block instances from the program area and performs calculations; b. If the function block instance is a basic function block, the function block graph execution engine retrieves its input data based on the connection relationship between function blocks, calls the function block algorithm, calculates according to the set parameters, and obtains the output data; c. If the function block instance is a custom function block, the function block graph execution engine obtains the input data based on the connection relationship between the function blocks, and then finds the internal implementation of the corresponding custom function block from the custom function block template area according to the TID of the custom function block instance. The input parameters are passed to the input of the function block contained in the corresponding internal implementation to obtain each function block contained in the internal implementation of the custom function block. If the function blocks contained within the implementation of the custom function block are custom function blocks, then repeat step c; if they are basic function blocks, the function block graph execution engine jumps to step b. After each function block contained within the implementation of the custom function block is executed, the data is output.

9. The method for running and debugging a custom function block development system according to claim 8, characterized in that, If the UID of a function block instance is in the request queue of the debug manager, the function block graph execution engine copies the real-time data of that function block instance to the debug data area and identifies the corresponding data block with its UID.

Citation Information

Patent Citations

  • Optimal configuration system

    CN103077033A

  • Operation method and device of client system, electronic equipment and storage medium

    CN114168360A