Search

DE-102024132902-A1 - Method for updating a control program of an automation system with data migration of a program state of the control program

DE102024132902A1DE 102024132902 A1DE102024132902 A1DE 102024132902A1DE-102024132902-A1

Abstract

The invention relates to a method (100) for updating a control program of an automation system (300) with data migration of a program state of the control program, comprising: Performing a data migration from program state A (PA) to program state B (PB) using a migration algorithm (ALG) in one migration step (101); Identifying at least one A-data element (DA) with a customized value (YA) of the A-program state (PA) by the migration algorithm (ALG) in an identification step (103); and Performing a partial data migration using the migration algorithm (ALG) in a partial migration step (105). The invention further relates to a method (200) for operating an automation system (300).

Inventors

  • Ralf Dreesen

Assignees

  • BECKHOFF AUTOMATION GMBH

Dates

Publication Date
20260513
Application Date
20241111

Claims (20)

  1. Method (100) for updating a control program of an automation system with data migration of a program state of the control program, wherein a control unit (301) of the automation system (300) comprises an A-control program (A) and a B-control program (B), wherein the A-control program (A) is executed to control the automation system (300), wherein the B-control program (B) is a version of the A-control program (A), wherein an A-program state (PA) of the A-control program (A) is stored in an A-memory area (SPA) of the control unit (301), wherein a B-program state (PB) of the B-control program (B) is stored in a B-memory area (SPB), wherein the A-program state (PA) is stored in the form of an A-data structure (DSA) comprising a plurality of A-data elements (DA), and wherein the B-program state (PB) is stored in the form of a B-data structure comprising a plurality of B-data elements (DB). B-data structure (DSB) is stored, wherein the A-data elements (DA) represent components of the A-control program (A), wherein the B-data elements (DB) represent components of the B-control program (B), wherein the A-data elements (DA) of the A-program state (PA) comprise values (XA) of the components of the A-control program (A), wherein the values (XA) of the A-data elements (DA) of the A-program state (PA) represent a current state of the automation system (300) controlled by the execution of the A-control program (A), comprising: Executing a data migration of the A-program state (PA) to the B-program state (PB) by a migration algorithm (ALG) in a migration step (101), wherein in the data migration the values (XA) of the respective components of the A-control program (A) stored in the A-data elements (DA) of the A-program state (PA) are transferred to corresponding components of the B-control program. (B) B-data elements (DB) representing the B-program state (PB) are mapped, and wherein the A-control program (A) continues to execute during the execution of migration step (101); Identifying at least one A-data element (DA) with a modified value (YA) of the A-program state (PA) by the migration algorithm (ALG) in an identification step (103), wherein the at least one modified value (YA) of the at least one identified A-data element (DA) was modified by the execution of the A-control program (A) during the execution of migration step (101); and Executing a partial data migration by the migration algorithm (ALG) in a partial migration step (105), wherein in the partial data migration the at least one modified value (YA) of the at least one A-data element (DA) is mapped to the B-data element (DB) of the B-program state (PB) associated with the A-data element (DA).
  2. Procedure (100) according to Claim 1 , wherein in the partial migration step (105) only the at least one adapted value (YA) of the at least one identified A data element (DA) is migrated.
  3. Procedure (100) according to Claim 1 or 2 , furthermore comprehensively: Determining the migration progress of the migration from program state A (PA) to program state B (PB) according to a predefined progress criterion by the migration algorithm (ALG) in a progress determination step (107).
  4. Procedure (100) according to Claim 3 , wherein the identification step (103) and the partial migration step (105) are repeated if The progress criterion is reached when a first predefined limit is exceeded and a second predefined limit is not reached, which differs from the first predefined limit.
  5. Procedure (100) according to Claim 3 or 4 , furthermore comprehensively: Completion of the data migration and/or partial data migration of the A program state (PA) to the B program state (PB) by the migration algorithm (ALG) in a migration completion step (109) if the progress criterion reaches or falls below the predefined first threshold.
  6. Procedure (100) according to one of the preceding Claims 3 until 5 , furthermore comprehensively: Aborting the data migration and/or partial data migration of the A program state (PA) to the B program state (PB) by the migration algorithm (ALG) in a migration abort step (111) if the progress criterion reaches or exceeds the second predefined limit.
  7. Procedure (100) according to one of the preceding Claims 3 until 4 , furthermore, comprising: interrupting the execution of the A control program (A) and generating an execution interruption of the execution of the A control program (A) in an interruption step (113) if the progress criterion reaches or exceeds the second predefined limit, wherein during the interruption of the execution of the A control program (A) the identification step (103) and the partial migration step (105) are executed.
  8. Procedure (100) according to one of the preceding Claims 3 until 7 , where the progress criterion is defined as a number of A data elements (DA) with adjusted values (YA) in the A program state (PA) and/or as a change in the number of A data elements (DA) with adjusted values (YA) in the A program state (PA) between successive migration steps (101) and/or partial migration steps (105).
  9. Procedure (100) according to Claim 8 , wherein the progress determination step (107) comprises: determining the number of A data elements (DA) with adjusted values (YA) in the A program state (PA) after execution of the partial migration step (105) and/or determining the change in the number of A data elements (DA) with adjusted values (YA) in the A program state (PA) after execution of the data migration step and after execution of the partial migration step (105) or after execution of two consecutively executed partial migration steps (105) in one count determination step (115).
  10. Procedure (100) according to one of the preceding Claims 3 until 9 , where the progress criterion is defined as an execution duration of the execution of the sub-migration step (105) and/or as a change in the execution durations of the executions of successive sub-migration steps (105).
  11. Procedure (100) according to Claim 10 , wherein the progress determination step (107) comprises: determining a duration of the execution of the sub-migration step (105) and/or determining a change in the durations of the executions of the migration step (101) and the sub-migration step (105) or of the executions of two successively executed sub-migration steps (105) by a timing module in a duration determination step (117).
  12. Method (100) according to one of the preceding claims, wherein the identification step (103) comprises: Reading a write information (SI) by the migration algorithm (ALG) in a read step (119), wherein at least the A data element (DA) with adapted value (YA) is displayed in the write information (SI).
  13. Procedure (100) according to Claim 12 , wherein during the execution of the A control program (A) a write function (FUNC) writes to the write information (SI), and wherein by writing to the write information (SI) the write function (FUNC) in the write information (SI) A data elements (DA) of the A program state (PA) are marked, whose values (XA) were adapted to adapted values (YA) by execution of the A control program (A) during the execution of the migration step (101) and/or the identification step (103) and/or the partial migration step (105).
  14. Procedure (100) according to Claim 13 , where the write information (SI) is generated by the write function (FUNC) when executing migration step (101).
  15. Procedure (100) according to Claim 13 or 14 , wherein the write function (FUNC) continuously writes to the write information (SI), and wherein the write function (FUNC) identifies the A data elements (DA) in the write information (SI) as soon as the values (XA) of the respective A data elements (DA) in the A program state (PA) are adapted to adapted values (YA) by executing the A control program (A).
  16. Procedure (100) according to one of the preceding Claims 13 until 15 , wherein in a cyclic execution of the A control program (A) in Execution cycles (CC) are written to the write information (SI) by the write function (FUNC) at predefined write times, and the predefined write times include times from the following list: beginning of the execution cycle (CC), end of the execution cycle (CC), defined time within the execution cycle (CC), in an execution pause between execution cycles (CC).
  17. Procedure (100) according to one of the preceding Claims 12 until 16 , wherein, after reading the write information (SI) by the migration algorithm (ALG), the information read from the write information (SI) is marked as read or deleted.
  18. Procedure (100) according to one of the preceding Claims 12 until 17 , wherein the write information (SI) is in list form, and wherein the write information (SI) lists names and/or memory addresses in the A memory area (SPA) of the A data elements (DA) with adapted values (YA) of the A program state (PA).
  19. Procedure (100) according to one of the preceding Claims 12 until 18 , wherein the write information (SI) is in the form of a bit sequence, and wherein the bit sequence indicates A data element memory areas (SDA) of the A data elements (DA) with adapted values (YA) of the A program state (PA).
  20. Procedure (100) according to Claim 19 , wherein the A-data element memory area (SDA) displayed for an A-data element (DA) with an adapted value (YA) is designed as a contiguous memory area and includes, in addition to a memory address of the A-data element (DA) with an adapted value (YA), at least one memory address of another A-data element (DA) with an unadapted value (XA) of the A-program state (PA) in the A-memory area (SPA), and wherein in the partial data migration the values (XA) and/or adapted values (YA) of the A-data elements (DA) arranged in the respective displayed A-data element memory area (SDA) are migrated.

Description

The invention relates to a method for updating a control program of an automation system with simultaneous migration of data describing a program state of the control program. In automation technology, components of an automation system are typically controlled and read by a control unit of the automation system through the cyclical execution of a corresponding control program. During the cycles in which the respective components are controlled according to the respective control instructions of the control program, the control unit receives and stores information describing the state of the automation system and the control program (hereinafter referred to as program state). A so-called program state comprises all the information necessary to represent the state of the automation system and the control program. A program state can include, for example, the variables, functions, databases, or other objects used in the control program. Furthermore, the program state can include information regarding the participants of the automation system or regarding processes taking place in the automation system. Such a program state can be recreated after the completion of a control cycle, so that the current state of the automation system and the control program can be displayed at any time. The program state is the content of a corresponding global memory area. During the execution of a control program cycle, the memory can be modified (possibly multiple times). With each memory modification, the state of the automation system and the control program can change. Invalid intermediate states may occur. At the end of the cycle, the program state is consistent and remains so until the start of the next execution cycle. When the control program is executed again in a subsequent control cycle, the control program can access the data stored in the program state in a previous cycle and thus continue the control unit of the automation system in the following cycle based on the state of the automation system of the previous control cycle. During the ongoing operation of an automation system, situations often arise in which various parameters need to be readjusted or processes need to be changed or adapted in order to achieve or ensure an optimized operation of the automation system. In this context, it is often necessary during ongoing operations to replace a currently running tax program with a more up-to-date version that takes the necessary adjustments into account. In order to avoid restarting the automation system after replacement and instead to continue operating the automation system in its current state, the current version of the control program must be able to access the program state information, which describes the state of the control program and the automation system at the time of the last executed control cycle. Only in this way can it be ensured that by executing the current and saved version of the control program, the automation system can continue to be controlled from the current state of the automation system and a complete restart of the automation system can be avoided. It is therefore necessary to adapt the program state information to the current version of the control program and the changes made therein, so that if the adaptation is successful, the current control program can access the information of the previously stored program state and control the automation system in its current state. It is therefore an object of the invention to provide an improved method for updating a control program of an automation system with simultaneous transmission of a current program state. The problem is solved by a method according to the independent claim. Preferred embodiments are specified in the dependent claims. One aspect is a procedure for updating a control program of an automation system with data migration of a Pro. The control program state is provided, wherein a control unit of the automation system comprises an A-control program and a B-control program, wherein the A-control program is executed to control the automation system, wherein the B-control program is a version of the A-control program, wherein an A-program state of the A-control program is stored in an A-memory area of the control unit, wherein a B-program state of the B-control program is stored in a B-memory area, wherein the A-program state is stored in the form of an A-data structure comprising a plurality of A-data elements, wherein the B-program state is stored in the form of a B-data structure comprising a plurality of B-data elements, wherein the A-data elements represent components of the A-control program, wherein the B-data elements represent components of the B-control program, wherein the A-data elements of the A-program state comprise values of the components of the A-control program, wherein the values of the data elements of the A-program state represent a current state of the automation system controlled by the execution o