FADEC software sequence control configuration development method

Through the FADEC software sequential control configuration development method, SFC graphical modeling and automatic C code generation are supported, which solves the problems of PowerPC assembly code automation CFG reconstruction and SFC model compilation, FBD compatibility and user maintenance efficiency, and realizes the seamless configuration integration between SFC and FBD and the improvement of user configuration modeling efficiency.

CN120215944APending Publication Date: 2025-06-27CHINA AERONAUTICAL CONTROL SYST RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510326615.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-19
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

The prior art is difficult to realize automated CFG reconstruction of PowerPC assembly coding, and SFC model compilation, FBD compatibility and user maintenance efficiency are low.

Method used

A method for developing the sequential control configuration of the FADEC software is proposed, which supports SFC graphical modeling, C code automatic generation, logic echo, legality checking and other functions. Through the hybrid modeling of SFC function blocks and FBD blocks, the sequential control configuration of the SFC model is realized, and the code-level conversion rules for SFC graphical language and C language are formulated.

Benefits of technology

It solves the problems of SFC model compilation, FBD compatibility and user maintenance efficiency, realizes seamless configuration integration between SFC and FBD, and improves user configuration modeling efficiency and model maintainability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120215944A_ABST
    Figure CN120215944A_ABST
Patent Text Reader

Abstract

The invention discloses an FADEC software sequence control configuration development method. The method comprises the following steps: (1) SFC graphical representation; (2) sequential control hierarchical configuration design; (3) sequence control codes are automatically generated; (4) performing logic echo on'step 'and'migration'; (5) exiting the action configuration design; (6) SFC rapid modeling design is carried out; (7) SFC design automatic inspection; according to the invention, compatibility of the SFC and the FBD is supported.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software engineering, and particularly relates to a method for developing the sequential control configuration of FADEC software. Background Art

[0002] Reconstructing the control flow graph (hereinafter referred to as CFG) based on binary files is an essential basis for target code analysis. Common target code analysis activities, such as stack analysis based on target code and WCET analysis based on target code, etc., all require two processes: 1) Disassembling the binary executable file to obtain assembly code; 2) Reconstructing the CFG based on the assembly code. Currently, tools for disassembling PowerPC binary object files, such as objdump, IDA, etc., are relatively mature and do not need to be studied further. However, there is no mature method for reconstructing CFG from PowerPC assembly code that can guide the implementation of corresponding automated tools. Summary of the Invention

[0003] Object of the Invention: The object of the present invention is to provide a method for developing the sequential control configuration of FADEC software, which supports functions such as SFC graphical modeling, automatic C code generation, logic echo, and legality check, and solves the problems of SFC model compilation, FBD compatibility, and user maintenance efficiency.

[0004] Technical Solution: A method for developing the sequential control configuration of FADEC software according to the present invention includes the following steps: (1) SFC graphical representation: Graphically represent the basic graphical symbols in the sequential function chart, design relevant graphic elements, and make them meet the IEC61131-3 standard; (2) Sequential control hierarchical configuration design: Develop the modeling function of the configuration platform to support the hybrid modeling of function block diagram (FBD) and sequential function chart (SFC). Complete the sub-task configuration through the SFC function block and ordinary FBD blocks. Carry out the sequential control configuration of the SFC model in the SFC function block, and carry out specific logic configuration in "steps" and "transitions"; (3) Automatic generation of sequential control code: Decompose the SFC model into four basic structures, study the mapping relationship between SFC atomization operations and C language source code, and formulate the code-level conversion rules between the SFC graphical language and C language; (4) Logic echo of "steps" and "transitions": Design a graphical display function to parse and read back the control logic in "steps" and "transitions" and display it on the sequential control model layer; (5) Exit action configuration design: When each sequential control exits, configure and arrange the exit actions and process the global objects; (6) SFC rapid modeling design: encapsulate various basic configurations in sequential control into a tool library, and directly provide rapid modeling components to users, enabling the rapid construction of a sequential control model without using the most basic elements such as "steps", "transitions", and "directed line segments" for step-by-step configuration. (7) SFC design automatic check: during the SFC modeling process, perform legality checks on the model structure, empty steps, and type matching, and prompt anomalies or warnings for models that do not meet the sequential control configuration specifications.

[0005] Further, step (1) is specifically as follows: abstract "steps", "transitions", and "directed line segments" into algorithms, and define attributes such as algorithm name, algorithm type, algorithm category, grouping, input and output parameter sets, etc.; design the basic primitives of the sequential function chart, such as representing "steps" with rectangular boxes with step numbers, "transitions" with vertically intersecting line segments, and "directed line segments" with arrowed line segments; store the primitive information of SFC in an XML file, and initialize the SFC basic primitives by deserializing the XML.

[0006] Further, step (2) is specifically as follows: design a dedicated FBD algorithm block SFC_Module, and design the corresponding input and output interfaces. The algorithm block is placed in the basic algorithm blocks of the configuration platform like other FBD algorithm blocks, and dragged to the canvas for model configuration of subtasks; use SFC_Module to enter the "SFC model layer", and complete the modeling of the sequential control process by dragging the basic primitives of SFC; open the "action / condition configuration layer" on a specific "step" or "transition", and on the page, complete the configuration of the specific logic in the step or transition through FBD basic function blocks.

[0007] Further, step (3) is specifically as follows: decompose the SFC model into four basic programming structures: "single sequence", "selection sequence", "parallel sequence", and "loop jump"; for each dragged "step", define 1 local static variable in the function body to represent whether the Nth step is an active step, and at the same time generate an if statement. If the flag is judged to be true, execute all the actions in that step; for each dragged "transition", generate a complete if statement, and the active step flags of the connected steps and the user-defined transition conditions will be automatically "anded" together; at the same time, set the previous step active flag to false in the if condition; the actions in the step are only generated in the if statement where the corresponding active step flag is true.

[0008] Further, step (4) is specifically as follows: Design an output node on the right side of the "Step" and "Transition" legends, and connect a text box for echo. The relative position of the text box with respect to the "Step" or "Transition" is fixed, but it moves as the "Step" or "Transition" moves; change the size of the echo text box to support the adjustment of the size and layout of the echo text box; when defining variables, add an "alias" attribute. Using the alias can simplify the echoed string in the sequential control, and the alias does not participate in code generation; parse the control logic in the "Step" or "Transition" to identify variables and operators, look up the aliases stored in the database according to the variable names, and display them in the echo text box.

[0009] Further, step (5) is specifically as follows: Right-click on the SFC_Module block to pop up a menu, select "Configure Exit Action", and open a new canvas; on this canvas, drag and drop FBD blocks for logic configuration and variable binding to implement the "post-processing" when the sequential control ends.

[0010] Further, step (6) is specifically as follows: Design an SFC quick toolbar, draw thumbnails of single sequences, selective sequences, and parallel sequences as quick icons, and embed them in the SFC quick toolbar; when the user drags the corresponding quick icon to the canvas, the user enters the number of sequences on the "Settings" page, and the tool will automatically draw the corresponding number of basic primitives in the order of "Step - Transition - Step", and the connection lines between steps and transitions will be automatically connected.

[0011] Further, step (7) is specifically as follows: Formulate modeling specifications, formulate SFC modeling specifications from dimensions such as model design and tool operations; according to the formulated specifications, during the SFC modeling process, obtain the attribute elements and status of each model by querying the database, and check the legality item by item in real time; prompt anomalies or warnings for models that do not meet the sequential control configuration specifications.

[0012] An electronic device according to the present invention includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the computer program is loaded into the processor, it implements any one of the FADEC software sequential control configuration development methods described above.

[0013] A storage medium according to the present invention stores a computer program. When the computer program is executed by a processor, it implements any one of the FADEC software sequential control configuration development methods described above.

[0014] Beneficial effects: Compared with the prior art, the present invention has the following remarkable advantages: The mapping relationship between the SFC atomization operation and the C language source code is studied, and the source code-level conversion rules between the SFC graphical language and the C language are creatively proposed, solving the compilation problem of the SFC model. A three-layer configuration modeling design scheme of a task configuration layer, an SFC model layer, and an action / condition configuration layer is proposed, effectively solving the compatibility problem between SFC and FBD. The designed SFC can be seamlessly configured and integrated with the FBD graphical blocks based on the IEC61131-3 standard. The SFC model layer supports the simplified logic echo of "steps" and "transitions", and the specific actions of each step and the specific conditions of each transition can be directly observed, facilitating users' overview and configuration maintenance. Description of the Drawings

[0015] Figure 1 is the flowchart of the present invention; Figure 2 are the four basic programming structures of the SFC of the present invention; Figure 3 is the echo function diagram of the steps and transitions of the present invention; Figure 4 is the schematic diagram of the configuration exit action operation of the present invention; Figure 5 is the quick modeling component of the selection sequence of the present invention; Figure 6 is the exception prompt dialog box of the present invention. Detailed Embodiment

[0016] The technical solution of the present invention will be further described below with reference to the drawings.

[0017] As Figure 1 shown, the embodiment of the present invention provides a method for developing the sequential control configuration of FADEC software, including the following steps: Step 1, define the basic graphic symbols in the sequential function chart in the configuration platform, namely "step", "transition", and "directed line segment", and complete the UI design and storage design of the relevant graphic elements. The specific steps are as follows: a) Abstract "step", "transition", and "directed line segment" into an algorithm, and define attributes such as algorithm name, algorithm type, algorithm category, grouping, input and output parameter sets, etc.

[0018] b) Design the basic graphic elements of the sequential function chart. For example, use a rectangular box with a step number to represent "step", use a vertically intersecting line to represent "transition", and use a line with an arrow to represent "directed line segment".

[0019] c) Store the graphic element information of the SFC in an XML file, serialize the attributes of the basic graphic elements into the XML file, and initialize the SFC basic graphic elements by deserializing the XML.

[0020] Step 2: Implement the hybrid modeling of FBD and SFC through the three-layer configuration modeling design of the task configuration layer, the SFC model layer, and the action / condition configuration layer. The specific steps are as follows: d) Design a dedicated FBD algorithm block (SFC_Module) and design the corresponding input and output interfaces. This algorithm block can be placed in the basic algorithm blocks of the configuration platform like other FBD algorithm blocks and can be dragged to the canvas for model configuration of subtasks; e) Different from ordinary FBD algorithm blocks, double-clicking on SFC_Module can enter the "SFC model layer", and by dragging the basic graphic elements of the SFC, complete the modeling of the sequential control process; f) Double-clicking on a specific "step" or "transition" can open the "action / condition configuration layer". On this page, the specific logic in the step or transition can be configured through the FBD basic function blocks.

[0021] Step 3: Decompose the SFC model into four basic programming structures: "single sequence", "selection sequence", "parallel sequence", and "loop jump", as Figure 2 shown. Study the mapping relationship between the SFC atomization operation and the C language source code, and formulate the code-level conversion rules between the SFC graphical language and the C language. The specific design is as follows: g) For each dragged "step", define 1 local static variable in the function body to represent whether the Nth step is an active step, and at the same time generate an if statement. If the flag is judged to be true, execute all the actions in this step; h) For each dragged "transition", generate a complete if statement. The active step flag of the connected step and the user-defined transition condition will be automatically "AND"ed together; at the same time, set the previous step active flag to false in the if condition; i) The actions in the step are only generated in the if statement where the corresponding active step flag is true.

[0022] Step 4: To facilitate the user to see both the sequential control process flow and the specific operations under each step in the same interface, design a graphical display function, as Figure 3 shown. After parsing the control logic in the "step" and "transition", display it in the simplified C code form on the sequential control model layer. The specific design is as follows: j) Design an output node on the right side of the "Step" and "Transition" legends, and connect a text box for echo. The relative position of this text box with respect to the "Step" or "Transition" is fixed, but it can move as the "Step" or "Transition" moves; k) Click on the echoed text box, and the text box will become active. At this time, drag the vertex in the lower right corner to change the size of the echoed text box, supporting the adjustment of the size and layout of the echoed text box; l) When defining variables, add an "alias" attribute. Using an alias can simplify the echoed string in sequential control, and the alias does not participate in code generation; m) Parse the control logic in the "Step" or "Transition", identify variables and operators, and look up the aliases stored in the database according to the variable names, and display them in the echoed text box.

[0023] Step 5: To avoid unexpected impacts between different SFC models, when each sequential control exits, the exit actions can be configured and the global objects can be processed. The specific design is as follows: As Figure 4 shown, right-click on the SFC_Module block to pop up a menu, select "Configure Exit Action", and a new canvas can be opened. On this canvas, FBD blocks can be dragged to perform logic configuration and variable binding to achieve "post-processing" when the sequential control ends.

[0024] Step 6: To improve the configuration and modeling efficiency of SFC, encapsulate the three basic configurations of "single sequence", "selection sequence", and "parallel sequence" in sequential control into a tool library, and directly provide users with quick modeling components without using the most basic elements such as "steps", "transitions", and "directed line segments" for step-by-step configuration. The specific design is as follows: n) Design an SFC quick toolbar, draw thumbnails of single sequence, selection sequence, and parallel sequence as quick icons, and embed them in the SFC quick toolbar. When the user drags the corresponding quick icon to the canvas, a "Settings" page will pop up; o) The user can enter the number of sequences on the "Settings" page and click the "OK" button, then the tool will automatically draw the corresponding number of basic primitives in the order of "step - transition - step", and the connection lines between steps and transitions will be automatically connected; p) For a single sequence, the number of sequences represents the number of steps generated sequentially; for a selection sequence, the number of sequences represents the number of branches of the selection branch; for a parallel sequence, the number of sequences represents the number of branches of the parallel branch. Taking the selection sequence as an example, set the number of sequences to 3, and the sequential function diagram automatically generated by the tool is as Figure 5 shown.

[0025] Step 7: During the SFC modeling process, perform a legality check on the model structure, empty steps, type matching, etc., and prompt anomalies or warnings for models that do not meet the sequential control configuration specifications. The specific design is as follows: q) Formulate modeling specifications, and formulate SFC modeling specifications from dimensions such as model design and tool operations. For example, a transition can only be connected to a step, the end of a selection sequence, or the start of a parallel sequence.

[0026] r) The tool judges legality. According to the formulated specifications, during the SFC modeling process, obtain the attribute elements and status of each model by querying the database, and check the legality item by item in real time.

[0027] s) Prompt anomalies or warnings for models that do not meet the sequential control configuration specifications. The prompts are different for different situations. For example Figure 5 As shown, when the step and the transition are empty, an anomaly reminder is given. For example Figure 6 As shown, it is an error prompt that steps cannot be directly connected (a transition is required).

Claims

1. A FADEC software sequential control configuration development method, characterized in that: The following steps are involved: (1) SFC graphical representation: The basic graphic symbols in the sequential function chart are represented graphically, and the relevant graphic elements are designed to meet the IEC61131-3 standard; (2) Sequential control hierarchical configuration design: Develop the modeling function of the configuration platform to support the mixed modeling of function block diagram (FBD) and sequential function diagram (SFC). Complete subtask configuration through SFC function blocks and ordinary FBD blocks, carry out sequential control configuration of SFC model in SFC function blocks, and carry out specific logic configuration in "step" and "transition". (3) Automatic generation of sequence control code: Decompose the SFC model into four basic structures, study the mapping relationship between SFC atomic operations and C language source code, and formulate code-level conversion rules between SFC graphical language and C language; (4) "Step" and "transition" logic echo: Design a graphical display function to parse the control logic in the "step" and "transition" and read it back and display it in the sequential control model layer; (5) Exit action configuration design: When each sequential control exits, the exit action is configured and configured, and the global object is processed; (6) SFC rapid modeling and design: various basic configurations in sequential control are encapsulated into the tool library, and rapid modeling components are directly provided to users. There is no need to use the most basic elements such as "step", "migration", "directed line segment" to configure step by step, so as to realize the rapid construction of sequential control models; (7) Automatic SFC design check: During the SFC modeling process, the model structure, empty steps, and type matching are checked for legality, and models that do not meet the sequential control configuration specifications are prompted with exceptions or alarms.

2. A FADEC software sequential control configuration development method according to claim 1, characterized in that: Step (1) is as follows: abstract "step", "transition" and "directed line segment" into an algorithm, define the algorithm name, algorithm type, algorithm category, grouping, input and output parameter sets and other attributes; design the basic primitives of the sequential function chart, such as using a rectangular box with a step number to represent a "step", using vertically intersecting line segments to represent a "transition", and using a line segment with an arrow to represent a "directed line segment"; use an XML file to store the primitive information of the SFC, and initialize the SFC basic primitives by deserializing the XML.

3. A FADEC software sequential control configuration development method according to claim 1, characterized in that: Step (2) is as follows: Design a dedicated FBD algorithm block SFC_Module and design the corresponding input and output interfaces. The algorithm block is placed in the basic algorithm block of the configuration platform like other FBD algorithm blocks, and dragged to the canvas to configure the subtask model; use SFC_Module to enter the "SFC model layer" and complete the modeling of the sequential control process by dragging the basic SFC graphics; open the "action / condition configuration layer" on the specific "step" or "transition", and complete the configuration of the specific logic in the step or transition through the FBD basic function block on the page.

4. A FADEC software sequential control configuration development method according to claim 1, characterized in that: Step (3) is as follows: Decompose the SFC model into four basic programming structures: "single sequence", "selection sequence", "parallel sequence" and "loop jump"; each time a "step" is dragged, a local static variable is defined in the function body to indicate whether the Nth step is an active step, and an if statement is generated at the same time. If the flag is true, all actions in the step are executed; each time a "transition" is dragged, a complete if statement is generated, and the active step flag of the connected step is true and the user-defined transition condition is automatically "anded" together; at the same time, the activity flag of the previous step is set to false in the if condition; the action in the step is only generated in the if statement where the corresponding active step flag is true.

5. A FADEC software sequential control configuration development method according to claim 1, characterized in that: Step (4) is as follows: design an output node on the right side of the "Step" and "Transition" legend, connect it to a text box for echoing, the relative position of the text box to the "Step" or "Transition" is fixed, but it moves with the movement of the "Step" or "Transition"; change the size of the echo text box, and support the adjustment of the size and layout of the echo text box; when defining variables, add the "Alias" attribute, and use the alias to simplify the string echoed in the sequence control. The alias does not participate in code generation; parse the control logic in the "Step" or "Transition", identify the variables and operators, search for the alias stored in the database according to the variable name, and display it in the echo text box.

6. A FADEC software sequential control configuration development method according to claim 1, characterized in that: Step (5) is as follows: right-click on the SFC_Module block, a menu pops up, select "Configure Exit Action", and open a new canvas; on this canvas, drag the FBD block to perform logic configuration and variable binding to implement "post-processing" at the end of sequential control.

7. A FADEC software sequential control configuration development method according to claim 1, characterized in that: Step (6) is as follows: Design the SFC shortcut toolbar, draw thumbnails of single sequence, selected sequence and parallel sequence as shortcut icons, and embed them in the SFC shortcut toolbar; when the user drags the corresponding shortcut icon to the canvas, the user enters the number of sequences in the "Settings" page, and the tool will automatically draw the corresponding number of basic primitives in the order of "step-transition-step", and the connection lines between steps and transitions will be automatically connected.

8. A FADEC software sequential control configuration development method according to claim 1, characterized in that: Step (7) is as follows: formulate a modeling specification, formulate an SFC modeling specification from the dimensions of model design and tool operation; according to the formulated specification, in the SFC modeling process, obtain the attribute elements and status of each model by querying the database, and check the legality of each item in real time; prompt an exception or alarm for the model that does not meet the sequential control configuration specification.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is loaded into the processor, a FADEC software sequential control configuration development method according to any one of claims 1 to 8 is implemented.

10. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, a FADEC software sequential control configuration development method according to any one of claims 1 to 8 is implemented.