DE102021112165A1 - Memory comparisons of a programmable logic controller - Google Patents

Memory comparisons of a programmable logic controller Download PDF

Info

Publication number
DE102021112165A1
DE102021112165A1 DE102021112165.5A DE102021112165A DE102021112165A1 DE 102021112165 A1 DE102021112165 A1 DE 102021112165A1 DE 102021112165 A DE102021112165 A DE 102021112165A DE 102021112165 A1 DE102021112165 A1 DE 102021112165A1
Authority
DE
Germany
Prior art keywords
memory
programmable logic
variable identifiers
logic controller
values
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
DE102021112165.5A
Other languages
German (de)
Inventor
Bernhard Werner
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Codesys Holding GmbH
Original Assignee
Codesys Holding GmbH
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Codesys Holding GmbH filed Critical Codesys Holding GmbH
Priority to DE102021112165.5A priority Critical patent/DE102021112165A1/en
Publication of DE102021112165A1 publication Critical patent/DE102021112165A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0736Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in functional embedded systems, i.e. in a data processing system designed as a combination of hardware and software dedicated to performing a certain function
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0766Error or fault reporting or storing
    • G06F11/0778Dumping, i.e. gathering error/state information after a fault for later diagnosis
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • G05B19/056Programming the PLC

Abstract

Ein Verfahren zum Speichervergleichen einer speicherprogrammierbaren Steuerungseinheit umfasst ein Erzeugen eines ersten Speicherabzugs eines Speichers der speicherprogrammierbaren Steuerungseinheit, wobei der erste Speicherabzug einem ersten Zustand der speicherprogrammierbaren Steuerungseinheit zu einem ersten Zeitpunkt entspricht, wobei der erste Speicherabzug eine erste Mehrzahl von Variablenidentifikatoren eines Steuerungsprojekts für die speicherprogrammierbaren Steuerungseinheit und zu jedem der ersten Mehrzahl von Variablenidentifikatoren einen zugeordneten ersten Wert umfasst, wobei zu jedem der ersten Mehrzahl von Variablenidentifikatoren in dem Speicher eine Speicherposition statisch alloziert ist. Zudem umfasst das Verfahren ein Erzeugen eines zweiten Speicherabzugs des Speichers der speicherprogrammierbaren Steuerungseinheit, wobei der zweite Speicherabzug einem zweiten Zustand der speicherprogrammierbaren Steuerungseinheit zu einem zweiten Zeitpunkt entspricht, wobei sich der zweite Zeitpunkt von dem ersten Zeitpunkt unterscheidet, wobei der zweite Speicherabzug eine zweite Mehrzahl von Variablenidentifikatoren des Steuerungsprojekts und zu jedem der zweiten Mehrzahl von Variablenidentifikatoren einen zugeordneten zweiten Wert umfasst, wobei zu jedem der zweiten Mehrzahl von Variablenidentifikatoren in dem Speicher eine Speicherposition statisch alloziert ist. Das Verfahren umfasst auch ein Vergleichen der zweiten Werte mit den ersten Werten.A method for memory comparisons of a programmable logic controller includes generating a first memory dump of a memory of the programmable logic controller, the first memory dump corresponding to a first state of the programmable logic controller at a first point in time, the first memory dump having a first plurality of variable identifiers of a control project for the programmable logic controller and each of the first plurality of variable identifiers has an associated first value, wherein each of the first plurality of variable identifiers has a memory location statically allocated in the memory. In addition, the method includes generating a second memory dump of the memory of the programmable logic controller, the second memory dump corresponding to a second state of the programmable logic controller at a second point in time, the second point in time differing from the first point in time, the second memory dump having a second plurality of variable identifiers of the control project and a second value associated with each of the second plurality of variable identifiers, wherein each of the second plurality of variable identifiers in the memory is statically allocated a memory location. The method also includes comparing the second values to the first values.

Description

Technisches Gebiettechnical field

Die Offenbarung bezieht sich auf speicherprogrammierbare Steuerungen (SPS) zur Steuerung von Maschinen und Anlagen, insbesondere auf Techniken zum Speichervergleichen einer speicherprogrammierbaren Steuerung durch Erzeugen eines ersten Speicherabzugs und eines zweiten Speicherabzugs zu unterschiedlichen Zeitpunkten.The disclosure relates to programmable logic controllers (PLCs) for controlling machines and systems, in particular to techniques for memory comparisons of a programmable logic controller by generating a first memory dump and a second memory dump at different points in time.

Hintergrundbackground

Industrielle Steuerungsumgebungen sind in der modernen Fertigung allgegenwärtig und umfassen typischerweise mindestens eine speicherprogrammierbare Steuerungseinheit (SPS), auf der ein Steuerungsprogramm läuft, das zur Steuerung einer zugehörigen Maschine oder Anlage und/oder zum Austausch von Anweisungen und Daten mit der zugehörigen Maschine oder Anlage geeignet ist. Das Steuerungsprogramm, das auf der speicherprogrammierbaren Steuerungseinheit läuft, kann die Form von Kontaktplananweisungen (auch als Leiterlogik bezeichnet) oder eines kompilierten Maschinencodes haben. Es wird häufig aus Quellcode generiert, der in einer höheren Programmiersprache, z. B. einer objektorientierten Programmiersprache, geschrieben wurde. Der Quellcode kann vom Benutzer in einer Programmierumgebung geschrieben werden, die sich räumlich entfernt von der speicherprogrammierbaren Steuerungseinheit befindet und über ein Netzwerk, wie z. B. das Internet oder ein dediziertes industrielles Steuerungsnetzwerk, mit der speicherprogrammierbaren Steuerungseinheit verbunden sein kann.Industrial control environments are ubiquitous in modern manufacturing and typically include at least one programmable logic controller (PLC) unit running a control program suitable for controlling an associated machine or facility and/or exchanging instructions and data with the associated machine or facility . The control program running on the programmable logic controller may take the form of ladder logic (also known as ladder logic) instructions or compiled machine code. It is often generated from source code written in a high-level programming language, e.g. B. an object-oriented programming language. The source code can be written by the user in a programming environment that is physically remote from the programmable logic controller and is accessible over a network such as a computer. B. the Internet or a dedicated industrial control network, can be connected to the programmable logic controller.

Wenn eine speicherprogrammierbare Steuerungseinheit in einen unerwarteten Zustand gerät, beispielsweise in eine Exception, dann ist es im Stand der Technik üblich, einen Speicherabzug der Daten von der speicherprogrammierbaren Steuerungseinheit zu speichern (sog. „Coredump“). Ein solcher Speicherabzug kann durch die Firmware der speicherprogrammierbaren Steuerungseinheit, durch den Benutzer oder durch die Applikation selbst ausgelöst werden und entweder auf der speicherprogrammierbaren Steuerungseinheit oder etwa auf dem Programmier-PC der Programmierumgebung abgespeichert werden.If a programmable logic controller gets into an unexpected state, for example an exception, then it is customary in the prior art to store a memory dump of the data from the programmable logic controller (so-called “coredump”). Such a memory dump can be triggered by the firmware of the programmable logic control unit, by the user or by the application itself and can be stored either on the programmable logic control unit or on the programming PC of the programming environment.

Neben dem reinen Datenspeicher können auch weitere Informationen in den Speicherabzug gespeichert werden, zum Beispiel der aktuelle Stack, der aktuelle Program Counter, Log-Informationen oder Trace-Buffer, d.h. gespeicherte historische Daten von Variablen.In addition to the pure data memory, other information can also be saved in the memory dump, for example the current stack, the current program counter, log information or trace buffer, i.e. saved historical data of variables.

Zur Interpretation kann ein solcher Speicherabzug üblicherweise in einem Programmiersystem zum Quellprojekt geladen werden. Die Variablenwerte werden dann aus dem Speicherabzug geladen und im Programmiersystem so dargestellt, als ob der Programmierer online mit der speicherprogrammierbaren Steuerungseinheit verbunden wäre.Such a memory dump can usually be loaded into a programming system for the source project for interpretation. The variable values are then loaded from the memory dump and presented in the programming system as if the programmer were connected online to the programmable logic controller.

Häufig ist es in der Praxis trotzdem sehr schwierig, die aus dem Speicherabzug gewonnenen Daten korrekt zu interpretieren. Denn ein großes Projekt kann leicht mehrere Megabyte Daten enthalten, und es ist dann selbst für einen Fachmann eine Herausforderung, diejenigen Daten zu identifizieren, die ursächlich für einen bestimmten (Fehler-) Zustand auf der speicherprogrammierbaren Steuerungseinheit sind.In practice, however, it is often very difficult to correctly interpret the data obtained from the memory dump. Because a large project can easily contain several megabytes of data, and it is then a challenge even for a specialist to identify the data that is the cause of a specific (error) status on the programmable logic controller.

Aus dem Stand der Technik vorbekannte sog. Memory Profiling Tools, wie beispielsweise dotMemory von Jetbrains, oder der integrierte Debugger von Microsoft Visual Studio, bieten dem Nutzer die Möglichkeit, Heap-Dumps zu erzeugen und zu vergleichen. Dabei geht es vornehmlich darum, den Speicherverbrauch einer Anwendung zu messen. Der Nutzer kann damit feststellen, wie viele Objekte einer bestimmten Klasse zu einem bestimmten Zeitpunkt existieren. Typischerweise verwendet der Nutzer solche Programme, um herauszubekommen, welche Objekte besonders häufig sind und/oder welche Objekte besonders groß sind.So-called memory profiling tools known from the prior art, such as dotMemory from Jetbrains, or the integrated debugger from Microsoft Visual Studio, offer the user the option of generating and comparing heap dumps. The main purpose is to measure the memory consumption of an application. The user can use it to determine how many objects of a certain class exist at a certain point in time. Typically, the user uses such programs to find out which objects are particularly common and/or which objects are particularly large.

Zusammenfassungsummary

Vor dem Hintergrund des Stands der Technik liegt die Aufgabe der vorliegenden Offenbarung darin, verbesserte Techniken zur Analyse eines Speichers einer speicherprogrammierbaren Steuerung bereitzustellen.Against the background of the prior art, the object of the present disclosure is to provide improved techniques for analyzing a memory of a programmable logic controller.

Diese Aufgabe wird durch ein Verfahren zum Speichervergleichen einer speicherprogrammierbaren Steuerung gemäß Anspruch 1 und durch eine Vorrichtung zum Speichervergleichen einer speicherprogrammierbaren Steuerung gemäß Anspruch 10 gelöst. Die abhängigen Ansprüche beziehen sich auf vorteilhafte Weiterbildungen.This object is achieved by a method for memory comparison of a programmable logic controller according to claim 1 and by a device for memory comparison of a memory program miscible control according to claim 10 solved. The dependent claims relate to advantageous developments.

In einem ersten Aspekt bezieht sich die Offenbarung auf ein Verfahren zum Speichervergleichen einer speicherprogrammierbaren Steuerungseinheit. Das Verfahren umfasst ein Erzeugen eines ersten Speicherabzugs eines Speichers der speicherprogrammierbaren Steuerungseinheit, wobei der erste Speicherabzug einem ersten Zustand der speicherprogrammierbaren Steuerungseinheit zu einem ersten Zeitpunkt entspricht, wobei der erste Speicherabzug eine erste Mehrzahl von Variablenidentifikatoren eines Steuerungsprojekts für die speicherprogrammierbaren Steuerungseinheit und zu jedem der ersten Mehrzahl von Variablenidentifikatoren einen zugeordneten ersten Wert umfasst, wobei zu jedem der ersten Mehrzahl von Variablenidentifikatoren in dem Speicher eine Speicherposition statisch alloziert ist. Zudem umfasst das Verfahren ein Erzeugen eines zweiten Speicherabzugs des Speichers der speicherprogrammierbaren Steuerungseinheit, wobei der zweite Speicherabzug einem zweiten Zustand der speicherprogrammierbaren Steuerungseinheit zu einem zweiten Zeitpunkt entspricht, wobei sich der zweite Zeitpunkt von dem ersten Zeitpunkt unterscheidet, wobei der zweite Speicherabzug eine zweite Mehrzahl von Variablenidentifikatoren des Steuerungsprojekts und zu jedem der zweiten Mehrzahl von Variablenidentifikatoren einen zugeordneten zweiten Wert umfasst, wobei zu jedem der zweiten Mehrzahl von Variablenidentifikatoren in dem Speicher eine Speicherposition statisch alloziert ist. Das Verfahren umfasst auch ein Vergleichen der zweiten Werte mit den ersten Werten.In a first aspect, the disclosure relates to a method for memory comparison of a programmable logic controller. The method includes generating a first memory dump of a memory of the programmable logic controller, the first memory dump corresponding to a first state of the programmable logic controller at a first point in time, the first memory dump having a first plurality of variable identifiers of a control project for the programmable logic controller and for each of the first said plurality of variable identifiers having an associated first value, each of said first plurality of variable identifiers having a memory location statically allocated in said memory. In addition, the method includes generating a second memory dump of the memory of the programmable logic controller, the second memory dump corresponding to a second state of the programmable logic controller at a second point in time, the second point in time differing from the first point in time, the second memory dump having a second plurality of variable identifiers of the control project and a second value associated with each of the second plurality of variable identifiers, wherein each of the second plurality of variable identifiers in the memory is statically allocated a memory location. The method also includes comparing the second values to the first values.

Das erfindungsgemäße Verfahren erlaubt es auf einfache und robuste Weise, eine Differenz zwischen Speicherabzügen eines Speichers der speicherprogrammierbaren Steuerungseinheit zu bilden. Dadurch kann der Nutzer den Unterschied zwischen zwei Projektzuständen des Steuerungsprojekts ermitteln. Beispielsweise erlaubt das Verfahren das Vergleichen eines fehlerhaften Zustands mit einem Referenzzustand, welcher einen unproblematischen Zustand der speicherprogrammierbaren Steuerung darstellt, oder das Vergleichen eines Zustands der speicherprogrammierbaren Steuerung nach einer Änderung oder Aktion mit einem Referenzzustand vor der entsprechenden Änderung oder Aktion.The method according to the invention makes it possible in a simple and robust manner to form a difference between memory dumps of a memory of the programmable logic control unit. This allows the user to determine the difference between two project states of the control project. For example, the method allows a faulty state to be compared with a reference state, which represents an unproblematic state of the programmable logic controller, or a state of the programmable logic controller after a change or action can be compared with a reference state before the corresponding change or action.

Ein solches Verfahren kann auch für Tests verwendet werden, um - gegebenenfalls auch automatisiert - die Auswirkungen eines Programmteils eines Steuerungsprojekts zu prüfen und zu verifizieren, ob das Programmteil nur die erwarteten Daten modifiziert. Besonders hilfreich kann ein solcher Vergleich sein, wenn über einen Pointer oder über einen Indexzugriff in ein Array unerwartete Speicherstellen modifiziert werden. Dem Nutzer werden auf diese Weise verbesserte Techniken zur Analyse eines Speichers einer speicherprogrammierbaren Steuerung an die Hand gegeben.Such a method can also be used for tests in order—possibly also automatically—to check the effects of a program part of a control project and to verify whether the program part only modifies the expected data. Such a comparison can be particularly helpful if unexpected memory locations are modified via a pointer or via an index access in an array. In this way, the user is provided with improved techniques for analyzing a memory of a programmable logic controller.

Ein Steuerungsprojekt im Sinne der Offenbarung kann insbesondere ein Steuerungsprogramm für die speicherprogrammierbare Steuerungseinheit, insbesondere in Form von Quellcode oder in Form eines kompilierten Codes, umfassen. Das Steuerungsprojekt kann auch einen Funktionsblock und/oder eine Funktion und/oder globale Variablen und/oder lokale Variablen umfassen.A control project within the meaning of the disclosure can in particular include a control program for the programmable logic control unit, in particular in the form of source code or in the form of a compiled code. The control project can also include a function block and/or a function and/or global variables and/or local variables.

Ein Variablenidentifikator im Sinne der Offenbarung kann jedweder Identifikator oder jedwede Kennung sein, die dazu geeignet sind, eine Variable des Steuerungsprojekts, insbesondere eine Variable eines Steuerungsprogramms des Steuerungsprojekts, zu bezeichnen oder zu identifizieren.A variable identifier within the meaning of the disclosure can be any identifier or any identifier that is suitable for designating or identifying a variable of the control project, in particular a variable of a control program of the control project.

Gemäß einer Ausführungsform sind oder entsprechen die erste Mehrzahl von Variablenidentifikatoren und/oder die zweite Mehrzahl von Variablenidentifikatoren Variablen des Steuerungsprojekts für die speicherprogrammierbare Steuerungseinheit, insbesondere Variablen eines Steuerungsprogramms und/oder eines Funktionsblocks und/oder einer Funktion für die speicherprogrammierbare Steuerungseinheit.According to one embodiment, the first plurality of variable identifiers and/or the second plurality of variable identifiers are or correspond to variables of the control project for the programmable logic controller, in particular variables of a control program and/or a function block and/or a function for the programmable logic controller.

Gemäß einer Ausführungsform sind die erste Mehrzahl von Variablenidentifikatoren und/oder die zweite Mehrzahl von Variablenidentifikatoren Instanzpfade von Variablen des Steuerungsprojekts oder entsprechen Instanzpfaden von Variablen des Steuerungsprojekts.According to an embodiment, the first plurality of variable identifiers and/or the second plurality of variable identifiers are instance paths of variables of the control project or correspond to instance paths of variables of the control project.

Bei den Variablen des Steuerungsprojekts kann es sich in Ausführungsformen der Offenbarung um programminterne Variablen eines Steuerungsprogramms für die speicherprogrammierbare Steuerungseinheit und/oder um Prozessparameter, die einem von der speicherprogrammierbaren Steuerungseinheit gesteuerten industriellen Prozess oder einer von der speicherprogrammierbaren Steuerung gesteuerten Anlage zugeordnet sind, handeln. Die Variablen können beliebige Werte annehmen, beispielsweise Integer-Werte oder Real-Werte oder Wahrheitswerte.In embodiments of the disclosure, the variables of the control project can be program-internal variables of a control program for the programmable logic controller and/or process parameters that are assigned to an industrial process controlled by the programmable logic controller or to a system controlled by the programmable logic controller. The variables can take on any values, for example integer values or real values or truth values.

Gemäß einer Ausführungsform ist die speicherprogrammierbare Steuerungseinheit mit einer gesteuerten Anlage kommunikativ koppelbar oder gekoppelt und dazu eingerichtet, in Abhängigkeit von einem Steuerungsprojekt, insbesondere in Abhängigkeit von einem Steuerungsprogramm des Steuerungsprojekts, Steuerungsbefehle an die gesteuerte Anlage zu übermitteln und/oder von der gesteuerten Anlage Parameter, welche einem Zustand der gesteuerten Anlage entsprechen, bspw. Prozessparameter, zu empfangen.According to one embodiment, the programmable logic control unit can be communicatively coupled to a controlled system or is coupled and is set up to transmit control commands to the controlled system as a function of a control project, in particular as a function of a control program of the control project, and/or to transmit parameters from the controlled system, which correspond to a state of the controlled system, e.g. process parameters.

Die erste Mehrzahl von Variablenidentifikatoren und/oder die zweite Mehrzahl von Variablenidentifikatoren kann in einer Ausführungsform zumindest teilweise einem Zustand der gesteuerten Anlage oder den Parametern entsprechen.In one embodiment, the first plurality of variable identifiers and/or the second plurality of variable identifiers may at least partially correspond to a state of the controlled plant or the parameters.

Als Zustand der speicherprogrammierbaren Steuerungseinheit kann in einigen Ausführungsformen die Gesamtheit der prozessinternen und/oder externen Parameter bezeichnet werden, die die speicherprogrammierbare Steuerungseinheit und/oder die mit der speicherprogrammierbaren Steuerungseinheit gekoppelte Anlage zu einem definierten Zeitpunkt kennzeichnen.In some embodiments, the entirety of the process-internal and/or external parameters that characterize the programmable logic control unit and/or the system coupled to the programmable logic control unit at a defined point in time can be referred to as the state of the programmable logic control unit.

Gemäß einer Ausführungsform liegt der zweite Zeitpunkt nach dem ersten Zeitpunkt.According to one embodiment, the second point in time is after the first point in time.

Die offenbarungsgemäße Lösung erlaubt auf diese Weise eine Darstellung einer zeitlichen Entwicklung des Speichers der speicherprogrammierbaren Steuerungseinheit.In this way, the solution according to the disclosure allows a representation of a development over time of the memory of the programmable logic control unit.

In einer Ausführungsform kann die zweite Mehrzahl von Variablenidentifikatoren der ersten Mehrzahl von Variablenidentifikatoren entsprechen oder eine Teilmenge der ersten Mehrzahl von Variablenidentifikatoren umfassen oder sein.In one embodiment, the second plurality of variable identifiers may correspond to the first plurality of variable identifiers or may include or be a subset of the first plurality of variable identifiers.

Der Nutzer kann daran ablesen, wie sich einzelne, gegebenenfalls nach vorbestimmten Kriterien ausgewählte, Variablenidentifikatoren ändern oder entwickeln.The user can read from this how individual variable identifiers, possibly selected according to predetermined criteria, change or develop.

Bei dem Speicher kann es sich im Sinne der vorliegenden Offenbarung um jedwedes Speicherelement handeln, welches dazu eingerichtet ist, die der ersten Mehrzahl von Variablenidentifikatoren und der zweiten Mehrzahl von Variablenidentifikatoren zugeordneten Werte vorübergehend oder dauerhaft zu speichern.Within the meaning of the present disclosure, the memory can be any memory element which is set up to temporarily or permanently store the values assigned to the first plurality of variable identifiers and the second plurality of variable identifiers.

Der Speicher kann insbesondere einen globalen Speicher und/oder einen Stapelspeicher umfassen.The memory can in particular comprise a global memory and/or a stack memory.

Der Speicher kann in einigen Ausführungsformen in die speicherprogrammierbare Steuerungseinheit integriert sein. In anderen Ausführungsformen kann der Speicher in einer separaten Speichereinheit lokalisiert sein, welche mit der speicherprogrammierbaren Steuerungseinheit kommunikativ gekoppelt, aber räumlich von ihr getrennt angeordnet ist, beispielsweise in einer Programmierumgebung für die speicherprogrammierbare Steuerungseinheit oder einer externen Speicherbank lokalisiert ist.The memory may be integrated into the programmable logic controller in some embodiments. In other embodiments, the memory may be located in a separate memory unit that is communicatively coupled to the programmable logic controller but is physically separated from it, for example, located in a programming environment for the programmable logic controller or an external memory bank.

In dem Kontext der vorliegenden Offenbarung kann unter einer statisch allozierten Speicherposition in einigen Ausführungsformen eine Speicherposition der Variablenidentifikatoren in dem Speicher verstanden werden, die innerhalb des Steuerungsprojekts zeitlich konstant bleibt, also sich bspw. während eines Ablaufenlassens eines Steuerungsprogramms des Steuerungsprojekts nicht ändert. Beispielsweise können entsprechende Speicherplätze in dem Speicher bei einem Kompilieren des Steuerungsprojekts von einem Compiler fest vergeben werden.In the context of the present disclosure, a statically allocated memory position can be understood in some embodiments as a memory position of the variable identifiers in the memory that remains constant over time within the control project, i.e. does not change, for example, while a control program of the control project is running. For example, corresponding storage locations in the memory can be permanently assigned by a compiler when the control project is compiled.

Ein Speicherabzug im Sinne der vorliegenden Offenbarung kann einen aus dem Speicher ausgelesenen Satz von Daten bezeichnen. Der Speicherabzug kann dabei Rohdaten und/oder nachbearbeitete Daten umfassen.A core dump, as used herein, may refer to a set of data read from memory. The memory dump can include raw data and/or post-processed data.

Insbesondere kann das Erzeugen des ersten Speicherabzugs und/oder das Erzeugen des zweiten Speicherabzugs ein Nachbearbeiten von aus dem Speicher ausgelesenen Daten umfassen.In particular, the generation of the first memory dump and/or the generation of the second memory dump can include post-processing of data read from the memory.

Das Vergleichen der zweiten Werte mit den ersten Werten kann ein Erzeugen einer Differenzliste umfassen.Comparing the second values to the first values may include generating a difference list.

Die Differenzliste kann diejenigen Variablenidentifikatoren umfassen, bei denen der zweite Wert sich von dem ersten Wert unterscheidet, und die entsprechenden ersten und zweiten Werte und/oder eine Differenz zwischen den entsprechenden ersten und zweiten Werten umfassen.The difference list may include those variable identifiers for which the second value differs from the first value and the corresponding first and second values and/or a difference between the corresponding first and second values.

Das Verfahren kann auch ein Ausgeben der Differenzliste umfassen.The method can also include outputting the difference list.

In einer Ausführungsform umfasst das Verfahren ein Anzeigen eines Ergebnisses des Vergleichens der zweiten Werte mit den ersten Werten, insbesondere auf einer Sichtanzeige.In an embodiment, the method includes displaying a result of the comparison of the second values with the first values, in particular on a visual display.

Dem Nutzer wird dadurch ein schnelles Überprüfen von Abweichungen der gespeicherten Daten ermöglicht.This enables the user to quickly check deviations in the stored data.

Insbesondere kann in einigen Ausführungsformen das Anzeigen des Ergebnisses des Vergleichens auf Variablenidentifikatoren beschränkt werden, bei denen sich der zweite Wert von dem ersten Wert unterscheidet.In particular, in some embodiments, displaying the result of the comparison may be limited to variable identifiers where the second value differs from the first value.

Das Ergebnis kann auf einer Sichtanzeige der speicherprogrammierbaren Steuerung und/oder auf einer Sichtanzeige einer Programmierumgebung und/oder einer davon räumlich getrennten Sichtanzeige angezeigt werden.The result can be displayed on a visual display of the programmable logic controller and/or on a visual display of a programming environment and/or a visual display spatially separate therefrom.

Gemäß einer Ausführungsform umfasst das Erzeugen des ersten Speicherabzugs ein Bestimmen der ersten Mehrzahl von Variablenidentifikatoren.According to one embodiment, generating the first memory dump includes determining the first plurality of variable identifiers.

Das Erzeugen des ersten Speicherabzug kann auch ein Bestimmen der der ersten Mehrzahl von Variablenidentifikatoren in dem Speicher zugeordneten Speicherpositionen umfassen. Generating the first dump may also include determining the memory locations associated with the first plurality of variable identifiers in memory.

Ferner kann das Erzeugen des ersten Speicherabzugs auch ein Auslesen der Werte der ersten Mehrzahl von Variablenidentifikatoren an den der ersten Mehrzahl von Variablenidentifikatoren in dem Speicher zugeordneten Speicherpositionen umfassen.Furthermore, generating the first memory dump can also include reading out the values of the first plurality of variable identifiers at the memory positions associated with the first plurality of variable identifiers in the memory.

Das Erzeugen des ersten Speicherabzugs kann in einigen Ausführungsformen auch ein Nachbearbeiten der Werte der ersten Mehrzahl von Variablenidentifikatoren umfassen.Generating the first dump may also include post-processing the values of the first plurality of variable identifiers in some embodiments.

In einer Ausführungsform umfasst das Bestimmen der ersten Mehrzahl von Variablenidentifikatoren ein Auswählen einer ersten Mehrzahl von Variablen des Steuerungsprojekts, insbesondere ein Auswählen einer ersten Mehrzahl von Variablen aus einem Programmcode eines Steuerungsprogramms für die speicherprogrammierbare Steuerungseinheit.In one embodiment, determining the first plurality of variable identifiers includes selecting a first plurality of variables of the control project, in particular selecting a first plurality of variables from a program code of a control program for the programmable logic controller.

Das Bestimmen der ersten Mehrzahl von Variablenidentifikatoren kann in einigen Ausführungsformen ein Erstellen von Instanzpfaden umfassen, die einer ersten Mehrzahl von Variablen des Steuerungsprojekts zugeordnet sind.In some embodiments, determining the first plurality of variable identifiers may include creating instance paths associated with a first plurality of variables of the controller project.

In einer Ausführungsform erfolgt das Bestimmen der der ersten Mehrzahl von Variablenidentifikatoren in dem Speicher zugeordneten Speicherpositionen mittels einer Zuordnungstabelle, insbesondere mittels einer bei einem Kompilieren des Steuerungsprojekts erstellten Zuordnungstabelle.In one embodiment, the memory positions assigned to the first plurality of variable identifiers in the memory are determined by means of an assignment table, in particular by means of an assignment table created when the control project is compiled.

Die offenbarungsgemäße Lösung ermöglicht auf diese Weise eine einfache und schnelle Zuordnung zwischen den Variablenidentifikatoren und ihren Speicherpositionen in dem Speicher.In this way, the solution according to the disclosure enables a simple and rapid association between the variable identifiers and their storage positions in the memory.

Die Zuordnungstabelle kann die erste Mehrzahl von Variablenidentifikatoren bzw. Instanzpfade und der ersten Mehrzahl von Variablenidentifikatoren bzw. Instanzpfaden zugeordnete Speicherpositionen oder Speicher-Offsets umfassen, insbesondere der ersten Mehrzahl von Variablenidentifikatoren bzw. Instanzpfaden eineindeutig zugeordnete Speicherpositionen oder Speicher-Offsets umfassen.The assignment table can include the first plurality of variable identifiers or instance paths and memory positions or memory offsets assigned to the first plurality of variable identifiers or instance paths, in particular memory positions or memory offsets uniquely assigned to the first plurality of variable identifiers or instance paths.

Entsprechend kann das Erzeugen des zweiten Speicherabzugs ein Bestimmen der zweiten Mehrzahl von Variablenidentifikatoren umfassen.Accordingly, generating the second snapshot may include determining the second plurality of variable identifiers.

Das Erzeugen des zweiten Speicherabzugs kann auch ein Bestimmen der der zweiten Mehrzahl von Variablenidentifikatoren in dem Speicher zugeordneten Speicherpositionen umfassen.Generating the second dump may also include determining the memory locations associated with the second plurality of variable identifiers in memory.

Gemäß einer Ausführungsform kann das Erzeugen des zweiten Speicherabzugs auch ein Auslesen der Werte der zweiten Mehrzahl von Variablenidentifikatoren an den der zweiten Mehrzahl von Variablenidentifikatoren in dem Speicher zugeordneten Speicherpositionen umfassen.According to one embodiment, generating the second memory dump can also include reading out the values of the second plurality of variable identifiers at the memory positions associated with the second plurality of variable identifiers in the memory.

Das Erzeugen des zweiten Speicherabzugs kann in einigen Ausführungsformen auch ein Nachbearbeiten der Werte der zweiten Mehrzahl von Variablenidentifikatoren umfassen.Generating the second dump may also include post-processing the values of the second plurality of variable identifiers in some embodiments.

Das Bestimmen der zweiten Mehrzahl von Variablenidentifikatoren kann ein Auswählen einer zweiten Mehrzahl von Variablen des Steuerungsprojekts umfassen, insbesondere ein Auswählen einer zweiten Mehrzahl von Variablen aus einem Programmcode eines Steuerungsprogramms für die speicherprogrammierbare Steuerungseinheit umfassen.The determination of the second plurality of variable identifiers can include a selection of a second plurality of variables of the control project, in particular a selection of a second plurality of variables from a program code of a control program for the programmable logic controller.

Das Bestimmen der zweiten Mehrzahl von Variablenidentifikatoren kann ein Erstellen von Instanzpfaden umfassen, die einer zweiten Mehrzahl von Variablen des Steuerungsprojekts zugeordnet sind.Determining the second plurality of variable identifiers may include creating instance paths associated with a second plurality of variables of the controller project.

Gemäß einer Ausführungsform kann das Bestimmen der der zweiten Mehrzahl von Variablenidentifikatoren in dem Speicher zugeordneten Speicherpositionen mittels einer Zuordnungstabelle erfolgen, insbesondere mittels einer bei einem Kompilieren des Steuerungsprojekts erstellten Zuordnungstabelle.According to one embodiment, the memory positions assigned to the second plurality of variable identifiers in the memory can be determined by means of an assignment table, in particular by means of an assignment table created when the control project is compiled.

Die Zuordnungstabelle kann die zweite Mehrzahl von Variablenidentifikatoren bzw. Instanzpfade und der zweiten Mehrzahl von Variablenidentifikatoren bzw. Instanzpfaden zugeordnete Speicherpositionen oder Speicher-Offsets umfassen, insbesondere der zweiten Mehrzahl von Variablenidentifikatoren bzw. Instanzpfaden eineindeutig zugeordnete Speicherpositionen oder Speicher-Offsets umfassen.The assignment table can include the second plurality of variable identifiers or instance paths and memory positions or memory offsets assigned to the second plurality of variable identifiers or instance paths, in particular memory positions or memory offsets uniquely assigned to the second plurality of variable identifiers or instance paths.

Das Verfahren kann in einer Ausführungsform ein Ablaufenlassen eines Steuerungsprogramms des Steuerungsprojekts auf der speicherprogrammierbaren Steuerungseinheit zwischen dem ersten Zeitpunkt und dem zweiten Zeitpunkt umfassen.In one embodiment, the method can include running a control program of the control project on the programmable logic controller between the first point in time and the second point in time.

Die offenbarungsgemäße Lösung ermöglicht auf diese Weise ein Überwachen von Änderungen der Variablen beim Ablaufen des Steuerungsprogramms und/oder der mit der speicherprogrammierbaren Steuerungseinheit gekoppelten gesteuerten Anlage.In this way, the solution according to the disclosure makes it possible to monitor changes in the variables when the control program and/or the controlled system coupled to the programmable logic controller are running.

Auf einer speicherprogrammierbaren Steuerung können Änderungen eines Steuerungsprojekts, insbesondere Änderungen eines Steuerungsprogramms des Steuerungsprojekts, gegebenenfalls auch zur Laufzeit durchgeführt werden. Die offenbarungsgemäße Lösung kann in diesem Kontext auch ein Vergleichen eines Zustands vor einer Projektänderung mit einem Zustand nach einer Projektänderung ermöglichen.Changes to a control project, in particular changes to a control program of the control project, can optionally also be carried out at runtime on a programmable logic controller. In this context, the solution according to the disclosure can also make it possible to compare a status before a project change with a status after a project change.

Gemäß einer Ausführungsform umfasst das Verfahren ein Modifizieren des Steuerungsprojekts, insbesondere eines Steuerungsprogramms des Steuerungsprojekts, um ein modifiziertes Steuerungsprojekts für die speicherprogrammierbare Steuerungseinheit zu erhalten, zwischen dem ersten Zeitpunkt und dem zweiten Zeitpunkt.According to one embodiment, the method includes modifying the control project, in particular a control program of the control project, in order to obtain a modified control project for the programmable logic control unit between the first point in time and the second point in time.

Das Verfahren kann ferner ein Ablaufenlassen eines Steuerungsprogramms des Steuerungsprojekts auf der speicherprogrammierbaren Steuerungseinheit vor dem ersten Zeitpunkt und/oder ein Ablaufenlassen eines modifizierten Steuerungsprogramms des Steuerungsprojekts auf der speicherprogrammierbaren Steuerungseinheit zwischen dem ersten Zeitpunkt und dem zweiten Zeitpunkt umfassen.The method may further comprise running a control program of the control project on the programmable logic controller before the first time and/or running a modified control program of the control project on the programmable logic controller between the first time and the second time.

Insbesondere kann die erste Mehrzahl von Variablenidentifikatoren dem Steuerungsprojekt entsprechen und die zweite Mehrzahl von Variablenidentifikatoren dem modifizierten Steuerungsprojekt entsprechen.In particular, the first plurality of variable identifiers may correspond to the controller project and the second plurality of variable identifiers may correspond to the modified controller project.

Das Vergleichen der zweiten Werte mit den ersten Werten kann in einigen Ausführungsformen auch automatisiert erfolgen, beispielsweise in routinemäßigen Tests zur Überprüfung von Auswirkungen eines Programmteils des Steuerungsprojekts.In some embodiments, the second values can also be compared to the first values in an automated manner, for example in routine tests to check the effects of a program part of the control project.

Gemäß einer Ausführungsform können daher der erste Zeitpunkt und/oder der zweite Zeitpunkt automatisiert bestimmt werden.According to one embodiment, the first point in time and/or the second point in time can therefore be determined automatically.

Vorangehend wurde das offenbarungsgemäße Verfahren zum Speichervergleichen unter Bezugnahme auf den Vergleich zwischen nur zwei Zeitpunkten beschrieben. Die Offenbarung ist jedoch nicht darauf beschränkt, sondern kann ein fortgesetztes Vergleichen der Zustände der speicherprogrammierbaren Steuerungseinheit über eine beliebige Mehrzahl von aufeinanderfolgenden Zeitpunkten umfassen. Auf diese Weise können beispielsweise Zeitreihenanalysen oder statistische Analysen durchgeführt werden, um die Entwicklung des Zustands der speicherprogrammierbaren Steuerungseinheit über einen längeren Zeitraum oder unter unterschiedlichen Betriebsbedingungen zu verfolgen und gegebenenfalls aufzuzeichnen.The method according to the disclosure for memory comparison was described above with reference to the comparison between only two points in time. However, the revelation is not limited thereto, but may comprise a continued comparison of the states of the programmable logic controller over any plurality of consecutive points in time. In this way, time series analyzes or statistical analyzes can be carried out, for example, in order to track and possibly record the development of the state of the stored-program control unit over a longer period of time or under different operating conditions.

In einer Ausführungsform umfasst das Verfahren daher ein Erzeugen eines dritten Speicherabzugs sowie gegebenenfalls weiterer nachfolgender Speicherabzüge des Speichers der speicherprogrammierbaren Steuerungseinheit, wobei der dritte Speicherabzug einem dritten Zustand der speicherprogrammierbaren Steuerungseinheit zu einem dritten Zeitpunkt entspricht, der sich von dem ersten Zeitpunkt und dem zweiten Zeitpunkt unterscheidet, insbesondere nach dem ersten Zeitpunkt und dem zweiten Zeitpunkt liegt, wobei der dritte Speicherabzug eine dritte Mehrzahl von Variablenidentifikatoren des Steuerungsprojekts und zu jedem der dritten Mehrzahl von Variablenidentifikatoren einen zugeordneten dritten Wert umfasst, wobei zu jedem der dritten Mehrzahl von Variablenidentifikatoren in dem Speicher eine Speicherposition statisch alloziert ist.
Die Ausführungsform kann auch ein Vergleichen der dritten Werte mit den ersten Werten und/oder den zweiten Werten, beispielsweise in Form entsprechender Differenzlisten, umfassen.
In one embodiment, the method therefore includes generating a third memory dump and possibly further subsequent memory dumps of the memory of the programmable logic controller, the third memory dump corresponding to a third state of the programmable logic controller at a third point in time, which differs from the first point in time and the second point in time , in particular after the first point in time and the second point in time, the third memory dump comprising a third plurality of variable identifiers of the control project and an associated third value for each of the third plurality of variable identifiers, with a storage position for each of the third plurality of variable identifiers in the memory is statically allocated.
The embodiment can also include a comparison of the third values with the first values and/or the second values, for example in the form of corresponding difference lists.

In der Durchführung eines Speichervergleichs über eine fortgesetzte Mehrzahl aufeinanderfolgender Zeitpunkte liegt ein unabhängiger Aspekt der vorliegenden Offenbarung.Performing a memory comparison over a continued plurality of consecutive points in time is an independent aspect of the present disclosure.

In einem zweiten Aspekt bezieht sich die Offenbarung daher auf ein Verfahren zum Speichervergleichen einer speicherprogrammierbaren Steuerungseinheit, umfassend ein Erzeugen einer Mehrzahl von Speicherabzügen eines Speichers der speicherprogrammierbaren Steuerungseinheit zu aufeinanderfolgenden Zeitpunkten, wobei jeder Speicherabzug einem entsprechenden Zustand der speicherprogrammierbaren Steuerungseinheit zu dem entsprechenden Zeitpunkt entspricht, wobei jeder Speicherabzug eine Mehrzahl von Variablenidentifikatoren eines Steuerungsprojekts für die speicherprogrammierbare Steuerungseinheit und zu jedem der Mehrzahl von Variablenidentifikatoren einen zugeordneten Wert umfasst, wobei zu jedem der Variablenidentifikatoren in dem Speicher eine Speicherposition statisch alloziert ist. Das Verfahren umfasst auch ein Vergleichen der den aufeinanderfolgenden Zeitpunkten entsprechenden Werte miteinander und/oder mit vorbestimmten Referenzwerten.In a second aspect, the disclosure therefore relates to a method for memory comparisons of a programmable logic controller, comprising generating a plurality of memory dumps of a memory of the programmable logic controller at successive points in time, each memory dump corresponding to a corresponding state of the programmable logic controller at the corresponding point in time, wherein each memory snapshot comprises a plurality of variable identifiers of a control project for the programmable logic controller and a value assigned to each of the plurality of variable identifiers, wherein a memory location in the memory is statically allocated to each of the variable identifiers. The method also includes comparing the values corresponding to the successive points in time with one another and/or with predetermined reference values.

Bei den vorbestimmten Referenzwerten kann es sich beispielsweise um Soll-Werte handeln, die einem Normalzustand oder fehlerfreien Zustand der speicherprogrammierbaren Steuerungseinheit bzw. der mit der speicherprogrammierbaren Steuerungseinheit gekoppelten gesteuerten Anlage entsprechen.The predetermined reference values can be target values, for example, which correspond to a normal state or an error-free state of the programmable logic control unit or of the controlled system coupled to the programmable logic control unit.

Die Mehrzahl von Speicherabzügen kann jede beliebige Anzahl von Speicherabzügen umfassen, insbesondere mindestens zwei Speicherabzüge oder mindestens drei Speicherabzügen.The plurality of memory dumps can include any number of memory dumps, in particular at least two memory dumps or at least three memory dumps.

In einer Ausführungsform umfasst das Verfahren ein Ablaufenlassen eines Steuerungsprogramms des Steuerungsprojekts auf der speicherprogrammierbaren Steuerungseinheit jeweils zwischen zwei aufeinanderfolgenden Zeitpunkten.In one embodiment, the method includes allowing a control program of the control project to run on the programmable logic controller between two consecutive points in time.

Das Vergleichen der den aufeinanderfolgenden Zeitpunkten entsprechenden Werte kann in einer Ausführungsform eine statistische Analyse der Werte umfassen, insbesondere eine Zeitreihenanalyse.In one embodiment, the comparison of the values corresponding to the successive points in time can comprise a statistical analysis of the values, in particular a time series analysis.

Das Verfahren kann dazu in einer Ausführungsform auch ein (selbsttätiges) Vergleichen von zu unterschiedlichen Zeitpunkten erzeugten Differenzlisten umfassen.In one embodiment, the method can also include an (automatic) comparison of difference lists generated at different points in time.

Jede der Differenzlisten kann dabei beispielsweise einem Vergleich des Zustands der speicherprogrammierbaren Steuerungseinheit oder einer von der speicherprogrammierbaren Steuerungseinheit gesteuerten Anlage zu einem festgesetzten Zeitpunkt mit einem Referenzzustand entsprechen.Each of the difference lists can, for example, correspond to a comparison of the state of the programmable logic control unit or of a system controlled by the programmable logic control unit at a fixed point in time with a reference state.

In einem dritten Aspekt bezieht sich die Offenbarung auf ein Rechnerprogramm oder ein Rechnerprogramm-Produkt mit rechnerlesbaren Instruktionen, wobei die rechnerlesbaren Instruktionen dazu eingerichtet sind, beim Ausführen in einem Rechner, insbesondere in einem mit einer speicherprogrammierbaren Steuerungseinheit gekoppelten Rechner, ein Verfahren mit einem oder allen der vorangehend beschriebenen Merkmale auszuführen.In a third aspect, the disclosure relates to a computer program or a computer program product with computer-readable instructions, the computer-readable instructions being set up to, when executed in a computer, in particular in a computer coupled to a programmable logic controller, a method with one or all of the features described above.

In einem vierten Aspekt bezieht sich die Offenbarung auf eine Vorrichtung zum Speichervergleichen einer speicherprogrammierbaren Steuerungseinheit. Die Vorrichtung umfasst eine Ausleseeinheit, welche dazu eingerichtet ist, auf einen Speicher einer speicherprogrammierbaren Steuerungseinheit zuzugreifen und zu einem ersten Zeitpunkt einen ersten Speicherabzug und zu einem zweiten Zeitpunkt, der sich von dem ersten Zeitpunkt unterscheidet, einen zweiten Speicherabzug des Speichers der speicherprogrammierbaren Steuerungseinheit zu erzeugen. Der erste Speicherabzug entspricht dabei einem ersten Zustand der speicherprogrammierbaren Steuerungseinheit zu dem ersten Zeitpunkt, wobei der erste Speicherabzug eine erste Mehrzahl von Variablenidentifikatoren eines Steuerungsprojekts für die speicherprogrammierbare Steuerungseinheit und zu jedem der ersten Mehrzahl von Variablenidentifikatoren einen zugeordneten ersten Wert umfasst. Der zweite Speicherabzug entspricht dementsprechend einem zweiten Zustand der speicherprogrammierbaren Steuerungseinheit zu dem zweiten Zeitpunkt, wobei der zweite Speicherabzug eine zweite Mehrzahl von Variablenidentifikatoren des Steuerungsprojekts und zu jedem der zweiten Mehrzahl von Variablenidentifikatoren einen zugeordneten zweiten Wert umfasst. Zu jedem der ersten Mehrzahl von Variablenidentifikatoren und der zweiten Mehrzahl von Variablenidentifikatoren ist in dem Speicher eine Speicherposition statisch alloziert. Die Vorrichtung umfasst auch eine Vergleichseinheit, welche zum Vergleichen der zweiten Werte mit den ersten Werten eingerichtet ist.In a fourth aspect, the disclosure relates to an apparatus for memory comparison of a programmable logic controller. The device comprises a readout unit which is set up to access a memory of a programmable logic control unit and to generate a first memory dump at a first point in time and a second memory dump of the memory of the programmable logic control unit at a second point in time, which differs from the first point in time. The first memory dump corresponds to a first state of the programmable logic controller at the first point in time, the first memory dump comprising a first plurality of variable identifiers of a control project for the programmable logic controller and an assigned first value for each of the first plurality of variable identifiers. The second memory dump accordingly corresponds to a second state of the programmable logic controller at the second point in time, the second memory dump comprising a second plurality of variable identifiers of the control project and a second value assigned to each of the second plurality of variable identifiers. Each of the first plurality of variable identifiers and the second plurality of variable identifiers has a memory location statically allocated in memory. The device also includes a comparison unit, which is set up to compare the second values with the first values.

Die offenbarungsgemäße Vorrichtung gemäß dem vierten Aspekt kann zum Ausführen eines Verfahrens mit einem oder allen der Merkmale, wie sie vorangehend unter Bezugnahme auf den ersten und zweiten Aspekt beschrieben wurden, eingerichtet sein.The device according to the disclosure according to the fourth aspect can be configured to carry out a method with one or all of the features as described above with reference to the first and second aspects.

In einer Ausführungsform sind die Ausleseeinheit und die Vergleichseinheit als separate, räumlich und/oder funktional getrennte Einheiten ausgebildet. In anderen Ausführungsformen können die Ausleseeinheit und die Vergleichseinheit als eine integrierte Einheit ausgebildet sein.In one embodiment, the readout unit and the comparison unit are designed as separate, spatially and/or functionally separate units. In other embodiments, the readout unit and the comparison unit can be designed as an integrated unit.

Gemäß einer Ausführungsform können die Ausleseeinheit und/oder die Vergleichseinheit in die speicherprogrammierbare Steuerungseinheit integriert sein. In anderen Ausführungsformen können die Ausleseeinheit und/oder die Vergleichseinheit in eine Programmiereinheit, welche mit der speicherprogrammierbaren Steuerungseinheit kommunikativ gekoppelt ist, integriert sein.According to one embodiment, the readout unit and/or the comparison unit can be integrated into the programmable logic control unit. In other embodiments, the readout unit and/or the comparison unit can be integrated into a programming unit which is communicatively coupled to the programmable logic controller.

In einer Ausführungsform umfasst die Vorrichtung eine Anzeigeeinheit, welche zum Anzeigen eines Ergebnisses des Vergleichens der zweiten Werte mit den ersten Werten eingerichtet ist.In one embodiment, the device comprises a display unit which is set up to display a result of the comparison of the second values with the first values.

Die Anzeigeeinheit kann in einer Ausführungsform räumlich und/oder funktional von der Ausleseeinheit und/oder der Vergleichseinheit getrennt sein. In anderen Ausführungsformen kann die Anzeigeeinheit dagegen in die Ausleseeinheit und/oder die Vergleichseinheit integriert sein.In one embodiment, the display unit can be separated spatially and/or functionally from the readout unit and/or the comparison unit. In other embodiments, however, the display unit can be integrated into the readout unit and/or the comparison unit.

Gemäß einer Ausführungsform ist die Anzeigeeinheit in die speicherprogrammierbare Steuerungseinheit integriert. In anderen Ausführungsformen kann die Anzeigeeinheit in eine Programmiereinheit, welche mit der speicherprogrammierbaren Steuerungseinheit kommunikativ gekoppelt ist, integriert sein.According to one embodiment, the display unit is integrated into the programmable logic control unit. In other embodiments, the display unit can be integrated into a programming unit, which is communicatively coupled to the programmable logic controller.

Die Ausleseeinheit und/oder die Vergleichseinheit und/oder die Anzeigeeinheit kann in einer Ausführungsform als Hardware ausgebildet sein. In einer anderen Ausführungsformen kann die Ausleseeinheit und/oder die Vergleichseinheit und/oder die Anzeigeeinheit zumindest teilweise als Software oder Firmware ausgebildet sein.In one embodiment, the readout unit and/or the comparison unit and/or the display unit can be embodied as hardware. In another embodiment, the readout unit and/or the comparison unit and/or the display unit can be designed at least partially as software or firmware.

Gemäß einer Ausführungsform ist die Ausleseeinheit eingerichtet zum Bestimmen der ersten Mehrzahl von Variablenidentifikatoren und/oder zum Bestimmen der der ersten Mehrzahl von Variablenidentifikatoren in dem Speicher zugeordneten Speicherpositionen und/oder zum Auslesen der Werte der ersten Mehrzahl von Variablenidentifikatoren an den der ersten Mehrzahl von Variablenidentifikatoren in dem Speicher zugeordneten Speicherpositionen.According to one embodiment, the readout unit is set up to determine the first plurality of variable identifiers and/or to determine the memory positions associated with the first plurality of variable identifiers in the memory and/or to read out the values of the first plurality of variable identifiers at the first plurality of variable identifiers in memory locations associated with the memory.

In einer Weiterbildung kann das Bestimmen der ersten Mehrzahl von Variablenidentifikatoren ein Auswählen einer ersten Mehrzahl von Variablen des Steuerungsprojekts, insbesondere ein Auswählen einer ersten Mehrzahl von Variablen aus einem Programmcode eines Steuerungsprogramms für die speicherprogrammierbare Steuerungseinheit, umfassen.In one development, determining the first plurality of variable identifiers can include selecting a first plurality of variables of the control project, in particular selecting a first plurality of variables from a program code of a control program for the programmable logic controller.

Das Bestimmen der ersten Mehrzahl von Variablenidentifikatoren kann in einer Weiterbildung ein Erstellen von Instanzpfaden umfassen, die einer ersten Mehrzahl von Variablen des Steuerungsprojekts zugeordnet sind.In one development, the determination of the first plurality of variable identifiers can include the creation of instance paths that are assigned to a first plurality of variables of the control project.

Entsprechend kann gemäß einer Ausführungsform die Ausleseeinheit zum Bestimmen der zweiten Mehrzahl von Variablenidentifikatoren und/oder zum Bestimmen der der zweiten Mehrzahl von Variablenidentifikatoren in dem Speicher zugeordneten Speicherpositionen und/oder zum Auslesen der Werte der zweiten Mehrzahl von Variablenidentifikatoren an den der zweiten Mehrzahl von Variablenidentifikatoren in dem Speicher zugeordneten Speicherpositionen eingerichtet sein.Accordingly, according to one embodiment, the readout unit can be used to determine the second plurality of variable identifiers and/or to determine the memory positions associated with the second plurality of variable identifiers in the memory and/or to read out the values of the second plurality of variable identifiers at the second plurality of variable identifiers in memory locations associated with the memory.

Das Bestimmen der zweiten Mehrzahl von Variablenidentifikatoren kann gemäß einer Ausführungsform ein Auswählen einer zweiten Mehrzahl von Variablen des Steuerungsprojekts umfassen, insbesondere ein Auswählen einer zweiten Mehrzahl von Variablen aus einem Programmcode eines Steuerungsprogramms für die speicherprogrammierbare Steuerungseinheit umfassen.According to one embodiment, the determination of the second plurality of variable identifiers can include a selection of a second plurality of variables of the control project, in particular a selection of a second plurality of variables from a program code of a control program for the programmable logic controller.

Das Bestimmen der zweiten Mehrzahl von Variablenidentifikatoren kann ein Erstellen von Instanzpfaden umfassen, die einer zweiten Mehrzahl von Variablen des Steuerungsprojekts zugeordnet sind.Determining the second plurality of variable identifiers may include creating instance paths associated with a second plurality of variables of the controller project.

Gemäß einer Ausführungsform erfolgt das Bestimmen der der ersten Mehrzahl von Variablenidentifikatoren in dem Speicher zugeordneten Speicherpositionen mittels einer Zuordnungstabelle, insbesondere mittels einer bei einem Kompilieren des Steuerungsprojekts erstellten Zuordnungstabelle.According to one embodiment, the memory positions assigned to the first plurality of variable identifiers in the memory are determined by means of an assignment table, in particular by means of an assignment table created when the control project is compiled.

Gemäß einem fünften Aspekt bezieht sich die Offenbarung auf eine Vorrichtung zum Speichervergleichen einer speicherprogrammierbaren Steuerungseinheit, umfassend eine Ausleseeinheit, welche dazu eingerichtet ist, auf einen Speicher einer speicherprogrammierbaren Steuerungseinheit zuzugreifen und eine Mehrzahl von Speicherabzügen eines Speichers der speicherprogrammierbaren Steuerungseinheit zu aufeinanderfolgenden Zeitpunkten zu erzeugen, wobei jeder Speicherabzug einem entsprechenden Zustand der speicherprogrammierbaren Steuerungseinheit zu dem entsprechenden Zeitpunkt entspricht. Dabei umfasst jeder Speicherabzug eine Mehrzahl von Variablenidentifikatoren eines Steuerungsprojekts für die speicherprogrammierbare Steuerung und zu jedem der Mehrzahl von Variablenidentifikatoren einen zugeordneten Wert. Zu jedem der Variablenidentifikatoren ist in dem Speicher eine Speicherposition statisch alloziert. Die Vorrichtung umfasst auch eine Vergleichseinheit, welche zum Vergleichen der den aufeinanderfolgenden Zeitpunkten entsprechenden Werte miteinander und/oder mit vorbestimmten Referenzwerten eingerichtet ist.According to a fifth aspect, the disclosure relates to a device for memory comparisons of a programmable logic controller, comprising a readout unit which is set up to access a memory of a programmable logic controller and to generate a plurality of memory dumps of a memory of the programmable logic controller at successive points in time, wherein each memory snapshot corresponds to a corresponding state of the programmable logic controller at the corresponding point in time. In this case, each memory dump comprises a plurality of variable identifiers of a control project for the programmable logic controller and a value assigned to each of the plurality of variable identifiers. Each of the variable identifiers has a memory location statically allocated in memory. The device also includes a comparison unit, which is set up to compare the values corresponding to the successive points in time with one another and/or with predetermined reference values.

Figurenlistecharacter list

Die Merkmale und zahlreichen Vorteile der erfindungsgemäßen Lösung lassen sich am besten anhand einer detaillierten Beschreibung bevorzugter Ausführungsformen unter Bezugnahme auf die anliegenden Zeichnungen verstehen, in denen:

  • 1 in schematischer Darstellung eine Steuerungsumgebung zeigt, in der ein Verfahren und eine Vorrichtung zum Speichervergleichen gemäß einer Ausführungsform eingesetzt werden können;
  • 2 in schematischer Darstellung eine Vorrichtung zum Speichervergleichen gemäß einer Ausführungsform zeigt; und
  • 3 ein Flussdiagramm eines Verfahrens zum Speichervergleichen gemäß einer Ausführungsform zeigt.
The characteristics and numerous advantages of the solution according to the invention can best be understood by reading a detailed description of preferred embodiments with reference to the attached drawings, in which:
  • 1 12 shows a schematic representation of a control environment in which a method and apparatus for memory comparisons according to an embodiment may be employed;
  • 2 FIG. 12 shows a schematic representation of an apparatus for memory comparison according to an embodiment; FIG. and
  • 3 12 shows a flow diagram of a method for memory comparison according to an embodiment.

Detaillierte BeschreibungDetailed description

Beispiele für ein Verfahren und eine Vorrichtung zum Speichervergleichen einer speicherprogrammierbaren Steuerungseinheit werden nachfolgend unter Bezugnahme auf eine beispielhafte industrielle Steuerungsumgebung 10 beschrieben, bei der es um die Steuerung eines Portalkrans 12 mittels einer speicherprogrammierbaren Steuerungssoftware geht. Dieses Beispiel dient jedoch nur der Veranschaulichung, und im Allgemeinen können die Techniken der vorliegenden Offenbarung für die Steuerung jeder Art von Prozess eingesetzt werden, einschließlich, aber nicht beschränkt auf die Steuerung von Industriemaschinen, Robotern, chemischen Herstellungsprozessen oder Lichtsteuerungsanwendungen.Examples of a method and apparatus for memory comparison of a programmable logic controller are described below with reference to an exemplary industrial control environment 10 involving the control of a gantry crane 12 using programmable logic controller software. However, this example is for illustrative purposes only, and in general, the techniques of the present disclosure may be used to control any type of process, including but not limited to the control of industrial machinery, robotics, chemical manufacturing processes, or lighting control applications.

Wie in 1 dargestellt, umfasst die industrielle Steuerungsumgebung 10 des Ausführungsbeispiels einen Portalkran 12, bei dem es sich um einen Kran handeln kann, der in einer Fabrikumgebung eingesetzt wird, um schwere Güter in einer Montagehalle mit Hilfe einer beweglichen Hakenbaugruppe 14 zu bewegen, deren Aktuatoren durch eine Steuerungssoftware gesteuert werden.As in 1 1, the industrial control environment 10 of the exemplary embodiment includes a gantry crane 12, which may be a crane used in a factory environment to move heavy goods in an assembly shop by means of a moveable hook assembly 14, the actuators of which are controlled by control software to be controlled.

Die industrielle Steuerungsumgebung 10 umfasst dazu ferner eine speicherprogrammierbare Steuerungseinheit (SPS) 16, die mit dem Portalkran 12 über eine Steuerleitung 18, z. B. eine drahtgebundene oder drahtlose Verbindung, verbunden ist. In anderen Beispielen kann die speicherprogrammierbare Steuerungseinheit 16 in die gesteuerte Maschine, wie den Portalkran 12, integriert sein.The industrial control environment 10 also includes a programmable logic controller (PLC) 16 connected to the gantry crane 12 via a control line 18, z. B. a wired or wireless connection, connected. In other examples, the programmable logic controller 16 may be integrated into the controlled machine, such as the gantry crane 12 .

Die speicherprogrammierbare Steuerungseinheit 16 kann eine Verarbeitungseinheit 20, wie z. B. eine CPU, umfassen, um ein industrielles Steuerungsprogramm eines Steuerungsprojekts auszuführen, z. B. in Form eines kompilierten Programms zur Steuerung der Hakenbaugruppe 14 des Portalkrans 12. Zu diesem Zweck umfasst die speicherprogrammierbare Steuerungseinheit 16 eine Kommunikationsschnittstelle 22, die mit der Verarbeitungseinheit 20 verbunden ist und dazu geeignet ist, mit dem Portalkran 12 über die Steuerleitung 18 zu kommunizieren. Beispielsweise kann die Verarbeitungseinheit 20 dem Portalkran 12 Anweisungen für den Betrieb der Aktuatoren geben, um die Hakenbaugruppe 14 entlang eines vorbestimmten Weges zu bewegen, wobei die Anweisungen über die Kommunikationsschnittstelle 22 und die Steuerleitung 18 bereitgestellt werden können. Die Kommunikationsschnittstelle 22 kann auch Sensorsignale, die sich auf einen Betrieb des Portalkrans 12 beziehen, über die Steuerleitung 18 empfangen und entsprechende Rückmeldungen an die Verarbeitungseinheit 20 liefern. Solche Sensorsignale können sich zum Beispiel auf Sensoren beziehen, die eine Position der Hakenbaugruppe 14 am Portalkran 12 anzeigen.The programmable logic controller unit 16 may include a processing unit 20, such as. a CPU, to execute an industrial control program of a control project, e.g. B. in the form of a compiled program for controlling the hook assembly 14 of the gantry crane 12. For this purpose, the programmable logic controller 16 includes a communication interface 22 which is connected to the processing unit 20 and is suitable for communicating with the gantry crane 12 via the control line 18 . For example, the processing unit 20 may instruct the gantry crane 12 to operate the actuators to move the hook assembly 14 along a predetermined path, which instructions may be provided via the communications interface 22 and the control line 18 . The communication interface 22 can also receive sensor signals that relate to an operation of the gantry crane 12 via the control line 18 and provide corresponding feedback to the processing unit 20 . Such sensor signals may relate to sensors that indicate a position of the hook assembly 14 on the gantry crane 12, for example.

Wie in 1 weiter dargestellt ist, umfasst die speicherprogrammierbare Steuerungseinheit 16 auch eine Speichereinheit 24, die mit der Verarbeitungseinheit 20 verbunden ist. Insbesondere kann die Speichereinheit 24 einen zugewiesenen bzw. allozierten Datenbereich umfassen, um Programme, Funktionsblöcke, Funktionen, Daten oder Datenstrukturen des Steuerungsprojekts zu speichern, die zu einem Betrieb der industriellen Steuerungseinheit 16 bzw. des Portalkrans 12 nötig sind. Ferner kann der Datenbereich auch von dem Portalkran 12 über die Steuerleitung 18 bereitgestellte Sensordaten umfassen, beispielsweise Sensordaten, die sich auf eine gemessene Position der von dem Steuerungsprogramm gesteuerten Hakenbaugruppe 14 des Portalkrans 12 beziehen. Insbesondere können die Speicherpositionen dieser Objekte in der Speichereinheit 24 statisch alloziert sein, so dass sich die Speicherpositionen während des Ausführens des Steuerungsprogramms in der Verarbeitungseinheit 20 nicht ändern und ggf. auch bei Modifikationen des Steuerungsprojekts nicht ändern.As in 1 As further illustrated, the programmable logic controller unit 16 also includes a memory unit 24 which is connected to the processing unit 20 . In particular, the memory unit 24 can include an assigned or allocated data area in order to store programs, function blocks, functions, data or data structures of the control project that are necessary for operating the industrial control unit 16 or the gantry crane 12 . Furthermore, the data area can also include sensor data provided by the gantry crane 12 via the control line 18 , for example sensor data which relate to a measured position of the hook assembly 14 of the gantry crane 12 controlled by the control program. In particular, the storage positions of these objects in the storage unit 24 can be allocated statically, so that the storage positions do not change during the execution of the control program in the processing unit 20 and possibly also do not change when the control project is modified.

1 zeigt die Speichereinheit 24 als monolithischen Speicherblock. In anderen Ausführungsformen kann die Speichereinheit 24 über mehrere Speicherblöcke an unterschiedlichen Speicherorten verteilt sein. 1 Figure 12 shows memory unit 24 as a monolithic memory block. In other embodiments, storage unit 24 may be distributed across multiple storage blocks in different storage locations.

Die industrielle Steuerungsumgebung 10 kann ferner eine Programmierumgebung 26 umfassen, die mit der Kommunikationsschnittstelle 22 der speicherprogrammierbaren Steuerungseinheit 16 über ein Netzwerk 28, wie z. B. ein Werksintranet oder das Internet, verbunden ist. Die Programmierumgebung 26 kann beispielsweise einen Desktop-PC oder ein anderes Computergerät umfassen und kann von einem Programmierer verwendet werden, um industrielle Steuerungssoftware zu entwerfen und zu generieren, z.B. in Form eines Steuerungsprogramms in einer Hochsprache wie C, C+ + oder C#.The industrial control environment 10 may further include a programming environment 26 that communicates with the communications interface 22 of the programmable logic controller 16 over a network 28, such as. B. a factory intranet or the Internet is connected. Programming environment 26 may include, for example, a desktop PC or other computing device, and may be used by a programmer to design and generate industrial control software, e.g., in the form of a high-level control program such as C, C++, or C#.

Die Programmierumgebung 26 kann dazu insbesondere eine Programmierschnittstelle 30 umfassen, wie z. B. einen Programmiereditor oder einen grafischen Editor, der es einem Programmierer ermöglicht, ein Steuerungsprojekt für die speicherprogrammierbare Steuerungseinheit 16 zu erzeugen, wobei das Steuerungsprojekt beispielsweise ein Steuerungsprojekt gemäß dem Industriestandard 61131-3 sein kann und insbesondere ein Steuerungsprogramm in einer Programmierhochsprache, globale Variablen, Funktionsblöcke und Funktionen mit lokalen Variablen umfassen kann. Die Programmierumgebung 26 kann ferner eine Programmierspeichereinheit 32 und eine Programmierprozessoreinheit 34 umfassen, die mit der Programmierschnittstelle 30 verbunden sind. Die Programmierspeichereinheit 32 kann Funktionen, Funktionsblöcke oder Variablen speichern, die vom Programmierer bei der Erstellung des Steuerungsprojekts verwendet werden können. Die Programmierprozessoreinheit 34 kann die Verarbeitungsressourcen bereitstellen, um die Programmierschnittstelle 30 zu betreiben und das Steuerungsprojekt zu erzeugen.The programming environment 26 can in particular include a programming interface 30 such. B. a programming editor or a graphical editor that allows a programmer to create a control project for the programmable logic controller unit 16, wherein the control project can be, for example, a control project according to the industry standard 61131-3 and in particular a control program in a high-level programming language, global variables, Function blocks and functions with local variables. The programming environment 26 may further include a programming memory unit 32 and a programming processor unit 34 coupled to the programming interface 30 . The programming storage unit 32 can store functions, function blocks or variables that can be used by the programmer when creating the control project. The programming processor unit 34 may provide the processing resources to operate the programming interface 30 and create the controller project.

In einigen Ausführungsformen kann die Programmierumgebung 26 zusätzlich eine Compiler-Einheit 36 umfassen, die das Steuerungsprojekt einschließlich des Steuerungsprogramms aus der Hochsprache in ein kompiliertes Steuerungsprogramm in Maschinencode umwandeln kann. Das kompilierte Steuerungsprogramm kann dann der speicherprogrammierbaren Steuerungseinheit 16 über das Netzwerk 28 zur Verfügung gestellt werden und kann in der Speichereinheit 24 gespeichert und in der Verarbeitungseinheit 22 zur Steuerung des Betriebs des Portalkrans 12 ausgeführt werden.In some embodiments, the programming environment 26 may additionally include a compiler unit 36 that may convert the control project including the high-level language control program into a compiled machine code control program. The compiled control program may then be made available to the programmable logic controller 16 over the network 28 and may be stored on the storage unit 24 and executed on the processing unit 22 to control the operation of the gantry crane 12 .

In anderen Ausführungsformen stellt die Programmierumgebung 26 der speicherprogrammierbaren Steuerungseinheit 16 das Steuerungsprojekt einschließlich des Steuerungsprogramms in der Programmierhochsprache über das Netzwerk 28 zur Verfügung, und die speicherprogrammierbare Steuerungseinheit 16 umfasst eine Compiler-Einheit (nicht dargestellt), die das Steuerungsprojekt in Maschinencode kompiliert.In other embodiments, the programming environment 26 provides the programmable logic controller 16 with the controller project including the controller program in the programmer high-level language is available over the network 28, and the programmable logic controller 16 includes a compiler unit (not shown) that compiles the control project into machine code.

Die Compiler-Einheit 36 kann insbesondere dazu eingerichtet sein, die Speicherpositionen bzw. Speicheradressen der Objekte und Variablen des Steuerungsprojekts bereits beim Kompilieren statisch festzulegen, beispielsweise in Form von Speicher-Offsets bezüglich einer Ursprungsadresse der Speichereinheit 24.In particular, compiler unit 36 can be set up to statically define the memory positions or memory addresses of the objects and variables of the control project during compilation, for example in the form of memory offsets with respect to an original address of memory unit 24.

Unter weiterer Bezugnahme auf die 1 und 2 umfasst die industrielle Steuerungsumgebung 10 ferner eine Speichervergleichs-Vorrichtung 38 mit einer Ausleseeinheit 40 und einer Vergleichseinheit 42.With further reference to the 1 and 2 The industrial control environment 10 also includes a memory comparison device 38 with a readout unit 40 and a comparison unit 42.

Die Ausleseeinheit 40 ist mit der Speichereinheit 24 kommunikativ gekoppelt und dazu eingerichtet, auf die Speichereinheit 24 zuzugreifen und zu einem ersten Zeitpunkt einen ersten Speicherabzug und zu einem zweiten Zeitpunkt, der sich von dem ersten Zeitpunkt unterscheidet, einen zweiten Speicherabzug der Speichereinheit 24 der speicherprogrammierbaren Steuerungseinheit 16 zu erzeugen. Der erste Speicherabzug entspricht einem ersten Zustand der speicherprogrammierbaren Steuerungseinheit 16 zu dem ersten Zeitpunkt, wobei der erste Speicherabzug eine erste Mehrzahl von Variablenidentifikatoren des Steuerungsprojekts für die speicherprogrammierbare Steuerungseinheit 16 und zu jedem der ersten Mehrzahl von Variablenidentifikatoren einen zugeordneten ersten Wert umfasst. Entsprechend kann der zweite Speicherabzug einem zweiten Zustand der speicherprogrammierbaren Steuerungseinheit 16 zu dem zweiten Zeitpunkt entsprechen, wobei der zweite Speicherabzug eine zweite Mehrzahl von Variablenidentifikatoren des Steuerungsprojekts und zu jedem der zweiten Mehrzahl von Variablenidentifikatoren einen zugeordneten zweiten Wert umfasst. Zu jedem der ersten Mehrzahl von Variablenidentifikatoren und der zweiten Mehrzahl von Variablenidentifikatoren ist in der Speichereinheit 24 eine Speicherposition statisch alloziert.The readout unit 40 is communicatively coupled to the memory unit 24 and set up to access the memory unit 24 and at a first point in time a first memory dump and at a second point in time, which differs from the first point in time, a second memory dump of the memory unit 24 of the programmable logic controller 16 to generate. The first memory dump corresponds to a first state of the programmable logic controller 16 at the first point in time, the first memory dump comprising a first plurality of variable identifiers of the control project for the programmable logic controller 16 and an associated first value for each of the first plurality of variable identifiers. Correspondingly, the second memory dump can correspond to a second state of the programmable logic controller 16 at the second point in time, the second memory dump comprising a second plurality of variable identifiers of the control project and an associated second value for each of the second plurality of variable identifiers. A memory location is statically allocated in memory unit 24 to each of the first plurality of variable identifiers and the second plurality of variable identifiers.

Der jeweilige Speicherabzug kann beispielsweise alle Variablen des Steuerungsprojekts samt der ihnen zugeordneten Parameterwerte oder Sensorwerte, wie sie zu dem entsprechenden ersten Zeitpunkt bzw. zweiten Zeitpunkt in dem allozierten Datenbereich der Speichereinheit 24 gespeichert sind, umfassen.The respective memory dump can include, for example, all variables of the control project together with the parameter values or sensor values assigned to them, as they are stored in the allocated data area of the memory unit 24 at the corresponding first point in time or second point in time.

Die Vergleichseinheit 42 ist kommunikativ mit der Ausleseeinheit 40 gekoppelt und dazu eingerichtet, die zweiten Werte mit den ersten Werten zu vergleichen, beispielsweise um mögliche Abweichungen zwischen den entsprechenden Parameterwerten oder Sensorwerten zwischen dem ersten Zeitpunkt, der einen Referenzzeitpunkt darstellen kann, und einem zeitlich nach dem ersten Zeitpunkt liegenden zweiten Zeitpunkt, in dem die speicherprogrammierbare Steuerungseinheit 16 ihren Zustand gegenüber dem Referenzzeitpunkt geändert hat, systematisch zu erfassen.Comparison unit 42 is communicatively coupled to readout unit 40 and set up to compare the second values with the first values, for example to identify possible deviations between the corresponding parameter values or sensor values between the first point in time, which can represent a reference point in time, and a point in time after the first point in time lying second point in time, in which the programmable logic controller 16 has changed its state compared to the reference point in time, systematically.

Die offenbarungsgemäße Technologie erlaubt es auf diese Weise, einen ersten Projektstand mit einem ersten Speicherabzug zu kombinieren, einen zweiten Projektstand mit einem zweiten Speicherabzug zu kombinieren und aus diesen beiden Ständen eine Differenzliste zu erzeugen. Diese Differenzliste kann dann dem Anwender präsentiert werden oder maschinell interpretiert werden.In this way, the technology according to the disclosure makes it possible to combine a first project status with a first memory dump, to combine a second project status with a second memory dump and to generate a difference list from these two statuses. This difference list can then be presented to the user or interpreted automatically.

Beispielsweise kann sich der erste Zustand zum Referenzzeitpunkt auf eine unproblematische Situation der speicherprogrammierbaren Steuerungseinheit 16 beziehen, während sich der zweite Zustand auf einen fehlerhaften Zustand nach dem Durchführen einer Aktion bezieht. Die Differenzliste kann dem Nutzer oder Programmierer dazu helfen, den Fehler zu verstehen und zu beseitigen.For example, the first state at the reference time can relate to an unproblematic situation in the programmable logic controller 16, while the second state relates to an incorrect state after an action has been carried out. The difference list can help the user or programmer to understand and eliminate the error.

Die Vergleichseinheit 42 kann die Vergleichsergebnisse lokal an der industriellen Steuerungseinheit 16 verarbeiten oder lokal dort anzeigen. In anderen Ausführungsformen kann die Vergleichseinheit 42 über die Kommunikationsschnittstelle 22 an das Netzwerk 28 gekoppelt sein, um die Ergebnisse des Vergleichs einem Nutzer über das Netzwerk 28 bereitzustellen, beispielsweise zur Anzeige und/oder Weiterverarbeitung an der Programmierumgebung 26.The comparison unit 42 can process the comparison results locally at the industrial control unit 16 or display them locally there. In other embodiments, the comparison unit 42 can be coupled to the network 28 via the communication interface 22 in order to provide the results of the comparison to a user via the network 28, for example for display and/or further processing in the programming environment 26.

In einigen Ausführungsformen kann die Speichervergleichs-Vorrichtung 38, wie in 2 gezeigt, eine Anzeigeeinheit 44 umfassen, welche zum Anzeigen des Ergebnisses des Vergleichens der zweiten Werte mit den ersten Werten eingerichtet ist. Die Anzeigeeinheit 44 kann sowohl lokal in oder an der speicherprogrammierbaren Steuerungseinheit 16 angeordnet sein als auch räumlich von ihr getrennt sein, beispielsweise in oder an der Programmierumgebung 26 angeordnet sein.In some embodiments, memory compare device 38, as shown in FIG 2 shown, comprise a display unit 44 which is arranged to display the result of the comparison of the second values with the first values. The display unit 44 can be arranged both locally in or on the programmable logic controller 16 and also spatially separate from it, for example arranged in or on the programming environment 26 .

Die 1 und 2 zeigen die Ausleseeinheit 40, die Vergleichseinheit 42 und Anzeigeeinheit 44 als separate, kommunikativ miteinander gekoppelte Einheiten. Diese Darstellung ist nur beispielhaft. In anderen Ausführungsformen können zwei oder mehr dieser Einheiten 40, 42, 44 miteinander integriert sein. Zudem kann jede dieser Einheiten 40, 42, 44 als Hardware, Software oder Firmware realisiert sein.the 1 and 2 show the readout unit 40, the comparison unit 42 and the display unit 44 as separate, communicatively coupled units. This representation is only an example. In other Embodiments, two or more of these units 40, 42, 44 can be integrated with each other. In addition, each of these units 40, 42, 44 can be implemented as hardware, software or firmware.

3 veranschaulicht ein offenbarungsgemäßes Verfahren zum Speichervergleichen anhand eines Flussdiagramm. In einem ersten Schritt S10 wird ein erster Speicherabzug eines Speichers der speicherprogrammierbaren Steuerungseinheit erzeugt, wobei der erste Speicherabzug einem ersten Zustand der speicherprogrammierbaren Steuerungseinheit zu einem ersten Zeitpunkt entspricht. Der erste Speicherabzug umfasst eine erste Mehrzahl von Variablenidentifikatoren eines Steuerungsprojekts für die speicherprogrammierbare Steuerungseinheit und zu jedem der ersten Mehrzahl von Variablenidentifikatoren einen zugeordneten ersten Wert, wobei zu jedem der ersten Mehrzahl von Variablenidentifikatoren in dem Speicher eine Speicherposition statisch alloziert ist. 3 FIG. 12 illustrates a memory comparison method according to the disclosure using a flowchart. In a first step S10, a first memory dump of a memory of the programmable logic control unit is generated, the first memory dump corresponding to a first state of the programmable logic control unit at a first point in time. The first memory snapshot comprises a first plurality of variable identifiers of a control project for the programmable logic controller and a first value assigned to each of the first plurality of variable identifiers, a memory position being statically allocated to each of the first plurality of variable identifiers in the memory.

In einem zweiten Schritt S12, welcher dem ersten Schritt S10 nachgeordnet sein kann, wird ein zweiter Speicherabzug des Speichers der speicherprogrammierbaren Steuerungseinheit erzeugt, wobei der zweite Speicherabzug einem zweiten Zustand der speicherprogrammierbaren Steuerungseinheit zu einem zweiten Zeitpunkt entspricht, wobei der zweite Zeitpunkt sich von dem ersten Zeitpunkt unterscheidet. Der zweite Speicherabzug umfasst eine zweite Mehrzahl von Variablenidentifikatoren des Steuerungsprojekts und zu jedem der zweiten Mehrzahl von Variablenidentifikatoren einen zugeordneten zweiten Wert, wobei zu jedem der zweiten Mehrzahl von Variablenidentifikatoren in dem Speicher eine Speicherposition statisch alloziert ist.In a second step S12, which can be subordinate to the first step S10, a second memory dump of the memory of the programmable logic control unit is generated, the second memory dump corresponding to a second state of the programmable logic control unit at a second point in time, the second point in time being different from the first timing differs. The second memory dump includes a second plurality of variable identifiers of the control project and a second value associated with each of the second plurality of variable identifiers, wherein a memory location is statically allocated to each of the second plurality of variable identifiers in the memory.

In einem dritten Schritt S14, welcher dem zweiten Schritt S12 nachgeordnet sein kann, werden die zweiten Werte mit dem ersten Werten verglichen.In a third step S14, which can follow the second step S12, the second values are compared with the first values.

Das Verfahren kann in einigen Ausführungsformen automatisiert ablaufen, insbesondere gesteuert durch rechnerlesbare Instruktionen, die auf einem mit der speicherprogrammierbaren Steuerungseinheit 16 gekoppelten Rechner, zum Beispiel auf der Verarbeitungseinheit 20 oder der Programmierprozessoreinheit 34, ausgeführt werden.In some embodiments, the method can run automatically, in particular controlled by computer-readable instructions that are executed on a computer coupled to the programmable logic controller 16 , for example on the processing unit 20 or the programming processor unit 34 .

Im folgenden werden die Techniken des offenbarungsgemäßen Verfahrens an einem konkreten Beispiel für ein Steuerungsprogramm nach dem weitverbreiteten Industriestandard 61131-3 veranschaulicht. Dieser Standard definiert globale Variablen sowie Programme, Funktionsblöcke und Funktionen mit lokalen Variablen. Zusätzlich werden in der 3. Edition des Standards Methoden für Funktionsblöcke eingeführt, die sich wie Funktionen mit einem besonderen Input (dem THIS-Pointer auf die Funktionsblockinstanz) verhalten. Typischerweise werden globale Variablen und Variablen in Programmen global im Speicher, beispielsweise in der Speichereinheit 24, alloziert. Funktionsblöcke sind vergleichbar einer Klasse in anderen Programmiersprachen wie Java oder C#. Man kann Funktionsblöcke dabei nicht direkt verwenden, sondern es werden Instanzen von Funktionsblöcken angelegt. Eine solche Instanz ist eine Variable vom Typ des Funktionsblocks, und die Variable wiederum kann an einem beliebigen Ort deklariert sein, d.h. in einem Programm, als globale Variable oder in einem anderen Funktionsblock. Funktionen und Methoden halten selbst keine Zustände zwischen zwei Aufrufen. Typischerweise sind Variablen nur während des Aufrufs gültig und werden auf dem Stapelspeicher („Stack“) angelegt. Wie vorangehend ausgeführt, bekommen die Variablen innerhalb eines Funktionsblocks typischerweise einen lokalen Offset zugewiesen, der für die gleiche Variable in jeder Instanz des Funktionsblocks gleich ist.The techniques of the method according to the disclosure are illustrated below using a concrete example for a control program based on the widespread industry standard 61131-3. This standard defines global variables as well as programs, function blocks, and functions with local variables. In addition, the 3rd edition of the standard introduces methods for function blocks that behave like functions with a special input (the THIS pointer to the function block instance). Typically, global variables and variables in programs are allocated globally in memory, such as memory unit 24 . Function blocks are comparable to a class in other programming languages like Java or C#. Function blocks cannot be used directly, but instances of function blocks are created. Such an instance is a variable of the function block type, and the variable in turn can be declared anywhere, i.e. in a program, as a global variable or in another function block. Functions and methods themselves do not hold any states between two calls. Typically, variables are only valid during the call and are created on the stack. As previously stated, the variables within a function block are typically assigned a local offset that is the same for the same variable in each instance of the function block.

Die globalen Variablen werden alle in einen oder mehrere Speicherbereiche der Speichereinheit 24 alloziert. Dabei nimmt der Compiler, beispielsweise die Compiler-Einheit 36, üblicherweise beim Kompilieren jeweils als Anfangsadresse 0 der Speicherbereiche an. Der Compiler erzeugt dann beim Kompilieren für jeden Zugriff im Code auf eine solche Adresse eine Relokationsinformation. Diese Relokationsinformation wird mit dem Programm auf die Steuerung geladen, und der Zugriff im Code wird dort auf die echte Adresse angepasst.The global variables are all allocated to one or more memory areas of memory unit 24 . In this case, the compiler, for example the compiler unit 36, usually assumes 0 as the start address of the memory areas during compilation. During compilation, the compiler then generates relocation information for each access in the code to such an address. This relocation information is loaded onto the controller with the program, and access in the code is adapted there to the real address.

Um das offenbarungsgemäße Verfahren zu illustrieren, nehmen wir ein kleines Beispielsprojekt an, das der Nutzer in der Programmierumgebung 26 erstellt und das einen Funktionsblock (FUNCTION_BLOCK) mit lokalen Variablen (in1, in2, out1), ein Programm (PROGRAM) mit lokalen Variablen (test1, inst1, inst2), eine Funktion (FUNCTION) mit lokalen Variablen (in, wert) und zwei globale Variablen (VAR_GLOBAL) umfasst:

               PROGRAM PLC_PRG
               VAR
                   test1 : DINT := 0;
                   inst1 : FB;
                   inst2 : FB;
               END_VAR
                     inst1(in1 := 3, in2 := 9, out1 => test1);
                     inst2(in1 := 0, in2 := 8, out1 => g_test);
               END_PROGRAM
               VAR_GLOBAL
                    g dummy : DINT := 99;
                    g_arr : ARRAY [1..5] OF DINT := [11, 22, 33, 44, 55];
                    g_test : DINT;
               END_VAR
               FUNCTION FUN : DINT
               VAR_INPUT
                     in : DINT;

                    wert : DINT;
               END_VAR
               FUN := g_arr[in];
               g arr[in] := wert;
               END_FUN
               FUNCTION_BLOCK FB
               VAR_INPUT
                     in1 : DINT;
                     in2 : DINT;
               END_VAR
               VAR_OUTPUT
                    out1 : DINT;
               END_VAR
               out1 := FUN(in1, in2);
               END_FUNCTION_BLOCK
To illustrate the method according to the disclosure, let's assume a small example project that the user creates in the programming environment 26 and that contains a function block (FUNCTION_BLOCK) with local variables (in1, in2, out1), a program (PROGRAM) with local variables (test1 , inst1, inst2), a function (FUNCTION) with local variables (in, value) and two global variables (VAR_GLOBAL):
 PROGRAM PLC_PRG
               VAR
test1 : DINT := 0;
                   inst1 : FB;
                   inst2 : FB;
               END_VAR
                     inst1(in1 := 3, in2 := 9, out1 =>test1);
                     inst2(in1 := 0, in2 := 8, out1 =>g_test);
               END_PROGRAM
               VAR_GLOBAL
                    g dummy : DINT := 99;
                    g_arr : ARRAY [1..5] OF DINT := [11, 22, 33, 44, 55];
                    g_test : DINT;
               END_VAR
               FUNCTION FUN : DINT
               VAR_INPUT
                     in : DINT;

                    value : DINT;
               END_VAR
               FUN := g_arr[in];
               garr[in] := value;
               END_FUN
               FUNCTION_BLOCK FB
               VAR_INPUT
                     in1 : DINT;
                     in2 : DINT;
               END_VAR
               VAR_OUTPUT
                    out1 : DINT;
               END_VAR
               out1 := FUN(in1, in2);
               END_FUNCTION_BLOCK

Das Projekt dient zur Illustration und enthält einen gravierenden Programmierfehler, der bei einem Ablaufenlassen des Programms zu einer unerwarteten Änderung der Variable g_dummy führt und den zu finden die hier vorgestellten Techniken erleichtern können.The project serves as an illustration and contains a serious programming error that leads to an unexpected change in the variable g_dummy when the program is run and which the techniques presented here can make it easier to find.

Für die Variablen in diesem Projekt kann die Compiler-Einheit 36 beispielsweise die folgenden Adressen vergeben: Tabelle 1: Offset-Tabelle für die Variablen eines Programms Variable Offset Grösse (32 bit integer) Speicherort PLC_PRG.test1 0 4 global PLC_PRG.inst1 4 12 global PLC_PRG.inst2 16 12 global g_dummy 28 4 global g_arr 32 20 global g_test 52 4 global FUN.in 0 4 Lokal in Fun (auf Stack) FUN.wert 4 4 Lokal in Fun (auf Stack) FUN.FUN (implizit für die Rückgabe) 8 4 Lokal in Fun (auf Stack) FB.ini 0 4 Lokal in FB (wie Instanz) FB.in2 4 4 Lokal in FB (wie Instanz) FB.out 8 4 Lokal in FB (wie Instanz) For example, the compiler unit 36 can assign the following addresses for the variables in this project: Table 1: Offset table for the variables of a program variable offset Size (32 bit integer) location PLC_PRG.test1 0 4 global PLC_PRG.inst1 4 12 global PLC_PRG.inst2 16 12 global g_dummy 28 4 global g_arr 32 20 global g_test 52 4 global FUN.in 0 4 Locally in Fun (on Stack) FUN.value 4 4 Locally in Fun (on Stack) FUN.FUN (implicit for return) 8th 4 Locally in Fun (on Stack) FB.ini 0 4 Local in FB (like instance) FB.in2 4 4 Local in FB (like instance) FB.out 8th 4 Local in FB (like instance)

Die Compiler-Einheit 36 generiert beim Übersetzen den ausführbaren Code, überträgt diese Offset-Tabelle zusammen mit dem erzeugten Maschinencode über das Netzwerk 28 an die speicherprogrammierbare Steuerungseinheit 16 und speichert die Offset-Tabelle als zusätzliche Information zum erzeugten Maschinencode in der Speichereinheit 24 ab.During translation, compiler unit 36 generates the executable code, transmits this offset table together with the generated machine code via network 28 to stored-program control unit 16, and stores the offset table in memory unit 24 as additional information about the generated machine code.

Die Offset-Tabelle ermöglicht es, aus einem Speicherabzug der Speichereinheit 24 die zugehörigen Variablenwerte zu ermitteln. Im Folgenden bezeichnen wir einen Zugriff auf eine Variable innerhalb einer Instanz als Instanzpfad zu der Variable und verwenden dafür die „.“-Notation des Industriestandards IEC 61131 für den Komponentenzugriff, zum Beispiel PLC_PRG.inst2.in2. Ein Instanzpfad kann prinzipiell beliebig tief werden.The offset table makes it possible to determine the associated variable values from a memory dump of the memory unit 24 . In the following, we refer to an access to a variable within an instance as the instance path to the variable and use the "." notation of the industry standard IEC 61131 for component access, for example PLC_PRG.inst2.in2. In principle, an instance path can be as deep as you like.

Um von diesem Instanzpfad zur Speicherstelle zu gelangen, genügt es, die Offsets der einzelnen Komponenten gemäß der Offset-Tabelle zu addieren. Im Beispielfall PLC_PRG.inst2.in2 ist das Ergebnis 20. Umgekehrt lässt sich von einer Speicherstelle in der Speichereinheit 24 leicht auf den Instanzpfad rückschließen, der an dieser Stelle liegt. Dazu kann beispielsweise der folgende Algorithmus in C#-Code verwendet werden:

 public string GetInstancePathForAddress(int nOffset)
 {
    return GetInstancePathForAddress(nOffset, globalvariables, "");
 }

  
 private string GetInstancePathForAddress(int nOffset, VariableList
 variables, string stInstancepathIn)
 {
    foreach (Variable var in variables)
    {
        if (var.Offset <= nOffset && var.Offset + var.Size >
 nOffset)
        {
          stInstancepath = stInstancepathIn.Empty ? var.Name :
 stInstancepath + "." + var.Name;
          if (IsStructuredType(var.Type))
          {
            GetInstancePathForAddress(nOffset - var.Offset,
 GetVariableList(var.Type) );
          }
        }
    }
      return "";
 }
To get to the memory location from this instance path, it is sufficient to add the offsets of the individual components according to the offset table. In the PLC_PRG.inst2.in2 example, the result is 20. Conversely, a memory location in the memory unit 24 can be used to easily deduce the instance path that is at this location. For example, the following algorithm can be used in C# code:
 public string GetInstancePathForAddress(int nOffset)
 {
    return GetInstancePathForAddress(nOffset, globalvariables, "");
 }

  
 private string GetInstancePathForAddress(int nOffset, VariableList
 variables, string stInstancepathIn)
 {
    foreach (variable var in variables)
    {
        if (var.Offset <= nOffset && var.Offset + var.Size >
 n offset)
        {
          stInstancepath = stInstancepathIn.Empty ? var.Name :
 stInstancepath + "." + var.name;
          if (IsStructuredType(var.Type))
          {
            GetInstancePathForAddress(nOffset - var.Offset,
 GetVariableList(var.Type) );
          }
        }
    }
      return "";
 }

Entsprechend funktioniert diese Zuordnung auch für Variablen auf dem Stack. Jeder Stackframe kann dabei als eigener Variablenraum betrachtet werden.This assignment also works correspondingly for variables on the stack. Each stack frame can be viewed as a separate variable space.

Im Sinne der vorliegenden Offenbarung kann beispielsweise ein Speicherabzug als eine Mehrzahl von Listen von Bytes angenommen werden, wobei eine Liste dem globalen Speicher entspricht und für jede Funktion im Aufrufstack eine weitere Liste vorgesehen ist.For example, for purposes of the present disclosure, a core dump may be thought of as a plurality of lists of bytes, where one list corresponds to global memory and another list is provided for each function in the call stack.

Aus dem Speicherabzug und der dazu passenden Offset-Tabelle mit den erzeugten Variablenoffsets des dazugehörigen Quellcodeprogramms kann eine vollständige Tabelle aller Instanzpfade erzeugt werden. Im vorangehend diskutierten Beispiel könnte man etwa einen Haltepunkt an den Aufruf von inst2 im Programm PLC_PRG setzen und einen Speicherabzug erzeugen, wenn die Abarbeitung an dieser Stelle stehenbleibt. Es existieren an dieser Stelle keine Stackvariablen, daher genügt für unsere Betrachtung der globale Speicher.A complete table of all instance paths can be generated from the memory dump and the matching offset table with the generated variable offsets of the associated source code program. In the example discussed above, you could set a breakpoint at the call of inst2 in the PLC_PRG program and create a memory dump if processing stops at this point stays. There are no stack variables at this point, so the global memory is sufficient for our consideration.

Zur besseren Lesbarkeit nehmen wir den Speicher im Big Endian Mode sortiert an und stellen ihn 4-byteweise dar. Es sollte der folgende Speicher geladen werden: Tabelle 2: beispielhafter Speicherabzug des Heap-Speichers einer Applikation Offset Wert 0 0x00000021 4 0x00000003 8 0x00000009 12 0x00000021 16 0x00000000 20 0x00000000 24 0x00000000 28 0x00000063 32 0x0000000B 36 0x00000016 40 0x00000009 44 0x0000002C 48 0x00000037 52 0x00000000 For better readability, we assume the memory is sorted in Big Endian mode and display it 4-byte by 4 bytes. The following memory should be loaded: Table 2: Sample memory dump of an application's heap memory offset value 0 0x00000021 4 0x00000003 8th 0x00000009 12 0x00000021 16 0x00000000 20 0x00000000 24 0x00000000 28 0x00000063 32 0x0000000B 36 0x00000016 40 0x00000009 44 0x0000002C 48 0x00000037 52 0x00000000

Aus der Tabelle 1 wiederum lässt sich eine Tabelle aller Instanzpfade im globalen Speicher der Applikation erzeugen, indem alle Instanzen komplett aufgespannt werden. Außerdem kann man jedem dieser Instanzpfade einen Speicherbereich gemäß der Tabelle 2 zuordnen. Wenn man den Inhalt des Speichers entsprechend dem Typ des Instanzpfads interpretiert (hier sind alle Typen DINT), dann erhält man aus dem Speicherabzug zum ersten Zeitpunkt t1 eine Tabelle mit Werten für jeden globalen Instanzpfad im Programm: Tabelle 3: erste Tabelle aus Speicherabzug für den Vergleich Instanzpfad Offset Wert t 1 PLC_PRG.test1 0 33 PLC_PRG.inst1.in1 4 3 PLC_PRG.inst1.in2 8 9 PLC_PRG.insti.out 12 33 PLC_PRG.inst2.in1 16 0 PLC_PRG.inst2.in2 20 0 PLC_PRG.inst2.out 24 0 g_dummy 28 99 g_arr[1] 32 11 g_arr[2] 36 22 g_arr[3] 40 9 g_arr[4] 44 44 g_arr[5] 48 55 g_test 52 0 In turn, a table of all instance paths in the global memory of the application can be generated from Table 1 by opening all instances completely. In addition, a memory area according to Table 2 can be assigned to each of these instance paths. If one interprets the content of the memory according to the type of the instance path (here all types are DINT), then from the memory dump at the first time t 1 one gets a table with values for each global instance path in the program: Table 3: first table from memory dump for the comparison instance path offset value t 1 PLC_PRG.test1 0 33 PLC_PRG.inst1.in1 4 3 PLC_PRG.inst1.in2 8th 9 PLC_PRG.insti.out 12 33 PLC_PRG.inst2.in1 16 0 PLC_PRG.inst2.in2 20 0 PLC_PRG.inst2.out 24 0 g_dummy 28 99 g_arr[1] 32 11 g_arr[2] 36 22 g_arr[3] 40 9 g_arr[4] 44 44 g_arr[5] 48 55 g_test 52 0

Wir können nun eine zweite Wertetabelle aus einem entsprechenden Speicherabzug zu einem späteren Zeitpunkt t2 > t1 erzeugen und die Differenz aus den beiden Tabellen bilden, um die Unterschiede zu bestimmen und zu analysieren. In unserem Beispiel führen wir dazu einen Einzelschritt über den Aufruf von inst2 in PLC_PRG aus, so dass die Abarbeitung am Ende des Programms stehenbleibt, und führen die vorangehend zur Erstellung der Tabelle 3 beschriebenen Schritte noch einmal aus. Es ergibt sich die Tabelle 4: Tabelle 4: zweite Tabelle aus Speicherabzug für den Vergleich Instanzpfad Offset Wert t 2 PLC_PRG.test1 0 33 PLC_PRG.inst1.in1 4 3 PLC_PRG.inst1.in2 8 9 PLC_PRG.insti.out 12 33 PLC_PRG.inst2.in1 16 0 PLC_PRG.inst2.in2 20 8 PLC_PRG.inst2.out 24 99 g_dummy 28 8 g_arr[1] 32 11 g_arr[2] 36 22 g_arr[3] 40 9 g_arr[4] 44 44 g_arr[5] 48 55 g_test 52 99 We can now create a second table of values from a corresponding dump at a later time t 2 > t 1 and take the difference between the two tables to determine and analyze the differences. In our example, we carry out a single step by calling inst2 in PLC_PRG so that processing stops at the end of the program, and repeat the steps described above for creating Table 3. Table 4 results: Table 4: second table from memory dump for comparison instance path offset value t 2 PLC_PRG.test1 0 33 PLC_PRG.inst1.in1 4 3 PLC_PRG.inst1.in2 8th 9 PLC_PRG.insti.out 12 33 PLC_PRG.inst2.in1 16 0 PLC_PRG.inst2.in2 20 8th PLC_PRG.inst2.out 24 99 g_dummy 28 8th g_arr[1] 32 11 g_arr[2] 36 22 g_arr[3] 40 9 g_arr[4] 44 44 g_arr[5] 48 55 g_test 52 99

Aus diesen beiden Tabellen lässt sich nun durch Vergleichen der ersten Werte mit den zweiten Werten eine Differenzliste bilden: Tabelle 5: Differenzliste zweier Speicherabzüge Instanzpfad Alter Wert t 1 Neuer Wert t 2 Art der Änderung PLC_PRG.inst2.in2 0 8 Wert PLC_PRG.inst2.out 0 99 Wert g_dummy 99 8 Wert g_test 0 99 Wert A difference list can now be created from these two tables by comparing the first values with the second values: Table 5: Difference list of two memory dumps instance path Old value t 1 New value t 2 Type of Change PLC_PRG.inst2.in2 0 8th value PLC_PRG.inst2.out 0 99 value g_dummy 99 8th value g_test 0 99 value

Der Programmierer kann aus dieser Differenzliste gemäß Tabelle 5 sehr viel schneller die vermutlich unerwartete Änderung der Variable g_dummy erkennen. Ohne den Vergleich der Speicherabzüge bliebe diese Änderung vermutlich unerkannt, bis die Variable selbst wieder irgendwo verwendet wird.From this list of differences according to Table 5, the programmer can recognize the presumably unexpected change in the g_dummy variable much more quickly. Without comparing the memory dumps, this change would probably remain undetected until the variable itself is used again somewhere.

Das hier durchgeführte Beispiel stellt einen Spezialfall dar, in dem alle Variablen ihren Speicherplatz behalten. Im allgemeinen Fall kann man sich das Verfahren auf mehr oder weniger stark veränderte Projektstände vorstellen. Bei Änderungen im Projekt wird die Compiler-Einheit 36 typischerweise unveränderte Variablen an die gleiche Position in der Speichereinheit 24 legen. Neue Variablen werden an neue Speicherpositionen gelegt, gelöschte Variablen geben dagegen Speicher frei. Dadurch kann es auch zu ungenützten Lücken im Speicher kommen. Durch falsch verwendet Arrayzugriffe oder Pointerzugriffe kann es daher auch zu Veränderungen in ungenütztem Speicher kommen, der keinem Instanzpfad zugeordnet werden kann.The example performed here represents a special case in which all variables retain their storage space. In general, one can imagine the procedure for project statuses that have changed to a greater or lesser extent. In the event of changes in the project, the compiler unit 36 will typically place unchanged variables in the same position in the memory unit 24. New variables are placed in new memory locations, while deleted variables free up memory. This can also lead to unused gaps in memory. Incorrectly used array accesses or pointer accesses can also result in changes in unused memory that cannot be assigned to an instance path.

Die Differenzliste gemäß Tabelle 5 kann daher beispielsweise Änderungen der folgenden Art enthalten:

  1. 1. Ein Wert an einer Speicherstelle wurde geändert.
  2. 2. Ein Instanzpfad wurde hinzugefügt.
  3. 3. Ein Instanzpfad wurde gelöscht.
  4. 4. Ein Instanzpfad wurde im Speicher verschoben mit Wertänderung.
  5. 5. Ein Instanzpfad wurde im Speicher verschoben ohne Wertänderung.
The difference list according to Table 5 can therefore contain changes of the following type, for example:
  1. 1. A value at a location has been changed.
  2. 2. Added an instance path.
  3. 3. An instance path has been deleted.
  4. 4. An instance path was moved in memory with value change.
  5. 5. An instance path was moved in memory with no value change.

Die Änderung 1 kann mit anderen Änderungen kombiniert vorkommen:

  1. a) Ein Wert hat sich geändert und liegt in einem neu hinzugefügten Instanzpfad.
  2. b) Ein Wert hat sich geändert und liegt in einem gelöschten Instanzpfad.
  3. c) Ein Wert hat sich geändert und liegt in zwei unterschiedlichen Instanzpfaden.
  4. d) Ein Wert hat sich geändert bei gleichbleibendem Instanzpfad.
  5. e) Ein Wert hat sich in einem Speicher ohne zugehörigen Instanzpfad geändert.
Change 1 can be combined with other changes:
  1. a) A value has changed and is in a newly added instance path.
  2. b) A value has changed and is in a deleted instance path.
  3. c) A value has changed and is in two different instance paths.
  4. d) A value has changed while the instance path remains the same.
  5. e) A value has changed in a memory without an associated instance path.

Die Änderungen a), b) und c) können durch das vorangehend beschriebene Verfahren erkannt werden, sind jedoch für viele praktische Anwendungen vermutlich nicht relevant: Wenn sich ein Instanzpfad ändert, dann ist auch eine Wertänderung zu erwarten. Es kann daher in einigen Anwendungen sinnvoll sein, diese Änderungen aus der Differenzliste gemäß Tabelle 5 zu löschen oder die Tabelle für den Nutzer entsprechend zu filtern. Die sich ergebende Liste von Änderungen kann dem Nutzer in geeigneter Weise präsentiert werden, zum Beispiel als einfache Tabelle auf der Anzeigeeinheit 44 an der speicherprogrammierbaren Steuerungseinheit 16 und/oder an der Programmierumgebung 26. Zusätzlich kann es für einige Anwendungen sinnvoll sein, geänderte Variablen direkt in der Debugging-Umgebung der Programmierschnittstelle 30 optisch, beispielsweise durch eine geeignete Farbe, hervorzuheben und die geänderten Werte als Wertepaar direkt einzublenden oder auf Anforderung des Programmierers auszugeben.The changes a), b) and c) can be detected using the method described above, but are probably not relevant for many practical applications: If an instance path changes, then a value change is also to be expected. It can therefore be useful in some applications to delete these changes from the difference list according to Table 5 or to filter the table accordingly for the user. The resulting list of changes can be presented to the user in a suitable manner, for example as a simple table on the display unit 44 on the programmable logic controller unit 16 and/or on the programming environment 26. In addition, for some applications it can be useful to enter changed variables directly in the debugging environment of the programming interface 30 optically, for example with a suitable color, and to display the changed values directly as a value pair or to output them at the request of the programmer.

In gleicher Art wie hier dargestellt, können auch Variablen auf dem Stack verglichen werden, insbesondere falls der Aufrufstack in beiden Speicherabzügen der gleiche ist, beispielsweise falls die gleichen Funktionen aufgerufen werden.In the same way as shown here, variables on the stack can also be compared, especially if the call stack is the same in both dumps, for example if the same functions are called.

Die vorgestellten Verfahren und Vorrichtungen können auch für (statistische) Analysen oder Tests der Funktionsweise der speicherprogrammierbaren Steuerungseinheit 16 bzw. der von der speicherprogrammierbaren Steuerungseinheit 16 gesteuerten Anlage, zum Beispiel des Portalkrans 12, eingesetzt werden.The methods and devices presented can also be used for (statistical) analyzes or tests of the functioning of the programmable logic control unit 16 or the system controlled by the programmable logic control unit 16, for example the gantry crane 12.

Maschinensteuerungen durch speicherprogrammierbare Steuerungen 16 laufen in vielen für die Praxis wichtigen Anwendungen zyklisch ab. Durch Speicherabzüge, die an einer geeigneten Stelle in solch einem zyklischen Ablauf genommen werden, lassen sich durch die oben beschriebene Differenzanalyse empirisch wertvolle Daten gewinnen.Machine controls by programmable logic controllers 16 run cyclically in many applications that are important in practice. Empirically valuable data can be obtained through the above-described differential analysis by means of dumps taken at a suitable point in such a cyclic sequence.

Zu diesem Zweck kann beispielsweise in Ausführungsformen immer zu einem vorgegebenen Zeitpunkt im Maschinenzyklus selbsttätig durch die Speichervergleichs-Vorrichtung 38 ein Speicherabzug ausgelöst werden, dieser Speicherabzug mit einem ersten Referenzspeicherabzug verglichen werden und die nach dem vorangehend beschriebenen Verfahren erzeugte Differenzliste gemäß Tabelle 5 gespeichert werden. Während eines Referenzbetriebs der Maschine können auf entsprechende Weise eine Vielzahl solcher Differenzlisten gewonnen werden. Diese Differenzlisten können nun für jeden Datenpunkt auf ihre Eigenschaften untersucht werden, bspw.:

  • • Hat der Datenpunkt zu diesem vorgegebenen Zeitpunkt immer den gleichen Wert?
  • • Wenn sich die Werte des Datenpunkts ändern: Wie sind diese Werte verteilt? Gibt es bspw. eine Normalverteilung der Werte um einen Mittelwert?
For this purpose, for example, in embodiments, a memory dump can always be triggered automatically by the memory comparison device 38 at a predetermined point in time in the machine cycle, this memory dump can be compared with a first reference memory dump and the difference list generated according to the method described above can be saved according to Table 5. A large number of such difference lists can be obtained in a corresponding manner during a reference operation of the machine. These difference lists can now be examined for their properties for each data point, e.g.:
  • • Does the data point always have the same value at this specified point in time?
  • • If the values of the data point change: How are these values distributed? For example, is there a normal distribution of the values around a mean?

Hat ein Datenpunkt eine der beiden Eigenschaften, dann kann man für diesen Datenpunkt eine Regel generieren, anhand derer später überprüft werden kann, ob diese Eigenschaft auch im weiteren Betrieb der speicherprogrammierbaren Steuerungseinheit 16 bzw. der von der speicherprogrammierbaren Steuerungseinheit 16 gesteuerten Anlage noch gilt.If a data point has one of the two properties, then a rule can be generated for this data point, which can be used later to check whether this property still applies during further operation of the programmable logic controller 16 or the system controlled by the programmable logic controller 16.

Weitere zu überprüfende Eigenschaften können sein:

  • • Hat ein Datum, das sich bisher nie geändert hatte, auf einmal einen neuen Wert?
  • • Liegt ein Datum, das in einem bestimmten Bereich liegen sollte, deutlich außerhalb dieses Bereichs?
  • • Hat sich über einen gewissen Zeitraum die Normalverteilung der Werte eines Datums deutlich verschoben?
Other properties to be checked can be:
  • • Does a date that has never changed suddenly have a new value?
  • • Is a date that should be in a certain range significantly outside of that range?
  • • Has the normal distribution of the values of a date shifted significantly over a certain period of time?

Diese Regeln können beispielsweise in einer von Menschen lesbaren Form generiert werden, so dass ein Nutzer diese Regeln überprüfen kann. Beispielsweise wäre es möglich, dass der Referenzbetrieb zur Gewinnung der Regeln immer in der Nachtschicht durchgeführt wird, so dass das System daraus eine Regel für die Uhrzeit generiert, die nicht sinnvoll wäre.For example, these rules may be generated in a human-readable form so that a user can review these rules. For example, it would be possible that the reference operation for obtaining the rules is always carried out during the night shift, so that the system uses this to generate a rule for the time that would not make sense.

Während der normalen Betriebsphase der Maschine kann die Speichervergleichs-Vorrichtung 38 anhand dieser Regeln dann den ordnungsgemäßen Ablauf der speicherprogrammierbaren Steuerungseinheit 16 überwachen. Bei Verletzung einer Regel kann bspw. eine Warnung ausgegeben werden. Der Anlagenbetreiber kann dann überprüfen, ob es durch Verletzung der Regel zu einem Schaden an der gesteuerten Anlage, bspw. an dem Portalkran 12, kommen kann und gegebenenfalls die Anlage abstellen und eingehender untersuchen.During the normal operating phase of the machine, the memory comparison device 38 can then use these rules to monitor the correct operation of the programmable logic controller 16. If a rule is violated, for example, a warning can be issued. The system operator can then check whether violation of the rule can result in damage to the controlled system, for example to the gantry crane 12, and, if necessary, shut down the system and examine it more closely.

Auf diese Weise könnten beispielsweise Verschleißerscheinungen an beweglichen Teilen der Anlage im Sinne eines sog. „predictive maintenance“ deutlich früher erkannt werden. Insbesondere können Fehlzustände einer Anlage bereits erkannt werden, bevor es zu einem Schaden an der Anlage kommen kann.In this way, for example, signs of wear on moving parts of the system could be detected much earlier in the sense of what is known as “predictive maintenance”. In particular, malfunctions in a system can already be detected before the system can be damaged.

Es ist auch zu erwarten, dass allein durch die Analyse solcher Regelsätze hilfreiche Einsichten über die Eigenschaften des Systems zu gewinnen sind. Wenn beispielsweise ein Steuerungsprojekt Code enthält, der nie ausgeführt wird, und dadurch Daten, die sich nie ändern, erzeugt, dann könnte das durch die gewonnenen Regelsätze erkannt und das Steuerungsprojekt entsprechend überarbeitet werden.It is also to be expected that just by analyzing such rule sets, helpful insights into the properties of the system can be gained. If, for example, a control project contains code that is never executed and thus generates data that never changes, then this could be recognized by the rule sets obtained and the control project revised accordingly.

Des Weiteren können die mit dem offenbarungsgemäßen Verfahren gewonnenen Information dazu verwendet werden, um Tests zu verifizieren. Dazu kann die Speichereinheit 24 beispielsweise durch Speicherabzüge vor und nach einem funktionalen Test verglichen werden, um die Auswirkungen einer getesteten Funktionalität zu prüfen.Furthermore, the information obtained with the method according to the disclosure can be used to verify tests. For this purpose, the memory unit 24 can be compared, for example, using memory dumps before and after a functional test, in order to check the effects of a tested functionality.

Der Tester erzeugt dazu beispielsweise den ersten Speicherabzug vor einem Test und den zweiten Speicherabzug nach Ausführung des Tests. Er erzeugt dann aus den beiden Speicherabzügen die vorangehend beschriebene Differenzliste gemäß Tabelle 5 und prüft, ob der Test die gewünschten Auswirkungen hatte.For this purpose, the tester creates, for example, the first memory dump before a test and the second memory dump after the test has been carried out. From the two memory dumps, he then creates the difference list described above in accordance with Table 5 and checks whether the test had the desired effects.

Er kann die Differenzliste zu seinem Test auch speichern. Weitere Durchführungen des Tests könnten dann automatisiert erfolgen, wobei automatisch ein Speicherabzug vor dem Test erzeugt, der Test ausgeführt und automatisch ein Speicherabzug nach dem Test erzeugt wird. Es wird dann automatisch die Differenzliste aus den beiden Speicherabzügen erzeugt und mit der Differenzliste des Tests verglichen. Der Test schlägt fehl, wenn die Differenzliste nicht identisch zur ursprünglichen Differenzliste ist. In einem solchen Fall kann der Tester durch Ausgabe eines Warnsignals informiert werden und den durchgeführten Test manuell überprüfen.He can also save the difference list for his test. Further executions of the test could then be automated, with a memory dump being automatically generated before the test, the test being executed and a memory dump being automatically generated after the test. The difference list is then automatically generated from the two memory dumps and compared with the difference list of the test. The test fails if the difference list is not identical to the original difference list. In such a case, the tester can be informed by issuing a warning signal and can manually check the test that has been carried out.

Die vorangehend beschriebenen Ausführungsformen und die Zeichnungen dienen lediglich der Erläuterung der erfindungsgemäßen Lösung und der mit der erfindungsgemäßen Lösung erzielbaren Vorteile, sollen die Erfindung aber nicht beschränken. Der Schutzumfang ergibt sich aus den anliegenden Ansprüchen.The embodiments described above and the drawings only serve to explain the solution according to the invention and the advantages that can be achieved with the solution according to the invention, but are not intended to limit the invention. The scope of protection results from the appended claims.

BezugszeichenlisteReference List

1010
industrielle Steuerungsumgebungindustrial control environment
1212
Portalkrangantry crane
1414
Hakenbaugruppe des Portalkrans 12Gantry crane hook assembly 12
1616
speicherprogrammierbare Steuerungseinheitprogrammable logic controller
1818
Steuerleitungcontrol line
2020
Verarbeitungseinheitprocessing unit
2222
Kommunikationsschnittstellecommunication interface
2424
Speichereinheitstorage unit
2626
Programmierumgebungprogramming environment
2828
Netzwerknetwork
3030
Programmierschnittstelleprogramming interface
3232
Programmierspeichereinheitprogramming memory unit
3434
Programmierprozessoreinheitprogramming processor unit
3636
Compiler-Einheitcompiler unit
3838
Speichervergleichs-Vorrichtungmemory compare device
4040
Ausleseeinheitreadout unit
4242
Vergleichseinheitcomparison unit
4444
Anzeigeeinheitdisplay unit

Claims (15)

Verfahren zum Speichervergleichen einer speicherprogrammierbaren Steuerungseinheit (16), umfassend: Erzeugen eines ersten Speicherabzugs eines Speichers (24) der speicherprogrammierbaren Steuerungseinheit (16), wobei der erste Speicherabzug einem ersten Zustand der speicherprogrammierbaren Steuerungseinheit (16) zu einem ersten Zeitpunkt entspricht, wobei der erste Speicherabzug eine erste Mehrzahl von Variablenidentifikatoren eines Steuerungsprojekts für die speicherprogrammierbare Steuerungseinheit (16) und zu jedem der ersten Mehrzahl von Variablenidentifikatoren einen zugeordneten ersten Wert umfasst, wobei zu jedem der ersten Mehrzahl von Variablenidentifikatoren in dem Speicher (24) eine Speicherposition statisch alloziert ist; Erzeugen eines zweiten Speicherabzugs des Speichers (24) der speicherprogrammierbaren Steuerungseinheit (16), wobei der zweite Speicherabzug einem zweiten Zustand der speicherprogrammierbaren Steuerungseinheit (16) zu einem zweiten Zeitpunkt entspricht, wobei der zweite Zeitpunkt sich von dem ersten Zeitpunkt unterscheidet, wobei der zweite Speicherabzug eine zweite Mehrzahl von Variablenidentifikatoren des Steuerungsprojekts und zu jedem der zweiten Mehrzahl von Variablenidentifikatoren einen zugeordneten zweiten Wert umfasst, wobei zu jedem der zweiten Mehrzahl von Variablenidentifikatoren in dem Speicher (24) eine Speicherposition statisch alloziert ist; und Vergleichen der zweiten Werte mit den ersten Werten.A method for memory comparing a programmable logic controller (16), comprising: Generating a first memory dump of a memory (24) of the programmable logic controller (16), the first memory dump corresponding to a first state of the programmable logic controller (16) at a first point in time, the first memory dump having a first plurality of variable identifiers of a control project for the programmable logic controller (16) and each of said first plurality of variable identifiers has an associated first value, each of said first plurality of variable identifiers having a memory location statically allocated in said memory (24); Generating a second memory dump of the memory (24) of the programmable logic controller (16), the second memory dump corresponding to a second state of the programmable logic controller (16) at a second point in time, the second point in time differing from the first point in time, the second memory dump a second plurality of variable identifiers of the control project and a second value associated with each of the second plurality of variable identifiers, each of the second plurality of variable identifiers having a memory location statically allocated in the memory (24); and Compare the second values with the first values. Verfahren nach Anspruch 1, ferner umfassend: Anzeigen eines Ergebnisses des Vergleichens der zweiten Werte mit den ersten Werten, insbesondere auf einer Sichtanzeige (44).procedure after claim 1 , further comprising: displaying a result of the comparison of the second values with the first values, in particular on a visual display (44). Verfahren nach einem der vorangehenden Ansprüche, wobei das Erzeugen des ersten Speicherabzugs umfasst: Bestimmen der ersten Mehrzahl von Variablenidentifikatoren; Bestimmen der der ersten Mehrzahl von Variablenidentifikatoren in dem Speicher (24) zugeordneten Speicherpositionen; und Auslesen der Werte der ersten Mehrzahl von Variablenidentifikatoren an den der ersten Mehrzahl von Variablenidentifikatoren in dem Speicher (24) zugeordneten Speicherpositionen.A method according to any one of the preceding claims, wherein generating the first memory dump comprises: determining the first plurality of variable identifiers; determining the storage locations associated with the first plurality of variable identifiers in the memory (24); and reading out the values of the first plurality of variable identifiers at the memory locations associated with the first plurality of variable identifiers in the memory (24). Verfahren nach Anspruch 3, wobei das Bestimmen der ersten Mehrzahl von Variablenidentifikatoren ein Auswählen einer ersten Mehrzahl von Variablen des Steuerungsprojekts, insbesondere ein Auswählen einer ersten Mehrzahl von Variablen aus einem Programmcode eines Steuerungsprogramms für die speicherprogrammierbare Steuerungseinheit (16), umfasst.procedure after claim 3 , wherein the determination of the first plurality of variable identifiers comprises a selection of a first plurality of variables of the control project, in particular a selection of a first plurality of variables from a program code of a control program for the programmable logic controller (16). Verfahren nach Anspruch 3 oder 4, wobei das Bestimmen der ersten Mehrzahl von Variablenidentifikatoren ein Erstellen von Instanzpfaden umfasst, die einer ersten Mehrzahl von Variablen des Steuerungsprojekts zugeordnet sind.procedure after claim 3 or 4 , wherein determining the first plurality of variable identifiers comprises creating instance paths associated with a first plurality of variables of the controller project. Verfahren nach einem der Ansprüche 3 bis 5, wobei das Bestimmen der der ersten Mehrzahl von Variablenidentifikatoren in dem Speicher (24) zugeordneten Speicherpositionen mittels einer Zuordnungstabelle erfolgt, insbesondere mittels einer bei einem Kompilieren des Steuerungsprojekts erstellten Zuordnungstabelle.Procedure according to one of claims 3 until 5 , wherein determining the storage positions associated with the first plurality of variable identifiers in the memory (24) by means of an allocation key Belle takes place, in particular by means of an assignment table created when compiling the control project. Verfahren nach einem der vorangehenden Ansprüche, umfassend: Modifizieren des Steuerungsprojekts, insbesondere eines Steuerungsprogramms des Steuerungsprojekts, um ein modifiziertes Steuerungsprojekt für die speicherprogrammierbare Steuerungseinheit (16) zu erhalten, zwischen dem ersten Zeitpunkt und dem zweiten Zeitpunkt.A method according to any one of the preceding claims, comprising: Modifying the control project, in particular a control program of the control project, in order to obtain a modified control project for the programmable logic controller (16), between the first point in time and the second point in time. Verfahren nach einem der vorangehenden Ansprüche, umfassend: Erzeugen eines dritten Speicherabzugs und ggf. weiterer nachfolgender Speicherabzüge des Speichers (24) der speicherprogrammierbaren Steuerungseinheit (16), wobei der dritte Speicherabzug einem dritten Zustand der speicherprogrammierbaren Steuerungseinheit (16) zu einem dritten Zeitpunkt entspricht, der sich von dem ersten Zeitpunkt und dem zweiten Zeitpunkt unterscheidet, wobei der dritte Speicherabzug eine dritte Mehrzahl von Variablenidentifikatoren des Steuerungsprojekts und zu jedem der dritten Mehrzahl von Variablenidentifikatoren einen zugeordneten dritten Wert umfasst, wobei zu jedem der dritten Mehrzahl von Variablenidentifikatoren in dem Speicher (24) eine Speicherposition statisch alloziert ist; und Vergleichen der dritten Werte mit den ersten Werten und/oder den zweiten Werten.A method according to any one of the preceding claims, comprising: Generating a third memory dump and possibly further subsequent memory dumps of the memory (24) of the programmable logic controller (16), the third memory dump corresponding to a third state of the programmable logic controller (16) at a third point in time, which differs from the first point in time and the second Time differs, wherein the third memory dump comprises a third plurality of variable identifiers of the control project and an associated third value for each of the third plurality of variable identifiers, wherein a memory position is statically allocated to each of the third plurality of variable identifiers in the memory (24); and Comparing the third values with the first values and/or the second values. Rechnerprogramm mit rechnerlesbaren Instruktionen, wobei die rechnerlesbaren Instruktionen dazu eingerichtet sind, beim Ausführen in einem Rechner (20, 34), insbesondere in einem mit einer speicherprogrammierbaren Steuerungseinheit (16) gekoppelten Rechner (20, 34), ein Verfahren nach einem der vorangehenden Ansprüche auszuführen.Computer program with computer-readable instructions, the computer-readable instructions being set up to execute a method according to one of the preceding claims when executed in a computer (20, 34), in particular in a computer (20, 34) coupled to a programmable logic controller (16). . Vorrichtung (38) zum Speichervergleichen einer speicherprogrammierbaren Steuerungseinheit (16), umfassend: eine Ausleseeinheit (40), welche dazu eingerichtet ist, auf einen Speicher (24) einer speicherprogrammierbaren Steuerungseinheit (16) zuzugreifen und zu einem ersten Zeitpunkt einen ersten Speicherabzug und zu einem zweiten Zeitpunkt, der sich von dem ersten Zeitpunkt unterscheidet, einen zweiten Speicherabzug des Speichers (24) der speicherprogrammierbaren Steuerungseinheit (16) zu erzeugen; wobei der erste Speicherabzug einem ersten Zustand der speicherprogrammierbaren Steuerungseinheit (16) zu dem ersten Zeitpunkt entspricht, wobei der erste Speicherabzug eine erste Mehrzahl von Variablenidentifikatoren eines Steuerungsprojekts für die speicherprogrammierbare Steuerungseinheit (16) und zu jedem der ersten Mehrzahl von Variablenidentifikatoren einen zugeordneten ersten Wert umfasst; wobei der zweite Speicherabzug einem zweiten Zustand der speicherprogrammierbaren Steuerungseinheit (16) zu dem zweiten Zeitpunkt entspricht, wobei der zweite Speicherabzug eine zweite Mehrzahl von Variablenidentifikatoren des Steuerungsprojekts und zu jedem der zweiten Mehrzahl von Variablenidentifikatoren einen zugeordneten zweiten Wert umfasst; und wobei zu jedem der ersten Mehrzahl von Variablenidentifikatoren und der zweiten Mehrzahl von Variablenidentifikatoren in dem Speicher (24) eine Speicherposition statisch alloziert ist; und eine Vergleichseinheit (42), welche zum Vergleichen der zweiten Werte mit den ersten Werten eingerichtet ist.Apparatus (38) for memory comparison of a programmable logic controller (16), comprising: a readout unit (40), which is set up to access a memory (24) of a programmable logic controller (16) and at a first point in time a first memory dump and at a second point in time, which differs from the first point in time, a second memory dump of to generate memory (24) of the programmable logic controller unit (16); wherein the first memory dump corresponds to a first state of the programmable logic controller (16) at the first point in time, wherein the first memory dump comprises a first plurality of variable identifiers of a control project for the programmable logic controller (16) and an associated first value for each of the first plurality of variable identifiers ; wherein the second memory dump corresponds to a second state of the programmable logic controller (16) at the second time, wherein the second memory dump comprises a second plurality of variable identifiers of the control project and a second value associated with each of the second plurality of variable identifiers; and each of said first plurality of variable identifiers and said second plurality of variable identifiers having a memory location statically allocated in said memory (24); and a comparison unit (42) which is set up to compare the second values with the first values. Vorrichtung (38) nach Anspruch 10 mit: einer Anzeigeeinheit (44), welche zum Anzeigen eines Ergebnisses des Vergleichens der zweiten Werte mit den ersten Werten eingerichtet ist.Device (38) after claim 10 comprising: a display unit (44) arranged to display a result of comparing the second values with the first values. Vorrichtung (38) nach Anspruch 10 oder 11, wobei die Ausleseeinheit (40) eingerichtet ist zum Bestimmen der ersten Mehrzahl von Variablenidentifikatoren; zum Bestimmen der der ersten Mehrzahl von Variablenidentifikatoren in dem Speicher (24) zugeordneten Speicherpositionen; und zum Auslesen der Werte der ersten Mehrzahl von Variablenidentifikatoren an den der ersten Mehrzahl von Variablenidentifikatoren in dem Speicher (24) zugeordneten Speicherpositionen.Device (38) after claim 10 or 11 , wherein the readout unit (40) is set up to determine the first plurality of variable identifiers; for determining the storage locations associated with the first plurality of variable identifiers in the memory (24); and for reading out the values of the first plurality of variable identifiers in the memory locations associated with the first plurality of variable identifiers in the memory (24). Vorrichtung (38) nach Anspruch 12, wobei das Bestimmen der ersten Mehrzahl von Variablenidentifikatoren ein Auswählen einer ersten Mehrzahl von Variablen des Steuerungsprojekts, insbesondere ein Auswählen einer ersten Mehrzahl von Variablen aus einem Programmcode eines Steuerungsprogramms für die speicherprogrammierbare Steuerungseinheit (16), umfasst.Device (38) after claim 12 , wherein the determination of the first plurality of variable identifiers comprises a selection of a first plurality of variables of the control project, in particular a selection of a first plurality of variables from a program code of a control program for the programmable logic controller (16). Vorrichtung (38) nach Anspruch 12 oder 13, wobei das Bestimmen der ersten Mehrzahl von Variablenidentifikatoren ein Erstellen von Instanzpfaden umfasst, die einer ersten Mehrzahl von Variablen des Steuerungsprojekts zugeordnet sind.Device (38) after claim 12 or 13 , wherein determining the first plurality of variable identifiers comprises creating instance paths associated with a first plurality of variables of the controller project. Vorrichtung (38) nach einem der Ansprüche 12 bis 14, wobei das Bestimmen der der ersten Mehrzahl von Variablenidentifikatoren in dem Speicher (24) zugeordneten Speicherpositionen mittels einer Zuordnungstabelle erfolgt, insbesondere mittels einer bei einem Kompilieren des Steuerungsprojekts erstellten Zuordnungstabelle.Device (38) according to one of Claims 12 until 14 , wherein the determination of the memory positions assigned to the first plurality of variable identifiers in the memory (24) takes place by means of an assignment table, in particular by means of an assignment table created when the control project is compiled.
DE102021112165.5A 2021-05-10 2021-05-10 Memory comparisons of a programmable logic controller Pending DE102021112165A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
DE102021112165.5A DE102021112165A1 (en) 2021-05-10 2021-05-10 Memory comparisons of a programmable logic controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
DE102021112165.5A DE102021112165A1 (en) 2021-05-10 2021-05-10 Memory comparisons of a programmable logic controller

Publications (1)

Publication Number Publication Date
DE102021112165A1 true DE102021112165A1 (en) 2022-11-10

Family

ID=83692257

Family Applications (1)

Application Number Title Priority Date Filing Date
DE102021112165.5A Pending DE102021112165A1 (en) 2021-05-10 2021-05-10 Memory comparisons of a programmable logic controller

Country Status (1)

Country Link
DE (1) DE102021112165A1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050071022A1 (en) 2003-09-30 2005-03-31 Izzo Joseph Paul Safety controller providing rapid recovery of safety program data

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050071022A1 (en) 2003-09-30 2005-03-31 Izzo Joseph Paul Safety controller providing rapid recovery of safety program data

Similar Documents

Publication Publication Date Title
EP1330685B1 (en) Testing method and testing device for starting up systems which are controlled by means of a program logic
EP0753168B1 (en) Process for automatic fault diagnosis
DE69932371T2 (en) Movable instrumentation tags for testing and troubleshooting a computer program
EP0852759B1 (en) Drafting method for industrial and building systems and computer-controlled planning system for use in said method
DE102006056432A1 (en) Method for testing a computer program
EP1265146A2 (en) Debugging method and system
EP2706421A1 (en) Method for the computer-controlled generation of at least a portion of an executable control program
DE102014102551A1 (en) Machine and method for evaluating failed software programs
EP3320431A1 (en) Computer-implemented method for processing data object variants
EP3232327A1 (en) Method for testing a control program of a control unit in a simulation environment on a computer
DE102006040794A1 (en) Software program for implementing testing of e.g. electronic component, has two libraries with respective compiled routine coupled with function call when program is linked and is not linked in mode, respectively
DE112018002316T5 (en) CODE COVERAGE TRACKING FOR A MICROCONTROLLER PROGRAM
DE102021112165A1 (en) Memory comparisons of a programmable logic controller
EP2924522B1 (en) Method for influencing a control program
EP2990941B1 (en) Computer-implemented method for generating a control device program codes and related report management environment
EP1950635B1 (en) Method for operating an automation system
DE102020119853B3 (en) Method for controlling an automation system with visualization of program objects of a control program of the automation system and automation system
DE102005020899A1 (en) Method for preparing test coverage analysis involves testing of a program with several threads of error, which results e.g. from lack of synchronization between the threads with an conflicting access on common resources
DE10057575A1 (en) Method for automatic software regeneration applies an abstract model to the properties of an application made possible by software converting these into software mechanically.
EP0662226B1 (en) Method of processing an application program on a parallel-computer system
EP3929554A1 (en) Improved fault detection in machines using ai
DE102020102996A1 (en) Process for an integrated design for the modeling, simulation and testing of a real-time architecture within a model-based system and software development
EP2998805A1 (en) Method and device for generation of a function block for the monitoring of an industrial automation assembly
EP2634700A1 (en) Method and development environment for monitoring a running program
EP0560342B1 (en) Method for debugging HDL-programs

Legal Events

Date Code Title Description
R012 Request for examination validly filed
R079 Amendment of ipc main class

Free format text: PREVIOUS MAIN CLASS: G06F0009440000

Ipc: G05B0023020000