US 12,229,530 B2
Method for generating program code, method for configuring a control unit and computer system
Michael Mair, Paderborn (DE); and Lars Wallbaum, Paderborn (DE)
Assigned to DSPACE GMBH, Paderborn (DE)
Filed by dSPACE GmbH, Paderborn (DE)
Filed on Oct. 21, 2022, as Appl. No. 18/048,452.
Claims priority of application No. 102021128101.6 (DE), filed on Oct. 28, 2021.
Prior Publication US 2023/0176821 A1, Jun. 8, 2023
Int. Cl. G06F 9/44 (2018.01); G06F 8/30 (2018.01)
CPC G06F 8/30 (2013.01) 14 Claims
OG exemplary drawing
 
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.