IP Library Granted Patent US 12,229,530
Granted Patent B2
US 12,229,530 · App. 18/048,452 · Granted Feb 18, 2025

Method for generating program code, method for configuring a control unit and computer system

Inventors: Michael Mair (Paderborn, DE); Lars Wallbaum (Paderborn, DE)
Assignee: DSPACE GMBH
G06F8/30
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,229,530
App. No.
18/048,452
Granted
Feb 18, 2025
Kind
B2
Abstract

A computer-implemented method generates program code of an executable control program for controlling a control system. Functionality of the control program is described at least in part in a graphical model. The graphical model is translated into program code in a text-based programming language. The method includes: generating a first placeholder representing a variable, the first placeholder being used in a predetermined segment of the program code; generating a second placeholder, which is placed before a beginning of the predetermined segment of the program code that uses the first placeholder; and generating a third placeholder, which is placed after an end of the predetermined segment of the program code that uses the first placeholder.

Claims (41)

1. A computer-implemented method for generating program code of an executable control program for controlling a control system, wherein functionality of the control program is described at least in part in a graphical model, wherein the graphical model is translated into program code in a text-based programming language, the method comprising:

separately generating incremental program code for a plurality of sub-systems of the control system, wherein the plurality of sub-systems of the control system include a first sub-system, wherein generating the incremental program code for the first sub-system comprises:

generating a first placeholder representing a variable, the first placeholder being used in a predetermined segment of program code;

generating a second placeholder, which is placed before a beginning of the predetermined segment of program code that uses the first placeholder; and

generating a third placeholder, which is placed after an end of the predetermined segment of program code that uses the first placeholder; and

after the incremental program code for the plurality of sub-systems is generated, merging the incremental program code for the plurality of sub-systems to form the program code for the graphical model;

wherein definitions for the first, second and third placeholders are generated after the incremental program code for the plurality of sub-systems of the control system is generated.

2. The computer-implemented method according to claim 1 , further comprising:

generating a fourth placeholder, which is placed at a beginning of a usage region of the predetermined segment of program code for defining the variable represented by the first placeholder.

3. The computer-implemented method according to claim 1 , wherein a calculation is performed in the predetermined segment of program code that uses the first placeholder.

4. The computer-implemented method according to claim 1 , wherein the second placeholder is placed at the beginning of a usage region of the first placeholder.

5. The computer-implemented method according to claim 1 , wherein the third placeholder is placed at the end of a usage region of the first placeholder.

6. The computer-implemented method according to claim 1 , wherein the first placeholder, the second placeholder, and/or the third placeholder are generated as a preprocessor macro.

7. The computer-implemented method according to claim 1 , wherein at least one local variable is applied using a definition of at least one placeholder in a ready-generated program code, wherein the at least one placeholder comprises the first placeholder, the second placeholder, the third placeholder, and/or a fourth placeholder.

8. The computer-implemented method according to claim 1 , wherein the variable represented by the first placeholder is accessed via a function call, and wherein the second placeholder and/or the third placeholder are definable as empty.

9. The computer-implemented method according to claim 1 , wherein an external variable is read and written via a function call, and wherein the second placeholder and the third placeholder each define a position at which a respective function call is generated.

10. The computer-implemented method according to claim 1 , wherein the first, second and third placeholders are defined such that they provide a barrier in multithreading models, the barrier preventing different threads from simultaneously accessing a same resource.

11. The computer-implemented method according to claim 1 , wherein the first, second and third placeholders are defined such that error processing of an access function is provided by storing a last error-free value in a persistent variable.

12. A method for configuring a control unit, wherein the control unit comprises at least one arithmetic logic unit, the method comprising:

inputting a block diagram;

generating program code using the method according to claim 1 ;

compiling the program code for the arithmetic logic unit so that an executable program code is generated;

transmitting the executable program code to the control unit; and

storing the executable program code on a non-volatile memory of the control unit and/or executing the executable program code by the arithmetic logic unit of the control unit.

13. A non-transitory computer-readable medium having processor-executable instructions stored thereon for generating program code of an executable control program for controlling a control system, wherein functionality of the control program is described at least in part in a graphical model, wherein the graphical model is translated into program code in a text-based programming language, and wherein the processor-executable instructions, when executed, facilitate:

separately generating incremental program code for a plurality of sub-systems of the control system, wherein the plurality of sub-systems of the control system include a first sub-system, wherein generating the incremental program code for the first sub-system comprises:

generating a first placeholder representing a variable, the first placeholder being used in a predetermined segment of program code;

generating a second placeholder, which is placed before a beginning of the predetermined segment of program code that uses the first placeholder; and

generating a third placeholder, which is placed after an end of the predetermined segment of program code that uses the first placeholder; and

after the incremental program code for the plurality of sub-systems is generated, merging the incremental program code for the plurality of sub-systems to form the program code for the graphical model;

wherein definitions for the first, second and third placeholders are generated after the incremental program code for the plurality of sub-systems of the control system is generated.

14. A computer system, comprising:

a human-machine interface;

a non-volatile memory having processor-executable instructions stored thereon; and

a processor configured to execute the processor-executable instructions to facilitate:

separately generating, by the computer system, incremental program code for a plurality of sub-systems of a control system, wherein the plurality of sub-systems of the control system include a first sub-system, wherein generating the incremental program code for the first sub-system comprises:

generating a first placeholder representing a variable, the first placeholder being used in a predetermined segment of program code;

generating a second placeholder, which is placed before a beginning of the predetermined segment of program code that uses the first placeholder; and

generating a third placeholder, which is placed after an end of the predetermined segment of program code that uses the first placeholder; and

after the incremental program code for the plurality of sub-systems is generated, merging, by the computer system, the incremental program code for the plurality of sub-systems to form the program code for the graphical model;

wherein definitions for the first, second and third placeholders are generated after the incremental program code for the plurality of sub-systems of the control system is generated.

Assignments (2)
CHANGE OF NAME Recorded May 22, 2026
From: DSPACE GMBH
To: DSPACE SE & CO. KG
Reel/Frame 075622/0216 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 21, 2022
From: MAIR, MICHAEL; WALLBAUM, LARS
To: DSPACE GMBH
Reel/Frame 061492/0824 →
Priority Claims (1)
DE 102021128101.6 · Oct 28, 2021 · national
Continuity (1)
Related Publication 20230176821A1 · Jun 8, 2023
References Cited (10)
US 8839187B1 · Yan · 2014 [cited by examiner]
US 9678628B2 · Gohr · 2017 [cited by examiner]
US 10402731B1 · Cosic · 2019 [cited by examiner]
US 20150089468A1 · Poxon · 2015 [cited by examiner]
US 20150193209A1 · Carter · 2015 [cited by examiner]
US 20190205101A1 · Shin · 2019 [cited by examiner]
US 20210255842A1 · Levitt · 2021 [cited by examiner]
DE 102020124080A1 · 2021 [cited by applicant]
Whitsitt Sean et al: “Model Based Development with the Skeleton Design Method”, 2013 20th IEEE International Conference and Workshops on Engineering of Computer Based Systems (ECBS), IEEE, Apr. 22, 2013 (Apr. 22, 2013),… [cited by applicant]
Wikipedia: “Make (software)”, Oct. 24, 2021 (Oct. 24, 2021), pp. 1-14, XP093156071, found in Internet: URL: https://en.wikipedia.org/w/index.php?title=Make_(software)&oldid=1051675981. [cited by applicant]