execution environment
By assigning activation event priorities to the control program on the programmable logic controller of the automation system, the problem of untimely execution of time-critical parts in event control is solved, enabling timely control under high load conditions and improving the system's safety and reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SCHNEIDER ELECTRIC IND SAS
- Filing Date
- 2021-12-10
- Publication Date
- 2026-04-28
AI Technical Summary
In existing technologies, event control programs struggle to ensure the timely execution of time-critical components in automated systems, especially under high loads where insufficient computing power leads to security and reliability issues.
By assigning activation event priorities to the control programs on the programmable logic controllers of the automation system and determining the execution order of functional modules according to the priorities, the control programs are executed in an event-triggered manner to ensure the timely execution of time-critical parts.
It enables the priority execution of time-critical parts under high load conditions, improves the safety and reliability of the automation system, avoids response timeouts, and ensures timely control of the process.
Smart Images

Figure CN114625064B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for executing event-oriented control programs on a programmable logic controller (PLC) of an automation system, and an execution environment for executing event-oriented control programs on a PLC of an automation system. Background Technology
[0002] Automation systems with programmable logic controllers (PLCs) are used in automation technology to control automated processes and machine flows. For this purpose, the PLC is typically connected to sensors in the automation system. These sensors acquire the state of the automated process and transmit sensor signals representing that state to the controller. The controller then generates output signals for controlling actuators in the automation system based on the logical associations of the read sensor signals. The actuators, in turn, influence the state of the automated process based on these output signals. Sensors can be, for example, position sensors, rotation sensors, switches, optical encoders, etc., while actuators can be, for example, drivers, relays, or contactors.
[0003] The logic associations used to process the read sensor signals and generate the output signals are typically components of the control program of a programmable logic controller (PLC), which is stored in the controller's memory module. To execute the control program, the PLC typically includes an execution environment that executes the control instructions of the control program in a pre-defined order. Additionally, the execution environment can manage the working memory required to execute control commands and / or coordinate the reading of sensor signals and the output of output signals.
[0004] To ensure safe and reliable control of automated processes, the execution environment must be configured to provide an output signal within a predefined reaction time after reading sensor signals. Such a system is also known as a real-time control system. Here, the execution environment must ensure adherence to the predefined reaction time, regardless of system load and potential programming errors. If the reaction time is exceeded, the execution environment can take appropriate safety measures.
[0005] To ensure the reliable operation of an automation system, a programmable logic controller (PLC) must be able to execute time-critical reactions that are essential to the process as promptly as possible. For this purpose, it may be necessary that the logical associations used to execute time-critical reactions preferably precede other logical associations operating on the control device.
[0006] Typically, control systems for time-critical applications are implemented using a cyclic execution environment. In this environment, fixed time windows are defined within each cycle for reading sensor signals, calculating output signals, and outputting output signals. These time windows are then repeated periodically across multiple cycles. The time windows also define the maximum response time of the control system.
[0007] In addition to periodic control programs and execution environments, event-driven control programs are also used in automation technology, such as those defined in the standard IEC 61499. Such control programs comprise multiple functional modules, where the reading of sensor signals, the logical association of the read sensor signals, or the output of output signals are achieved through combinations of individual functional modules and additional user-defined program text (code). Here, the execution of functional modules is event-controlled, occurring when activation events associated with each functional module occur; the execution of a preceding functional module generates an activation event for the next functional module to be executed.
[0008] Furthermore, while event-controlled execution models are suitable for distributed control systems, the lack of predefined processing cycles makes it nearly impossible to guarantee the priority execution of time-critical parts of the control program. To reduce the probability of safety-critical response timeouts, the computing power in event-controlled controllers is often significantly over-engineered, for example, exceeding 50%. This ensures that sufficient computing power is available even under high loads for timely execution of functional modules. Summary of the Invention
[0009] The technical problem to be solved by the present invention is to provide a method for executing event-oriented control programs on a programmable logic controller (PLC) of an automation system, and an execution environment for executing event-oriented control programs on a PLC of an automation system, so as to ensure the timely execution of time-critical parts of the control programs.
[0010] The aforementioned technical problem is solved by the method for executing a control program on a programmable logic controller (PLC) of an automation system, and the execution environment for executing the control program on a PLC of an automation system, according to the present invention. Further extensions are also provided.
[0011] A method is proposed for executing an event-oriented control program on a programmable logic controller (PLC) of an automation system. The control program comprises multiple functional modules, each triggered by an activation event associated with that module, and the activation events are assigned priorities. The method includes the following steps:
[0012] - Detect the occurrence of activation events;
[0013] - The functional modules associated with the activation events are executed in an order determined by the priority of each activation event.
[0014] Within the scope of this invention, it has been recognized that the timely execution of time-critical portions of a control program can be ensured in a particularly simple and flexible manner by first assigning priority to each activation event occurring during the execution of the control program, and determining the execution order of each functional module after its associated activation event based on the priority of the corresponding activation event. By determining the execution order of functional modules by the priority of activation events, it is particularly feasible to execute functional modules triggered by multiple activation events with different priorities based on the triggered activation events. Compared to, for example, the case where priorities are fixedly assigned to each functional module, this enables a significantly more flexible prioritization of the execution of time-critical program portions.
[0015] The functional modules of the control program may each include at least one logical association, wherein the execution of each logical association of the functional modules is triggered by an activation event associated with each functional module. The logical associations of the functional modules may, for example, be corresponding components of the algorithms of related functional modules. The relationships between the activation events of the various functional modules of the control program can be predetermined by connecting the events that link the various functional modules together. The control program may, for example, conform to the requirements of standard IEC 61499, and the functional modules may, for example, be function blocks defined in that standard.
[0016] The functional modules to be executed sequentially in the control program can each be designed to generate an activation event upon execution, which triggers the execution of the functional modules to be executed directly following it. In this regard, functional modules can be connected to various event chains via event connections, where the execution of the preceding functional module in an event chain generates an activation event for each subsequent functional module in the chain.
[0017] Typically, an event chain can include all activation events, which are generated based on a pre-defined start event to trigger the execution of functional modules to be executed sequentially, up to the terminating module to be executed as the last functional module in the event chain. The start event can be, for example, an external activation event, provided when an external input interface of the execution environment is activated. The external input interface can be, for example, an interface with an execution resource of the control unit that executes the execution environment. Specifically, the external input interface can be an external interface of the device executing the control program, such as a sensor input.
[0018] For example, a start event can be provided based on sensor signals received through the control unit, such as when a sensor signal is received through the control unit or when the state of a sensor signal received through the control unit changes. The start module activated by the start event as the first functional module can be, for example, a service interface function block configured as a responder function block according to IEC 61499.
[0019] The termination module is defined by the last functional module in the event chain. After the termination module is executed, no activation signals are generated for other functional modules used to execute the control program. For example, a termination module may be a functional module designed to output output signals for the actuator through an external output interface of the execution environment. For example, a termination module may be a service interface function block configured as a requester function block according to IEC 61499.
[0020] The activation of the starting module of an event chain can be triggered, for example, by an input signal, such as a sensor signal. The event chain can include, for example, all activation events, which are generated sequentially by receiving input signals, until an output signal based on the input signal is output through an output interface.
[0021] The detection of activation events and the execution of the functional modules associated with each activation event, in an execution order determined by priority, can be performed, for example, through an execution environment running on the controller. For execution through the execution environment, the control program can be stored in the controller's memory module.
[0022] An execution environment may include multiple sub-environments that can be executed separately from each other, wherein each sub-environment is configured to execute on separate execution resources of the controller. Execution resources may be, for example, tasks, processors, etc. For example, execution resources may be resources defined in IEC 61499.
[0023] Priorities are assigned to individual activation events, for example, during the creation of the control program, using a programming environment configured to create the control program. Priorities can be assigned to activation events in such a way that priorities are assigned to event connections between functional modules. Here, the event connections link functional modules to previously executed functional modules, each associated with a single activation event and executed when the activation event occurs, the activation event being generated during the execution of the previously executed functional module. The priorities associated with each activation event can be stored in the control program and used by the execution environment when executing the control program.
[0024] The execution order is determined by the priority of each activation event, specifying the order in which functional modules are executed when multiple activation events occur simultaneously. In this sense, priority dictates the order in which concurrent activation events are processed. For example, a newly occurring activation event may be processed before all previously occurring lower-priority activation events and after all previously occurring higher-priority activation events.
[0025] In addition to priority, a predetermined processing strategy can be used to handle activation events. Such a strategy could be, for example, FIFO (first-in-first-out), LIFO (last-in-first-out), depth-first, or breadth-first. The processing strategy can, for example, determine the order in which activation events of the same priority are processed.
[0026] An execution environment may manage at least one process list to determine the execution order and includes a list management module for this purpose. This process list may also be referred to as an event queue. The execution environment may manage at least one, for example, exactly one process list for each execution resource.
[0027] The execution environment can be configured for event-triggered scheduling. It can also be configured to distribute the available computing power of the programmable logic controller (PLC) according to predefined criteria, such as evenly distributing it across the functional modules of the control program (fair scheduling). To this end, the execution environment can implement periodic timing control. For example, it can periodically query all instances of the functional modules for any unoccurred activation events (cyclic scan approach) and process these unoccurred activation events according to a predefined order.
[0028] The control program can include time-critical and time-non-critical functional modules. Time-critical functional modules can be connected into time-critical event chains via time-critical event connections, and time-non-critical functional modules can be connected into time-non-critical event chains via time-non-critical event connections. Activation events of time-critical event chains can then be assigned higher priority than activation events of time-non-critical event chains.
[0029] A time-critical event chain can, for example, generate a time-critical output signal after reading a time-critical input signal. The time-critical input and / or output signals can be, for example, process-critical and / or machine-critical and / or safety-related and / or safety-oriented input signals. Here, for directly executing a controlled process, such as continuous machine movement, process-critical signals may be necessary. Machine-critical signals can be signals required for the machine's function. Safety-related or safety-oriented signals can be signals required to avoid machine damage and / or personal injury. A time-critical event chain can, for example, execute safety functions. However, a time-critical event chain can also execute responses to abnormal events that occur during the execution of the control program. Abnormal events can be, for example, faults, and the response can be a fault response. Abnormal events can also be alarms, and the response can be an alarm response.
[0030] The presented method is particularly useful for prioritizing the execution of time-critical parts of event-oriented control programs. Here, there is no need for a central service of the execution environment to manage the execution order of all functional modules of the control program. This enables prioritization of parts of the control program, even in execution environments distributed across multiple execution resources. Furthermore, prioritization eliminates the need for communication between all execution resources. This particularly allows for the abandonment of a central error handler during the execution of the control program.
[0031] Automation systems can, for example, automatically control machines or self-driving vehicles. Automation systems may include, for example, drives controlled by a control program. Additionally or alternatively, automation systems may also implement safety functions and are, in this regard, safety-oriented control systems.
[0032] In an improved version of the method, the control program has a common functional module whose execution can be triggered by first and second activation events, wherein different priorities are assigned to the first and second activation events. Here, the common functional module executes with the priority of the first activation event when triggered by the first activation event, and executes with the priority of the second activation event when triggered by the second activation event. This achieves a particularly flexible match between the execution order and the events that trigger the individual functional modules.
[0033] For example, the first activation event may be part of a time-critical event chain, and the second activation event may be part of a time-non-critical event chain, wherein the first activation event is assigned a higher priority than the second activation event. A third activation event for activating another functional module can be assigned a third priority, which is lower than the priority of the first activation event but higher than the priority of the second activation event. If a common functional module is now triggered by the first activation event, it is executed before the other functional modules; if the common functional module is triggered by the second activation event, it is executed after the other functional modules.
[0034] In one improved embodiment, the method includes recording the occurring activation events in at least one processing list, taking into account the priority of each activation event. This processing list enables particularly simple determination and monitoring of the processing order.
[0035] Here, the priority of each activation event can be determined, specifying where in the processing list a newly occurring activation event should be recorded. For example, a newly occurring activation event can be recorded in the processing list such that it is executed before all lower-priority activation events in the list and after all higher-priority activation events in the list.
[0036] The processing list can be managed using a pre-defined processing strategy. For example, the processing strategy could determine where a newly occurring activation event is placed relative to existing activation events of the same priority in the list.
[0037] To determine the location where a newly occurring activation event with a pre-defined priority is recorded in the processing list, the execution environment can manage multiple pointers, such as a pointer list, where each pointer includes a pointer for each possible priority. Here, each priority pointer represents a location in the processing list where a newly occurring activation event with the corresponding priority is to be recorded.
[0038] In an extension of the method, activation events of different priorities are recorded in different processing lists, and each processing list includes only activation events of the same priority. This enables efficient determination of specific resources for processing order because searching within a single processing list can be abandoned, and the location for registering newly occurring activation events of a pre-given priority can be determined in the search list.
[0039] If each possible priority manages its own processing list, the execution environment can be configured to determine the activation event to be processed next by checking the activation events present in each processing list in descending order, starting with the highest priority.
[0040] In one extension of the method, a functional module triggered by a newly detected activation event executes later than a functional module triggered by a previously detected activation event of the same priority. This corresponds to the execution order of activation events of the same priority according to the FIFO principle. Here, the available execution time is evenly distributed across all occurring activation events of the same priority, thereby ensuring that activation events of the same priority are processed as quickly and evenly as possible.
[0041] In an extended version of the method, a functional module triggered by a newly detected activation event executes earlier than a functional module triggered by a previously detected activation event of the same priority. This corresponds to the execution order of activation events of the same priority according to the LIFO principle. This allows for the complete processing of an ongoing event chain before starting to process another event chain. This enables particularly rapid execution of program portions executed through each event chain. Furthermore, the working memory and / or cache of the programmable logic controller can be used particularly efficiently because intermediate results generated during the processing of functional modules in an executing event chain are immediately reused.
[0042] In an extended embodiment of the method, the programmable logic controller has a first execution resource and a second execution resource connected to the first execution resource via a communication connection, and the control program includes a first subroutine executed on the first execution resource and a second subroutine executed on the second execution resource. Here, the method includes transmitting activation events occurring on the first execution resource from the first execution resource to the second execution resource via the communication connection, wherein the transmission is performed with a transmission priority determined according to the priority of each activation event.
[0043] This allows for prioritization not only within each execution resource but also across multiple geographically distributed execution resources. Transmission priorities can, for example, correspond to the priorities of individual activation events. A second execution resource can be configured to further process activation events received via the communication connection in an execution order determined by the priorities of the individual activation events.
[0044] The communication connection can be an internal communication connection within a sub-device of the programmable logic controller (PLC), where the internal communication connection connects multiple execution resources existing on the sub-device for executing control programs. The communication connection can also be an external communication connection between multiple sub-devices of the PLC, such as a fieldbus. Individual activation events can be transmitted over the communication connection, for example, using a fieldbus protocol. Alternatively or additionally, activation events can be transmitted using connectionless or connection-oriented transport protocols, such as UDP, TCP, etc. Individual activation events can be transmitted over the communication connection as individual data packets, where transmission priorities are assigned to each data packet for forwarding over the communication connection.
[0045] In an extended embodiment of the method, the sending order is determined based on the priority of each activation event, and the activation events are sent via a communication connection by a sending unit of the first execution resource using this sending order. For example, the execution environment can be configured to store each activation event in a sending queue of the sending unit according to its priority. Here, the activation events can be recorded in the sending queue in the same manner as described in the combined processing list.
[0046] The transmitting unit can, for example, establish a connection between a sub-device of a programmable logic controller and a communication connection. The transmitting unit can also be, for example, a transmitting unit for connecting a sub-device to a fieldbus module on a fieldbus.
[0047] Alternatively or additionally, the forwarding order for each activation event on the communication connection is determined based on the priority of each activation event. In particular, data packets containing each activation event can be forwarded via the communication connection, for example by intermediate devices arranged in the communication connection, such as routers or switches, according to the forwarding order.
[0048] Alternatively or additionally, the output order is determined according to the priority of each activation event. Using this output order, each activation event is output for further processing after it has been received by the receiving unit of the second execution resource via the communication connection. For example, the execution environment can be configured to prepare each activation event in the receiving queue of the receiving unit according to its priority for further processing by the second subroutine. Here, the activation events can be recorded in the receiving queue in the same manner as described in the processing list.
[0049] In an extension of the method, the priority of each activation event is assigned only during the execution of the control program, for example, taking into account parameter values generated during execution. This allows for a particularly flexible prioritization of each activation event. Each activation event can, for example, be assigned its priority as it is generated by the respective functional modules of the control program.
[0050] In an extended embodiment of the method, the activation event of a subsequently executed functional module is generated during the execution of a previously executed functional module. During its generation, the activation event of the subsequently executed functional module is assigned the priority of the activation events that have already triggered the execution of their respective previously executed functional modules. Thus, for example, the same priority can be automatically assigned to all activation events in the various event chains of the control program. Specifically, it is only necessary to assign priority to a single activation event among multiple successively generated activation events and, for example, store it in the control program. All other priorities are then dynamically generated during the execution time of the control program.
[0051] For each activation event in a series of activation events processed sequentially, its own priority can also be stored in the control program. The execution environment can then be configured to assign the priorities stored in the control program to each activation event, instead of the priorities of the functional modules that generate the relevant activation events.
[0052] In an extended embodiment of the method, the control program includes functional modules whose execution is triggered only upon the occurrence of a first activation event and at least one second activation event. The activation events generated by the functional modules are assigned priorities corresponding to the lowest priority of the activation event that triggered the execution of the functional module. This enables, and automatically assigns, explicit priorities to the thus generated activation events, while preventing unnecessarily high priorities from being assigned.
[0053] In an extension of the method, multiple subsequent activation events are generated based on the source event during the execution of the control program, and the programming environment used to create the control program automatically assigns the same priority to each of the multiple subsequent activation events. This makes assigning priority to each activation event particularly simple.
[0054] For example, a control program includes an event chain with activation events that are generated sequentially based on source events when the control program is executed, and the programming environment used to create the control program automatically assigns the same priority to multiple activation events in the event chain.
[0055] Subsequent activation events may include activation events of functional modules executed sequentially. Alternatively or additionally, subsequent activation events may also include activation events of functional modules executed in near-parallel fashion, such as multiple activation events created while executing a single functional module.
[0056] The source event can be, for example, the start event of an event chain. Generally, the source event can also be an external activation event.
[0057] The programming environment can be configured to automatically detect various event chains. To this end, the programming environment can identify, for example, all functional modules that execute in response to input signals up to the output signals generated by the programmable logic controller based on the input signals, or all functional modules that execute up to the state changes of the controller implemented based on the input signals. Here, if a single functional module includes multiple event inputs and / or multiple event outputs, the programming environment can create its own event chain for each possible combination of event inputs and event outputs.
[0058] Alternatively, in a functional module having multiple event inputs and / or event outputs, the internal connections between the event inputs and event outputs can be determined within the functional module, and an event chain can be created only for each activation of an event output in response to an activation event received at each event input when the functional module is executed. To determine the connections between the event inputs and event outputs, the programming environment can receive pre-given user input regarding the connections. The programming environment can also be configured to analyze the logical associations or algorithms executed separately through each event input when the functional module is activated, and to determine the event outputs activated in response to activation signals applied at each event input, thereby deriving the connections between the event inputs and event outputs.
[0059] The programming environment can be configured, for example, to automatically assign the priority of a single activation event to an event chain as well as to all subsequently generated and / or all previously generated activation events. For instance, the programming environment can be configured to perform automatic assignment only after receiving confirmation from the user via an input interface.
[0060] In one extension of the method, the priorities assigned to multiple activation events can be pre-defined by the user in the programming environment. This enables user-defined matching of priorities for event chains.
[0061] For example, when performing user-defined matching of the priorities of individual activation events in an event chain through a programming environment, all subsequent activation events in the event chain can be assigned the same priority. Alternatively or additionally, all preceding activation events in the event chain can also be assigned the same priority.
[0062] The programming environment can also be configured to display all identified event chains to the user and receive user input for each event chain, the user input determining the priority of the event chain. The priority can then be applied to each activation event of the event chain. Thus, for example, the priority of each output signal generated in response to an applied input signal can be determined separately.
[0063] In an extension of the method, the automatically assigned priorities can be matched by the user within a programming environment. For example, the programming environment can be configured to display to the user, via a user interface, all activation events whose priorities are automatically adjusted in response to user input, and to receive user input for matching the automatically assigned priorities via an input interface.
[0064] User input may include, for example, a matching value indicating the priority of an individual activation event within an activation event. Alternatively, user input may include deselecting individual activation events, thus preventing automatic matching of the priorities of the deselected activation events. In response to user input, the programming environment may automatically deselect a portion of the activation events in the event chain, such as all activation events after and / or before the activation event that received the user input, or assign the matching value as a priority.
[0065] In an extended embodiment of the method, each activation event is assigned a predetermined priority, wherein the predetermined priority is given in advance by predefined priorities of the event outputs or event inputs of templates used in creating the control program, such as templates used in creating functional modules or interface modules. This allows predefined values to be provided to the activation events generated or received by each program module, particularly the functional modules, of the control program.
[0066] When creating program modules from the template, predetermined priorities can be assigned to all active events transmitted via event outputs or event inputs. The template for a program module can, in particular, be a class definition of the relevant program module, from which instances of each program module are exported when the control program is created.
[0067] Furthermore, an execution environment is described for executing an event-oriented control program on a programmable logic controller (PLC) of an automation system, wherein the control program includes multiple functional modules. The execution environment is configured to trigger the execution of each functional module in an event-controlled manner upon the occurrence of an activation event associated with each functional module. Here, activation events are assigned priorities, and the execution environment is configured to detect occurring activation events and execute the functional modules associated with the occurring activation events in an execution order determined according to the priorities of each activation event.
[0068] The execution environment is specifically configured to perform the steps of the described method during the runtime of the control program. In this regard, all the technical effects and extensions described in conjunction with the described method also relate to the execution environment, and vice versa.
[0069] Furthermore, a programmable logic controller with a memory module is described, wherein the memory module stores the described execution environment for execution by the controller. The controller can provide multiple execution resources. Here, the execution resources can be arranged at least partially distributed across different sub-devices of the controller. The sub-devices can be connected to each other via communication connections, such as wireless and / or wired connections. The communication connection can be, for example, a fieldbus system. Each sub-device can include its own separately constructed memory module, and the memory module can store the sub-environment of the execution environment to be executed by the relevant sub-device.
[0070] Programmable logic controllers, especially their sub-devices, may have external input interfaces for connecting sensors and external output interfaces for connecting actuators, and may be configured to read sensor signals from the automation process through the external input interfaces and output output signals to the automation process through the output interfaces.
[0071] Furthermore, an automation system having such a programmable logic controller is described. The automation system, such as the programmable logic controller and / or the interface module connected to the programmable logic controller, may have an external input interface for connecting sensors and an external output interface for connecting actuators, and is configured to read sensor signals from the automation process via the external input interface and output output signals to the automation process via the output interface.
[0072] Furthermore, a non-volatile computer-readable medium is described, on which single or all steps of the described methods or instructions for implementing the execution environment are stored. The computer-readable medium may be configured as a physical medium, such as a CD or DVD, or as a data storage location accessible via a data connection, such as the Internet. The medium may be configured as an online software repository or a cloud data repository, for example. Attached Figure Description
[0073] The present invention will now be described with reference to the accompanying drawings. Here, schematic diagrams are provided respectively:
[0074] Figure 1 An automation system with a controller for executing event-driven control programs is shown;
[0075] Figure 2 The functional modules of the control program are shown;
[0076] Figure 3 The execution environment for executing control programs by the controller is shown;
[0077] Figure 4The first and second event chains of the control program are shown;
[0078] Figure 5 The priority of the activation event assignments for the first and second event chains is shown;
[0079] Figure 6 The list of processes at the first point in time, generated by performing environmental management in order to execute control procedures, is shown.
[0080] Figure 7 The processing list for a later second time point is shown;
[0081] Figure 8 The processing list for a later third time point is shown;
[0082] Figure 9 The replacement form of the processing list at the third time point is shown;
[0083] Figure 10 The replacement form of the processing list at the subsequent fourth time point is shown;
[0084] Figure 11 The replacement form of the processing list at the subsequent fifth time point is shown;
[0085] Figure 12 This illustrates another event chain of the control program;
[0086] Figure 13 The first and second sub-devices of the controller are shown, connected via a communication link; and
[0087] Figure 14 The method for executing the control program is shown. Detailed Implementation
[0088] Figure 1 An automated system is shown, exemplarily configured as a machine 1 for handling workpiece 195. Machine 1 includes a conveyor 186 and a gripper 181 on which workpiece 195 is conveyed, received by the gripper 181, and subsequently placed in another location. To move the gripper 181, machine 1 includes a lateral movement mechanism 182 driven by a first actuator 183 and a height movement mechanism 184 driven by a second actuator 185. The conveyor 186 is driven by a third actuator 187. Actuators 183, 185, and 187 are configured herein as electrically driven devices.
[0089] In addition to actuators 183, 185, and 187, machine 1 also includes a time-critical sensor 188 that measures the distance between gripper 181 and each workpiece 195 on conveyor 186, and another non-time-critical sensor 189. Sensor 189 is configured as a user interface and can be used to pre-determine characteristic data of workpiece 195.
[0090] Machine 1 also includes a programmable logic controller (PLC) 5, which is connected to actuators 183, 185, 187 and sensors 188, 189 via an external communication connection 60 configured as a fieldbus. The PLC 5 includes a first sub-device 310 and a second sub-device 320, which are separately connected to the communication connection 60. Through the communication connection 60, input signals are transmitted from sensors 188, 189 to the sub-devices 310, 320 of the controller 5, and output signals are transmitted from the sub-devices 310, 320 to actuators 183, 185, 187.
[0091] The controller 5 has an event-oriented control program 10, wherein a first subroutine 11 of the control program 10 is stored in the memory module of the first sub-device 310, and a second subroutine 12 of the control program 10 is stored in the memory module of the second sub-device 320. The control program 10 includes all instructions for reading sensor signals via the communication connection 60, generating output signals by means of logical associations of the read sensor signals, and outputting the output signals via the communication connection 60.
[0092] In order to execute the control program 10, the controller 5 includes an execution environment 100, which has a first sub-environment 101 executed on a first sub-device 310 and a second sub-environment 102 executed on a second sub-device 320. The sub-environments 101 and 102 of the execution environment 100 each include an execution module 120 for executing the control program 10.
[0093] When executing control program 10, it must be ensured that the actuators 183, 185 used to move the gripper 181 respond in a prioritized manner to the input signal read by the time-critical sensor 188 within a predetermined duration, the input signal indicating that the gripper 181 is approaching the workpiece 195. Otherwise, there is a risk that the gripper 181 will collide uncontrollably with the workpiece 195 and damage it. In this regard, the input signal provided by the time-critical sensor 188 is a time-critical input signal, and the response of the gripper 181 to the input signal read by the time-critical sensor 188 is a time-critical response of the control program.
[0094] Conversely, the parameters of workpiece 195 read by sensor 189 are used solely to optimally match the movement of gripper 181 to the inertia of workpiece 195. For this purpose, the read parameters are used to generate matching output signals for actuators 183 and 185 during the execution of control program 10. The generation of the matching output signals is a non-time-critical response of control program 10, not constrained by time requirements, and is therefore executed with lower priority as a response of gripper 181 to sensor signals from sensor 188.
[0095] Control program 10 executes according to standard IEC 61499 and includes multiple functional modules constructed as functional blocks according to IEC 61499. Figure 2 Two of these functional modules 20 are illustrated exemplarily. Each functional module 20 is interconnected via an event connection 80 and a data connection 82. Here, each event connection 80 connects the event output 86 of the preceding functional module 84 to the event input 87 of the following functional module 85. Each functional module 20 receives an activation event via the event input 87, which triggers the execution of the respective functional module 20. Each functional module 20 provides an activation event on its side via the event output 86, which causes the execution of the subsequent functional module 85. Data required for the execution of each functional module 20 is transmitted between the functional modules 20 via the data connection 82.
[0096] Figure 3 The implementation of execution environment 100 on sub-devices 310 and 320 of programmable logic controller 5 is shown. For executing control program 10, first sub-device 310 provides first execution resource 311 and second execution resource 312. Second sub-device 320 provides third execution resource 321 and fourth execution resource 322. First sub-environment 101 of execution environment 100 executes using first execution resource 311, and second sub-environment 102 executes using third execution resource 321. Correspondingly, additional sub-environment 104 of execution environment 100 is executed using second and fourth execution resources 312 and 322.
[0097] The control program 10 includes a first application 15, a second application 16, and a third application 17. Applications 15, 16, and 17 each include functional modules 20 interconnected via event connections and data connections. The first and second applications 15 and 16 each include a start module 21 and first and second termination modules 27 and 28 respectively connected to the start module 21 of their respective applications. The third application 17 includes only one termination module 27 connected to the start module 21. Here, each termination module 27 and 28 can be accessed via... Figure 3Additional functional modules 20, not shown, are connected to their respective start modules 21. Furthermore, each application 15, 16, and 17 may have more than one start module 21. The start modules 21 are service functional blocks constructed as transponder functional blocks according to IEC 61499.
[0098] When executing control program 10, starting from each start module 21, all functional modules 20 connected to each other via event connections are executed sequentially until each termination module 27, 28 is executed. The first application 15 is executed in a distributed manner in the first sub-environment 101 using the first execution resource 311 and in the second sub-environment 102 using the third execution resource 321. Here, the program portion executing the first termination module 27 is executed entirely in the first sub-environment 101, and the program portion executing the second termination module 28 is executed partly in the first sub-environment 101 and partly in the second sub-environment 102. The second application 16 is executed entirely in another sub-environment 104 using the second execution resource 312, and the third application 17 is distributed between the second sub-environment 102 and another sub-environment 104 using the fourth execution resource 322.
[0099] In the illustrated control program 10, the execution of the start module 21 is triggered accordingly by an external origin event 45, which includes the detection of sensor signal 132 by sensors 188 and 189. Sensor signal 132 is transmitted to sub-devices 310 and 320 of the controller 5 via communication connection 60 and is read by the interface module 130 of the execution environment 100 via an external input interface 131 connected to communication connection 60. Upon execution of termination modules 27 and 28, output signals 134 are generated for actuators 183, 185, and 187 of the machine 1, respectively. Output signals 134 are transmitted to actuators 183, 185, and 187 via the external output interface 133 of the interface module 130 and the communication connection 60 connected to the output interface 133.
[0100] If different execution resources 311, 312, 321, and 322 are used to execute successive functional modules 20, then the event connections and data connections between related functional modules 20 are executed through communication connections that interconnect execution resources 311, 312, 321, and 322. For example, if execution resources 311, 312, 321, and 322 are implemented on different sub-devices 310 and 320, then... Figure 1 The fieldbus 60 shown, or the internal bus system of each sub-device 310, 320, in the case where execution resources 311, 312, 321, 322 are implemented on the same sub-device 310, 320.
[0101] The programming environment for generating the control program 10 is configured to identify each event chain, wherein each event chain detects all activation events of the following functional modules 20, and executes these functional modules 20 sequentially in response to the input signal 132, until one of the termination modules 27 and 28 is executed. Here, each combination of the input signal 132 and one of the termination modules 27 and 28 executed based on the related input signal 132 forms its own event chain.
[0102] Figure 4 The first event chain 31 and the second event chain 32 of the control program 10 are shown. The first and second event chains 31 and 32 begin with the same start event 41, which is generated when the sensor signal 132 is read through the interface module 130. The start event 41 triggers the execution of the first functional module 51, which, as a responder function block, forms the start module 21 of not only the first event chain 31 and the second event chain 32.
[0103] During the execution of the first event chain 31, activation events 40 are subsequently generated sequentially for the execution of the second functional module 52, the third functional module 53, and the fourth functional module 54. The fourth functional module 54 forms the termination module 28 of the first event chain 31. It generates an output signal 134, which is output through the external output interface 133 of the execution environment 100.
[0104] When executing the second event chain 32, after executing the first functional module 51, an activation event 40 is generated for executing the second functional module 52 and the fifth functional module 55. The fifth functional module 55 forms the termination module 27 of the second event chain 32 and generates another output signal 134 for output via the external output interface 133 of the interface module 130.
[0105] In alternative implementations, for example, in addition to or as a replacement for the output of output signal 134, one or both of the termination modules 27 and 28 may change the internal state of the controller 5. Furthermore, one or more or all of the other functional modules 51, 52, and 53 may also generate output signal 134 or change the internal state of the controller 5.
[0106] Priorities are assigned to each activation event 40 in the first and second event chains 31 and 32, respectively, wherein the priorities are in the range of... Figure 5As shown in the diagram, an activation event 40 generated by the first functional module 51 for executing the second functional module 52 is assigned a first priority 201, which is also assigned to all other activation events 40 in the first event chain 31, namely, the activation events generated by the second functional module 52 for executing the third functional module 53 and the activation events generated by the third functional module 53 for executing the fourth functional module 54. A second priority 202 is assigned to the activation event generated during the execution of the second functional module 52 for executing the fifth functional module 55.
[0107] like Figure 5 As shown, the control program 10 also includes additional event chains 33, one of which includes sixth and seventh functional modules 56 and 57, and another of which includes eighth and ninth functional modules 58 and 59. The sixth functional module 56 generates an activation event with a third priority 203 for executing the seventh functional module 57, and the eighth functional module 58 generates an activation event with a first priority 201 for executing the ninth functional module 59.
[0108] The first, second, and third priorities 201, 202, and 203 form a descending priority order, resulting in the first priority being the highest and the third priority being the lowest. During the execution of control program 10, activation events generated by the first, sixth, and eighth functional modules 51, 56, and 58 exist at the same time; for example, they are provided sequentially within a relatively short timeframe compared to the execution duration of the functional modules, and detected by the execution environment 100. Additionally, two activation events generated by the second functional module 52 exist at a later point in time. For example, activation events generated by the second functional module 52 are also provided and detected substantially simultaneously.
[0109] Figure 6 A processing list 140 is shown at a first point in time after the detection of activation events generated by the first, sixth, and eighth functional modules 51, 56, and 58. The processing list is managed by a list management module (not shown) of the execution environment 100 for executing the control program 10. In the processing list 140, these activation events are arranged in descending order according to their priorities 201 and 203, from the highest priority (first priority 201) to the lowest priority (third priority 203).
[0110] Figure 7A processing list 140 is shown at a later second time point during the execution of the second functional module 52, the second functional module being executed first according to the execution order determined by the processing list 140. During the execution of the second functional module 52, the processing list 140 also includes an activation event for the execution of the ninth functional module 59 with a first priority 201.
[0111] Figure 8 A processing list 140 is shown at a third point in time, following the execution of the second functional module 52. During the execution of the second functional module 52, an activation event with a first priority 201 is generated to activate the third functional module 53, and an activation event with a second priority 202 is generated to activate the fifth functional module 55. After being detected by the execution environment 100, these two activation events are inserted into the processing list 140 based on their priorities 201 and 202.
[0112] Here, the activation event with second priority 202 for activating the fifth functional module 55 is inserted between the activation event with first priority 201 for activating the ninth functional module 59 and the activation event with third priority 203 for activating the seventh functional module 57. The position of the activation event with first priority 201 for activating the third functional module 53 is determined by the execution environment 100 according to the FIFO principle, thereby inserting the relevant activation event after the activation event with first priority 201 for executing the ninth functional module 59, which is already in the processing list 140, and before the activation events for activating the fifth and seventh functional modules 55 and 57 with second or third priorities 202, 203.
[0113] Figure 9 The diagram illustrates a processing list 140 at a third time point in an alternative design of execution environment 100, which applies the LIFO (Limited First-Order) principle instead of the FIFO (First-Order First-Order) principle when determining the location of the activation event for activating the third functional module 53. Here, the relevant activation event is also inserted into processing list 140 before the activation event of the same priority used to activate the ninth functional module 59.
[0114] Figure 10 The processing list 140 is shown during the execution of the third functional module 53, when the LIFO principle is applied at the next fourth time point. After the execution of the third functional module 53, the execution environment 100 detects an activation event with a first priority 201 for the execution of the fourth functional module 54. This is illustrated in the processing list shown at the next fifth time point. Figure 11As shown, the activation event is subsequently recorded in the processing list 140 before the activation event for executing the ninth functional module 59, which also has a first priority 201. Therefore, when applying the LIFO principle, all functional modules 51, 52, 53, and 54 of the first event chain 31 are executed first, before processing all other event chains 32 and 33, and especially before processing the activation event for executing the ninth functional module 59, which also has a first priority 201.
[0115] Figure 12 An additional event chain 33 of the control program 10 is shown. Event chain 33 includes two start modules 21, which are activated by two sensor signals 132 provided by interface module 130 as start events 41. The start modules 21 generate a first activation event 46 and a second activation event 47, which are sent to two event inputs of functional module 20 configured as merging module 23.
[0116] The merging module 23 is configured to execute only when the first and second activation events 46 and 47 occur. The merging module generates a subsequent activation event 48 for activating another functional module 20, which is the terminating module 27 of the event chain 33. The programming environment used when creating the control program 10 is configured to automatically assign a priority to the subsequent activation event 48 based on the priority of the first and second activation events 46 and 47 used to activate the merging module 23. Here, the lowest priority of the first and second activation events 46 and 47 is assigned to the subsequent activation event 48. If, for example, the first activation event 46 has a second priority 202 and the second activation event 47 has a third priority 203, then the third priority 203 is automatically assigned to the subsequent activation event 48.
[0117] Figure 13 A first sub-device 310 and a second sub-device 320 of the programmable logic controller 5 of machine 1 are shown, which are interconnected via a communication connection 60 and an intermediate device 307 configured as a router. Sub-environments 101 and 102 of execution environment 100, which execute on sub-devices 310 and 320, are configured to transmit, via the communication connection 60 and the intermediate device 307, activation events generated on the first sub-device 310 for activating functional modules executing on the second sub-device 320.
[0118] The first sub-device 310 includes a sending unit 330 that sends activation events stored in a sending queue 332 to a router 307 via a communication connection 60 in an order determined by their position in the sending queue 332. A sub-environment 101 of the execution environment 100, executing on the first sub-device 310, stores each activation event in the sending queue 332 such that the sending order of each activation event is determined by its priority, and the activation events are sent sequentially in descending priority. Similarly, the router 307 is configured to forward each activation event sequentially to the second sub-device 320 in descending priority.
[0119] The second sub-device 320 has a receiving unit 335 that stores activation events received via communication connection 60 in a receiving queue 337. Here, the position of each activation event in the receiving queue 337 is determined according to its priority, wherein each activation event is stored in the receiving queue 337 in descending order of priority. A sub-environment 102 of the execution environment 100, executing on the second sub-device 320, is configured to process activation events in descending order of priority according to their position in the receiving queue 337.
[0120] Figure 14 A method 400 executed via an execution environment 100 for executing a control program 10 is shown. The method 400 includes: detecting an activation event 40 that occurs at 410; recording the detected activation event 40 into a processing list 140 at 415; executing functional modules 20 respectively assigned to the activation events 40 according to a pre-given execution order in the processing list 140 at 420; and transmitting the activation events 40 generated during the execution of functional modules 20 at 420 via a communication connection 60 at 425.
[0121] List of reference numerals
[0122] 1 machine
[0123] 5 Programmable Logic Controllers
[0124] 10 Control Procedures
[0125] 11 First Subroutine
[0126] 12 Second Subroutine
[0127] 15 First Application
[0128] 16 Second Application
[0129] 17 Third Application
[0130] 20 functional modules
[0131] 21 Start Module
[0132] 23 Merge Module
[0133] 27 First Termination Module
[0134] 28 Second Termination Module
[0135] 31 First Event Chain
[0136] 32 Second Event Chain
[0137] 33. Other event chains
[0138] 40 Activation Events
[0139] 41. Start of the event
[0140] 46 First Activation Event
[0141] 47 Second Activation Event
[0142] 48 Subsequent activation events
[0143] 51 First Functional Module
[0144] 52 Second Functional Module
[0145] 53 Third Functional Module
[0146] 54 Fourth Functional Module
[0147] 55 Fifth Functional Module
[0148] 60 External Communication Connections
[0149] 80 Event Connections
[0150] 82 Data Connection
[0151] Functional modules before 84
[0152] Subsequent functional modules of 85
[0153] 86 event output end
[0154] 87 event input terminal
[0155] 100 execution environment
[0156] 101 First Sub-environment
[0157] 102 Second Sub-environment
[0158] 104 Other sub-environments
[0159] 120 Execution Module
[0160] 130 interface module
[0161] 131 External Input Interface
[0162] 132 input signal
[0163] 133 external output interface
[0164] 134 output signal
[0165] 140 processing list
[0166] 181 clamp
[0167] 182 Lateral motion mechanism
[0168] 183 First Actuator
[0169] 184 height motion mechanism
[0170] 185 Second Actuator
[0171] 186 Conveyor
[0172] 187 Third Actuator
[0173] 188 Time-Critical Sensors
[0174] 189 sensor
[0175] 195 workpieces
[0176] 201 First Priority
[0177] 202 Second Priority
[0178] 203 Third Priority
[0179] 307 Intermediate Equipment
[0180] 310 First Sub-device
[0181] 311 First Execution Resource
[0182] 312 Second Execution Resource
[0183] 320 Second Sub-device
[0184] 321 Third Execution Resource
[0185] 322 Fourth Execution Resource
[0186] 330 Transmitting Unit
[0187] 332 Send Queue
[0188] 335 receiver unit
[0189] 337 Receive Queue
[0190] 400 methods
[0191] 410 Activation event detected
[0192] 415 was recorded in the processing list.
[0193] 420 Execution Function Module
[0194] 425 transmission
Claims
1. A method (400) for executing an event-oriented control program (10) on a programmable logic controller (5) of an automation system (1). in, The control program (10) includes multiple functional modules (20). Specifically, when activation events (40, 41, 46, 47, 48) associated with each functional module (20) occur, the execution of each functional module (20) is triggered in an event-controlled manner. The functional modules (20) to be executed sequentially by the control program (10) are designed to generate activation events (40, 41, 46, 47, 48) during their execution. These activation events trigger the execution of the functional modules (20) to be executed directly by the control program (10) subsequently. The activation events (40, 41, 46, 47, 48) are each assigned a priority. The method (400) includes the following steps: - Detect activation events (40, 41, 46, 47, 48) that occur in (410). - Execute (420) the functional modules (20) associated with the activation events (40, 41, 46, 47, 48) respectively, according to the execution order determined by the priority of each activation event (40, 41, 46, 47, 48).
2. The method (400) according to claim 1. in, The control program (10) has a common functional module (20), the execution of which can be triggered by first and second activation events (40, 41, 46, 47, 48). The first and second activation events (40, 41, 46, 47, 48) are assigned different priorities. The common functional module (20) is executed with the priority of the first activation event (40, 41, 46, 47, 48) when triggered by the first activation event (40, 41, 46, 47, 48), and with the priority of the second activation event (40, 41, 46, 47, 48) when triggered by the second activation event (40, 41, 46, 47, 48).
3. The method (400) according to claim 1 or 2, wherein the method comprises: Taking into account the priority of each activation event (40, 41, 46, 47, 48), the activation events (40, 41, 46, 47, 48) that occur are recorded (415) into at least one processing list (140).
4. The method (400) according to claim 3. in, Activation events of different priorities (40, 41, 46, 47, 48) are recorded in different processing lists (140), and each processing list (140) includes only activation events of the same priority (40, 41, 46, 47, 48).
5. The method (400) according to claim 1 or 2. in, The function module (20) triggered by the newly detected activation events (40, 41, 46, 47, 48) is executed later than the function module (20) triggered by previously detected activation events (40, 41, 46, 47, 48) of the same priority.
6. The method (400) according to claim 1 or 2. in, The function module (20) triggered by the newly detected activation events (40, 41, 46, 47, 48) is executed earlier than the function module (20) triggered by previously detected activation events (40, 41, 46, 47, 48) of the same priority.
7. The method (400) according to claim 1 or 2. in, The programmable logic controller (5) has a first execution resource (311, 312, 321, 322) and a second execution resource (311, 312, 321, 322) connected to the first execution resource (311, 312, 321, 322) via a communication connection (60). The control program (10) includes a first subroutine (11, 12) executed on the first execution resources (311, 312, 321, 322) and a second subroutine (11, 12) executed on the second execution resources (311, 312, 321, 322). The method (400) includes: transmitting (425) activation events (40, 41, 46, 47, 48) occurring on the first execution resources (311, 312, 321, 322) from the first execution resources (311, 312, 321, 322) to the second execution resources (311, 312, 321, 322) via the communication connection (60). The transmission (425) is performed with a transmission priority determined according to the priority of each activation event (40, 41, 46, 47, 48).
8. The method (400) according to claim 7. in, The sending order is determined according to the priority of each activation event (40, 41, 46, 47, 48), and the sending unit (330) of the first execution resource (311, 312, 321, 322) sends each activation event (40, 41, 46, 47, 48) via the communication connection (60) in the sending order, and / or The forwarding order is determined according to the priority of each activation event (40, 41, 46, 47, 48), and the activation events (40, 41, 46, 47, 48) are forwarded via the communication connection (60) in the forwarding order, and / or The output order is determined according to the priority of each activation event (40, 41, 46, 47, 48). After the receiving unit (335) of the second execution resource (311, 312, 321, 322) receives each activation event (40, 41, 46, 47, 48) via the communication connection (60), the activation events (40, 41, 46, 47, 48) are output in the output order for further processing.
9. The method (400) according to claim 1 or 2. in, For example, taking into account the parameter values generated during the execution time of the control program (10), the priority of each activation event (40, 41, 46, 47, 48) is assigned only during the execution time.
10. The method (400) according to claim 9. in, Activation events (40, 41, 46, 47, 48) of the function module (20) to be executed are generated when the previously executed function module (20) is executed. When an activation event (40, 41, 46, 47, 48) of a function module (20) to be executed is generated, the activation events (40, 41, 46, 47, 48) of the function module (20) to be executed are assigned the following priorities (40, 41, 46, 47, 48), which trigger the execution of the previously executed function module (20) accordingly.
11. The method (400) according to claim 1 or 2. in, The control program (10) includes functional modules (20, 23), the execution of which is triggered only upon the occurrence of a first and at least one second activation event (40, 41, 46, 47, 48). The activation events (40, 41, 46, 47, 48) generated by the functional modules (20, 23) are assigned the following priorities, which correspond to the lowest priority of the activation events (40, 41, 46, 47, 48) that trigger the execution of the functional modules (20, 23).
12. The method (400) according to claim 1 or 2. in, When the control procedure (10) is executed, a number of subsequent activation events (40, 41, 46, 47, 48) are generated based on the source events (40, 41, 46, 47, 48). For example, the control program (10) includes an event chain (31, 32, 33) having activation events (40, 41, 46, 47, 48) generated sequentially based on the source events (40, 41, 46, 47, 48) when the control program (10) is executed. The programming environment used to create the control program (10) automatically assigns the same priority to the plurality of subsequent activation events (40, 41, 46, 47, 48), such as the plurality of activation events (40, 41, 46, 47, 48) of the event chain (31, 32, 33).
13. The method (400) according to claim 12. in, The priority assigned to the plurality of activation events (40, 41, 46, 47, 48) can be pre-defined by the user of the programming environment, and / or The priority of automatic allocation can be adjusted by the user within the programming environment.
14. The method (400) according to claim 1 or 2. in, Assign a predetermined priority to each activation event (40, 41, 46, 47, 48). The predetermined priority is given in advance by the predefined priority of the event output terminal (86) or event input terminal (87) of the template of the program module used when creating the control program (10), such as the template of the functional module (20) used when creating the control program (10).
15. An execution environment (100) for executing an event-oriented control program (10) on a programmable logic controller (5) of an automation system (1). in, The control program (10) includes multiple functional modules (20). The execution environment (100) is configured to trigger the execution of each functional module (20) in an event-controlled manner when activation events (40, 41, 46, 47, 48) associated with each functional module (20) occur. The functional modules (20) to be executed sequentially by the control program (10) are designed to generate activation events (40, 41, 46, 47, 48) during their execution. These activation events trigger the execution of the functional modules (20) to be executed directly by the control program (10) subsequently. The activation events (40, 41, 46, 47, 48) are each assigned a priority. The execution environment (100) is configured to detect the occurrence of activation events (40, 41, 46, 47, 48) and execute the functional modules (20) associated with the occurrence of activation events (40, 41, 46, 47, 48) in an execution order determined according to the priority of each activation event (40, 41, 46, 47, 48).
Citation Information
Patent Citations
Method for operating an industrial control system and industrial control system
CN104049577A