METHOD AND DEVICE FOR CONTROLLING THE SEQUENCE OF PROGRAM PARTS, PROGRAMMING METHOD, PROGRAMMING DEVICE
20230409001 · 2023-12-21
Assignee
Inventors
Cpc classification
G05B19/05
PHYSICS
G06F9/4881
PHYSICS
G05B2219/15127
PHYSICS
International classification
Abstract
A method of controlling the sequence of program parts has the following steps: initiated by the occurrence of a first event (E1), executing a first program part (P1) on a first arithmetic logic unit (RW1), wherein the first event (E1) and/or the first program part (P1) is/are assigned a first priority (Py1), and initiated by the occurrence of a second event (E2), interrupting the execution of the first program part (P1) and then executing a second program part (P2) on the first arithmetic logic unit (RW1), wherein the second event (E2) and/or the second program part (P2) is/are assigned a second priority (Py2) that is higher than the first priority (Py1), wherein the first and/or the second program part (P1, P2) is/are a function block in the sense of IEC 61499 or a part thereof or a data transmission initiated thereby.
Claims
1. A method of controlling the sequence of program parts, comprising: initiated by the occurrence of a first event, executing a first program part on a first arithmetic logic unit, wherein the first event and/or the first program part is/are assigned a first priority, and initiated by the occurrence of a second event, interrupting the execution of the first program part on the first arithmetic logic unit and then executing a second program part on the first arithmetic logic unit, wherein the second event and/or the second program part is/are assigned a second priority, wherein the second priority has a predetermined and in particular a user-defined relationship with the first priority, wherein the second priority is higher than the first priority, wherein the first and/or the second program part is/are a function block in the sense of IEC 61499 or a part thereof or a data transmission initiated thereby.
2. The method in accordance with claim 1, in which one or more program parts are parts of device control programs or plant control programs that run on a programmable logic controller.
3. The method in accordance with claim 1, in which at least one event list is kept that stores events that have occurred in accordance with the associated priority and that designates program parts still to be processed, wherein, for a plurality of priorities, respective separate event lists can be kept that in each case store events of the associated priority that have occurred and that designate program parts still to be processed, wherein the second event is entered in the event list corresponding to its priority and then, if there is no entry in any event list for a higher priority, is possibly used for the interruption of the execution of the first program part on the first arithmetic logic unit in accordance with the processing rules for the entries in the event list of its own priority.
4. The method in accordance with claim 1, in which a plurality of tasks are used that were created in advance as respective execution environments.
5. The method in accordance with claim 1, in which tasks are used that are created in real time as respective execution environments and that are removed in real time.
6. The method in accordance with claim 1, in which the second event is generated by another program part running on another arithmetic logic unit.
7. The method in accordance with claim 1, comprising: obtaining monitoring results of the occupancy and/or utilization of the first arithmetic logic unit, and in accordance with the monitoring results, when the second event occurs, initiating the interruption and the execution of the second program part on the first arithmetic logic unit.
8. The method in accordance with claim 7, in which monitoring results relating to the occupancy and/or utilization of the first arithmetic logic unit and one or more further arithmetic logic units are obtained and, in accordance with the monitoring result, when the second event occurs, the initiation of the interruption and the execution of the second program part on the first arithmetic logic unit is caused.
9. The method in accordance with claim 8, in which a decision on the assignment of the execution of the second program part to one of the monitored arithmetic logic units is made in accordance with the monitoring result.
10. The method in accordance with claim 8, in which a decision on the assignment of the execution of the second program part to one of the monitored arithmetic logic units is also made in accordance with properties of the monitored arithmetic logic units.
11. The method in accordance with claim 1, in which program parts include distinguishable parts and the interruption of the execution of the first program part takes place after processing a part included in the first program part and before starting the processing of a part following in the first program part, or during the processing of such a part.
12. The method in accordance with claim 1, in which program parts are called up and processed in accordance with an execution control planning in accordance with IEC 61499, wherein the calling up of a program part from the execution control planning can be the first event effecting the execution of the first program part and/or the second event effecting the execution of the second program part, to which event a priority can be assigned or is already assigned, and these events can overwrite or modify the determinations of the execution control planning.
13. The method in accordance with claim 1, in which the interruption of the execution of the first program part comprises the backup storage of the currently relevant device state, and in which the continuation of the previously interrupted program part comprises the loading of the device state that was backup-stored during the interruption for the arithmetic logic unit taking over the continuation.
14. The method in accordance with claim 1, in which a program part is designated as uninterruptible or as not simultaneously executable multiple times and is then also not interrupted or simultaneously executed multiple times when the other conditions occur.
15. An apparatus in accordance with IEC 61499 for performing the method in accordance with claim 1 that can be a device control or a plant control and/or a programmable logic controller and that can have at least one sensor or data input and at least one actuator or data output.
16. A programming method in which an IEC 61499-compliant programming interface is provided that is adapted for programming the method in accordance with claim 1.
17. The programming method in accordance with claim 16, in which the programming interface is or comprises a graphical user interface that is adapted to input the programming of the priority-initiated interruption of the execution of the first program part on the first arithmetic logic unit.
18. A programming apparatus for performing the programming method in accordance with claim 16.
19. An execution apparatus for IEC 61499-compliant programs, comprising at least two arithmetic logic units for the parallel execution of program parts that are triggered by events marked with priorities, an operating control that controls the execution of program parts on the arithmetic logic units based on the priorities that are associated with the events triggering the program parts, wherein the operating control is adapted to interrupt the execution of a first program part on an arithmetic logic unit and to initiate the execution of a second program part on this arithmetic logic unit if the event triggering the execution of the second program part has a higher priority than the event triggering the execution of the first program part.
20. The method in accordance with claim 4, in which a plurality of tasks are used that were created in advance as respective execution environments such that one or more tasks are created for each priority value.
21. The method in accordance with claim 5, in which tasks are used that are created in real time as respective execution environments in response to an occurring event
22. The method in accordance with claim 5, in which tasks are removed in real time at the end of the processing of a program part.
23. The method in accordance with claim 7, comprising: obtaining monitoring results of the occupancy and/or utilization of the first arithmetic logic unit from an operating system function.
24. The method in accordance with claim 13, in which the interruption of the execution of the first program part comprises the storage of the values of an arithmetic logic unit, registers, data memories, a program memory, a program pointer, files.
25. The method in accordance with claim 14, in which a program part is independently of priority assignments designated as uninterruptible or as not simultaneously executable multiple times and is then also not interrupted or simultaneously executed multiple times when the other conditions occur.
Description
[0038] Embodiments of the invention will be described in the following with reference to the drawings; there are shown
[0039]
[0040]
[0041]
[0042]
[0043]
[0044]
[0045]
[0046]
[0047] In
[0048] Assuming that for systemic reasons it is not possible to assign the second program part P2 associated with the second event E2 to an arithmetic logic unit other than the arithmetic logic unit RW1 shown, the second event E2 14 causes the first program part P1 11a to be interrupted shortly after the point in time t2 so that the second program part P2 12, which is triggered by the second event E2 14, is executed on the first arithmetic logic unit RW1.
[0049] It is further assumed that the processing of the second program part P2 12 is completed at a later point in time t4. This is the reason to then continue the processing of the interrupted first program part 11a at a point in time t5, which is indicated by reference number 11b.
[0050] It has already been pointed out that program parts can be marked as uninterruptible. If this were the case for the program part P1 11 in the example of
[0051]
[0052] The program part 24 triggered by the event 23 can then be executed on the arithmetic logic unit RW0 which has become free due to the completion of the program part P0, while the program part P2 then cannot be executed there. Accordingly, it is assigned to another arithmetic logic unit, the arithmetic logic unit RW1, for which it is assumed that the processing of the first program part P1 11a is still running at the point in time t2. The processing of the first program part P1 11a is then interrupted on this arithmetic logic unit RW1 since the program part P2 12 was called up with a higher priority and the already shown processing of the second program part P2 12 then takes place there that is assumed to be completed at the point in time t4.
[0053] At this point in time t4, the second program part P2 12 can itself generate one or more events that correspond to its regular programming and that are indicated in
[0054] A further event 15 can also be defined or generated, for instance by the operating control 107, namely an event for triggering the processing of the interrupted program part, immediately on a program part interruption shown in
[0055]
[0056] To avoid misunderstandings, it is pointed out that event lists change dynamically by adding new events, in particular the most recently generated events, and deleting previously entered events, in particular processed events, due to operational reasons. Specific representations are then snapshots in each case.
[0057] As already mentioned, the program parts triggered by events can be function blocks in the sense of IEC 61499. Accordingly, in the embodiment of
[0058] In the sequence control procedure described, the system control can now process the pending events starting with the first event list 31. In the example of
[0059]
[0060] The event list design in accordance with
[0061] So far, the event-controlled and priority-controlled execution and, if necessary, interruption of program parts has been described. In the same way, this can apply to the event-controlled and priority-controlled execution and, if necessary, interruption of data transmissions that can in this respect also be understood as program parts.
[0062] In this description, an execution environment can be an arithmetic logic unit configured in a certain way by parameters. A task can be a program part running or executable in an execution environment. An arithmetic logic unit can be a processor with associated hardware or, generally, an allocated physical resource, for instance a computing time portion of multi-tasking-capable hardware. They can also be virtual computing resources or logically organized computing resources on a single piece of hardware that each execute a task per se at a point in time. A program part can be a function block in the sense of IEC 61499. An arithmetic logic unit can be a core in the sense of IEC 61499.
[0063]
[0064] With 41, input events are defined that trigger the control program and that are not initiated by the program itself. As a rule, they are external events, for example the arrival of sensor data that lead to certain processing processes and possibly resulting device controls. In
[0065] In
[0066]
[0067]
[0068]
[0069]
[0070] As already mentioned, the incoming external events 41 can also be assigned priorities by appropriate steps or can be assumed as default. This can take place in the operating control 107.
[0071]
[0072]
[0073]
[0074] In this way, it is ensured that high priority program parts can be reliably executed and are not accidentally blocked by possibly long-lasting low priority processes.
REFERENCE NUMERAL LIST
[0075] 11, 12, 21, 24, 52 program parts [0076] 13, 14, 15, 23, 25, 53 events [0077] 31 to 35 event lists [0078] 51 external event [0079] 101 circuit board [0080] 102 CPU, core [0081] 103 CPU, core [0082] 104 communication structure [0083] 105 communication input [0084] 106 communication output [0085] 107 operating control [0086] 110 function block [0087] 111 incoming event [0088] 112 outgoing event [0089] 113 input data [0090] 114 output data [0091] 115 event link [0092] 116 data link