BE1004928A3 - Computer system for real time control of a process - uses three part program operating under conventional personal computer operating system - Google Patents

Computer system for real time control of a process - uses three part program operating under conventional personal computer operating system Download PDF

Info

Publication number
BE1004928A3
BE1004928A3 BE9200015A BE9200015A BE1004928A3 BE 1004928 A3 BE1004928 A3 BE 1004928A3 BE 9200015 A BE9200015 A BE 9200015A BE 9200015 A BE9200015 A BE 9200015A BE 1004928 A3 BE1004928 A3 BE 1004928A3
Authority
BE
Belgium
Prior art keywords
program
argument
control
function
routine
Prior art date
Application number
BE9200015A
Other languages
Dutch (nl)
Inventor
Luc Andries
Original Assignee
Burndy Electra Nv
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 Burndy Electra Nv filed Critical Burndy Electra Nv
Priority to BE9200015A priority Critical patent/BE1004928A3/en
Application granted granted Critical
Publication of BE1004928A3 publication Critical patent/BE1004928A3/en

Links

Classifications

    • 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/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • 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
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/10Plc systems
    • G05B2219/15Plc structure of the system
    • G05B2219/15079Multitasking, real time multitasking
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/10Plc systems
    • G05B2219/15Plc structure of the system
    • G05B2219/15081Period length ratio between application and communication task is settable

Abstract

The control program has three parts: one part controls communications between the CPU and the man-machine interface, eg keyboard, mouse monitor, etc.; the second part has a series of routine timed control functions for the process; the third part is a switching control program which switches control of the system between the other two parts. The parts of the program all run on a conventional PC equipped with a real time clock and operating under DOS.

Description

BESCHRIJVINGDESCRIPTION

Werkwijze voor het besturen van een systeem met behulp van een computerMethod of controlling a system using a computer

De uitvinding heeft betrekking op een werkwijze voor het besturen van een systeem met behulp van een computer, die is voorzien van een timer, die onderbrekings-impulsen met een bepaalde frequentie af geeft, welke computer onder een gebruikelijk operating system, zoals MS-DOS, werkt.The invention relates to a method for controlling a system using a computer, which is provided with a timer, which delivers interrupt pulses with a certain frequency, which computer under a conventional operating system, such as MS-DOS, works.

Bij de bekende werkwijze van deze soort wordt de computer gebruikt voor gegevensverwerking en eventueel het maken van een nieuw besturingsprogramma, waarbij de feitelijke besturing van het proces plaatsvindt met behulp van afzonderlijke PID-rege-laars, een PLC (Programmable Logic Controller), of een real-time processor. In geval van besturing door een PLC of een real-time processor wordt het besturingsprogramma cyclisch doorlopen en blijft dit besturingsprogramma ongewijzigd tijdens bedrijf van het systeem. De PLC of processor kan gegevens aan de computer leveren, die in de computer worden verwerkt en eventueel op een beeldscherm zichtbaar worden gemaakt.In the known method of this kind, the computer is used for data processing and possibly the creation of a new control program, whereby the actual control of the process takes place with the aid of separate PID controllers, a PLC (Programmable Logic Controller), or a real-time processor. In the case of control by a PLC or a real-time processor, the control program is run cyclically and this control program remains unchanged during operation of the system. The PLC or processor can supply data to the computer, which is processed in the computer and possibly made visible on a screen.

Een dergelijke werkwijze heeft het nadeel, dat het besturingsprogramma niet kan worden gewijzigd tijdens bedrijf van het proces. Het besturingsprogramma ligt vast op de minst flexibele plaats, namelijk in de PID-regelaars of in de lagere programmeertaal van de PLC of real-time processor. Hierdoor moet de gebruiker verschillende programmeertalen beheersen om een besturingsprogramma te ontwikkelen. Bovendien zijn de kosten voor de voor het toepassen van de bekende werkwijze benodigde apparatuur relatief hoog, aangezien zowel PID-regelaars, een PLC of real-time processor als een computer nodig zijn.Such a method has the drawback that the control program cannot be changed during operation of the process. The control program is fixed in the least flexible place, namely in the PID controllers or in the lower programming language of the PLC or real-time processor. This requires the user to master various programming languages to develop a control program. In addition, the costs for the equipment required to apply the known method are relatively high, since both PID controllers, a PLC or real-time processor and a computer are required.

Tot op heden is de deskundige van mening, dat een personal computer niet geschikt is voor het rechtstreeks besturen van een systeem, omdat het gebruikelijke operating system van een computer, zoals DOS, geen real-time operating system is, terwijl één van de belangrijkste eisen voor een besturingsprogramma is dat de besturing real-time is. Onder het gebruikelijke operating system van een personal computer worden de instructies van een programma sequentieel uitgevoerd, waarbij de tijd, die nodig is voor het uitvoeren van bepaalde instructies, zoals bewerkingen met een geheugenschijf, niet vooraf bekend is. Het operating system wacht met het uitvoeren van een volgende instructie tot de voorgaande instructie is uitgevoerd. Hierdoor is het bij het gebruikelijke operating system onmogelijk een responsie van de computer binnen een voorafbepaald tijdinterval te garanderen of te garanderen dat een besturingsfunctie op een voorafbepaald tijdstip wordt uitgevoerd .To date, the expert is of the opinion that a personal computer is not suitable for direct control of a system, because the usual operating system of a computer, such as DOS, is not a real-time operating system, while one of the main requirements for a control program, the control is real-time. Under the usual operating system of a personal computer, the instructions of a program are executed sequentially, the time required to execute certain instructions, such as operations with a memory disk, is not known in advance. The operating system waits to execute another instruction until the previous instruction has been executed. This makes it impossible with the conventional operating system to guarantee a response from the computer within a predetermined time interval or to guarantee that a control function is executed at a predetermined time.

In dit verband wordt opgemerkt, dat onder besturing in real-time wordt verstaan, dat het besturingsprogramma binnen een voorafbepaald tijdinterval moet reageren op een bepaalde gebeurtenis en dat het besturingsprogramma een besturingsfunctie op een voorafbepaald tijdstip met een voorafbepaalde resolutie moet kunnen uitvoeren.In this regard, it is noted that real-time control is understood to mean that the control program must respond to a particular event within a predetermined time interval and that the control program must be able to perform a control function at a predetermined time at a predetermined resolution.

Voorts wordt opgemerkt, dat in de onderhavige octrooiaanvrage onder systeem wordt verstaan een proces, een machine of dergelijke.It is further noted that in the present patent application a system is understood to mean a process, a machine or the like.

De uitvinding beoogt een werkwijze voor het besturen van een systeem van de in de aanhef genoemde soort te verschaffen, waarbij de besturing kan plaatsvinden met behulp van uitsluitend een computer, die rechtstreeks het proces bestuurt via gebruikelijke interface-eenheden, zoals bijvoorbeeld D/A-convertors en A/D-convertors en dergelijke.The object of the invention is to provide a method for controlling a system of the type mentioned in the preamble, wherein the control can take place using only a computer, which directly controls the process via conventional interface units, such as, for example, D / A- converters and A / D converters and the like.

Hiertoe wordt de werkwijze volgens de uitvinding gekenmerkt door een besturingsprogramma, dat drie deelprogramma’s omvat, waarbij een eerste deelprogramma zorgt voor de communicatie met de gebruiker via het toetsenbord en de monitor, voor de verwerking van gegevens, die bestemd zijn voor resp. afkomstig zijn van het systeem en voor de opslag van gegevens in een geheugen en alle overige niet aan de tijd of het systeem gebonden functies, waarbij een tweede deelprogramma een reeks van besturingsfuncties voor het besturen van het systeem met bijbehorende tijdstippen, waarop de respectieve besturingsfuncties moeten worden uitgevoerd, alsmede een routine voor het uitvoeren van de besturingsfuncties omvat en waarbij het derde deelprogramma als schakelprogramma is uitgevoerd, dat van het eerste naar het tweede deelprogramma en omgekeerd schakelt, waarbij de timer van de computer zodanig is geprogrammeerd, dat onderbrekings-impulsen worden afgegeven met een frequentie in overeenstemming met een voor de besturing van het systeem gewenste tijdresolutie, waarbij elke onderbrekings-impuls het uitvoeren van het eerste deelprogramma onderbreekt en het schakelprogramma in werking stelt, welk schakelprogramma een echte tijdklok bijhoudt en overschakelt naar het tweede deelprogamma voor het uitvoeren van de bij het betreffende tijdstip behorende besturingsfunctie, waarbij na het uitvoeren van deze besturingsfunctie wordt teruggekeerd naar de onderbroken programmastap van het eerste deelprogramma.To this end, the method according to the invention is characterized by a control program comprising three subprograms, a first subprogram providing communication with the user via the keyboard and monitor, for the processing of data intended for resp. originate from the system and for storing data in a memory and any other non-time or system related functions, a second subprogram providing a series of control functions for controlling the system with associated times at which the respective control functions including a routine for performing the control functions and the third subprogram is executed as a switching program, which switches from the first to the second subprogram and vice versa, the timer of the computer being programmed so that interrupt pulses are delivered at a frequency corresponding to a time resolution desired for the control of the system, each interrupt pulse interrupting the execution of the first subprogram and triggering the switching program, which switching program maintains a real time clock and switches to the second subprogram for the you it performs the control function associated with the relevant time, returning to the interrupted program step of the first subprogram after this control function has been performed.

De werkwijze volgens de uitvinding berust op het inzicht, dat door het wijzigen van de frequentie van de onderbrekings-impulsen, die door de gebruikelijk timer van de personal computer worden geleverd tijdimpulsen worden verkregen met een zodanige frequentie, dat aan de voor het besturen van het betreffende systeem vereiste tijdresolutie voor het uitvoeren van een besturingsfunctie op een voorafbepaald tijdstip kan worden voldaan. Bij elke onderbrekings-impuls wordt het eerste deelprogramma onderbroken en het schakelprogramma in werking gesteld, dat een echte-tijdklok bijhoudt, waarna het tweede deelprogramma wordt doorlopen voor het uitvoeren van een bij het betreffende tijdstip behorende besturingsfunctie. Hierdoor wordt bereikt, dat de computer in real-time het systeem bestuurt, waarbij slechts één programmeertaal nodig is voor het maken van een besturingsprogramma. Dit besturingsprogramma is goed toegankelijk en kan zo nodig tijdens bedrijf van het systeem via het eerste deelprogramma worden gewijzigd en aangepast. De kosten voor de benodigde apparatuur voor het uitvoeren van de werkwijze zijn relatief laag.The method according to the invention is based on the insight that by changing the frequency of the interrupt pulses supplied by the usual timer of the personal computer, time pulses are obtained with such a frequency that the control pulses are controlled. relevant system resolution required for performing a control function at a predetermined time can be met. At each interrupt pulse, the first subprogram is interrupted and the switching program is initiated, which maintains a real time clock, after which the second subprogram is run to perform a control function associated with the relevant time. This ensures that the computer controls the system in real time, requiring only one programming language to create a control program. This control program is easily accessible and can be modified and adjusted via the first sub-program during system operation, if necessary. The costs for the equipment required to carry out the method are relatively low.

Volgens een voorkeursuitvoeringsvorm van de uitvinding zijn de besturingsfuncties van het tweede deelprogramma opgenomen in een tabel, die is verdeeld in een reeks opeenvolgende gelijke tijdvensters, die elk een besturingsfunctie bevatten, waarbij het tweede deelprogramma een interpreterroutine omvat, die telkens na het overschakelen van het eerste naar het tweede deelprogramma wordt doorlopen, welke interpreterroutine een Indexregister bijhoudt voor het bepalen van een volgend aan te roepen tijdvenster en vervolgens de in dit tijdvenster vastgelegde besturingsfunctie leest, waarna deze besturingsfunctie wordt uitgevoerd, waarbij de interpreterroutine na het uitvoeren van deze besturingsfunctie terugkeert naar het schakelprogramma, dat overschakelt naar de onderbroken programmastap van het eerste deelprogramma. Hierdoor is het aanpassen van het besturingsprogramma relatief eenvoudig, doordat slechts wijzigingen in de tabel van besturingsfuncties behoeven te worden aangebracht.According to a preferred embodiment of the invention, the control functions of the second subprogram are contained in a table, which is divided into a series of consecutive equal time windows, each containing a control function, the second subprogram comprising an interpreter routine, each of which switches after the first to the second subprogram, which interpreter routine maintains an index register for determining a next time window to be called and then reads the control function defined in this time window, after which this control function is executed, the interpreter routine returning to the circuit program, which switches to the interrupted program step of the first subprogram. This makes adjusting the control program relatively simple, because only changes in the table of control functions need to be made.

Bij voorkeur bevat de tabel van besturingsfuncties funetienummers en bijbehorende argumentadressen, waarbij de functienummers verwijzen naar een bibliotheek van besturingsfuncties en de argumentadressen verwijzen naar de geheugenplaatsen van een argumentgeheugen, waarbij de interpreterroutine de besturingsfunctie met het gelezen functienummer doet uitvoeren met de argumenten van het bijbehorende argumentadres. Op deze wijze behoeft voor het wijzigen van een besturingsfunctie slechts het functienummer en het argumentadres in een tijdvenster te worden gewijzigd, waarbij geen wijzigingen in de bibliotheek van besturingsfuncties nodig zijn.Preferably, the table of control functions contains function numbers and associated argument addresses, where the function numbers refer to a library of control functions and the argument addresses refer to the memory locations of an argument memory, where the interpreter routine executes the control function with the read function number with the arguments of the corresponding argument address . In this way, to change a control function, only the function number and argument address need to be changed in a time window, no changes in the library of control functions are required.

Volgens een gunstige uitvoeringsvorm van de uitvinding bestaat elke besturingsfunctie uit een functieroutine met een aantal stappen, waarbij als eerste stap het argument uit het argumentgeheugen wordt gelezen en waarbij als volgende stap een invoer/uitvoer-commando naar het te besturen systeem kan worden uitgevoerd en vervolgens een gegevensverwerking wordt uitge-voerd, waarna de functieroutine terugkeert naar de ïnterpreter-routine.According to a favorable embodiment of the invention, each control function consists of a multi-step function routine, the first step of which is to read the argument from the argument memory and the next step of which is to execute an input / output command to the system to be controlled and then a data processing is performed, after which the function routine returns to the interpreter routine.

De uitvinding wordt hierna nader toegelicht aan de hand van de tekening, waarin enkele stroomdiagrammen ter toelichting van de werkwijze volgens de uitvinding zijn weergegeven.The invention will be explained in more detail below with reference to the drawing, in which some flow diagrams for explaining the method according to the invention are shown.

Fig. 1 is een stroomdiagram van het eerste deelprogramma van een uitvoeringsvorm van de werkwijze volgens de uitvinding.Fig. 1 is a flowchart of the first subprogram of an embodiment of the method of the invention.

Fig. 2 is een stroomdiagram van het bij fig. 1 behorende schakelprogramma.Fig. 2 is a flow chart of the circuit program associated with FIG. 1.

Fig. 3 is eens stroomdiagram van het bij fig. 1 behorende tweede schakelprogramma.Fig. 3 is a flow chart of the second circuit program associated with FIG. 1.

Fig. 4 is een stroomdiagram van een bij fig. 3 behorende functieroutine.Fig. 4 is a flow chart of a function routine associated with FIG. 3.

Fig. 5 geeft schematisch het springen tussen de verschillende deelprogramma's van het besturingsprogramma weer.Fig. 5 schematically shows jumping between the various subprograms of the control program.

Fig. 6 geeft schematisch de toegang van het eerste en tweede deelprogramma tot enkele gemeenschappelijke geheugens weer.Fig. 6 schematically illustrates the access of the first and second subprograms to some common memories.

In fig. 1 is in de vorm van een sterk vereenvoudigd stroomdiagram het eerste deelprogramma van een besturingsprogramma weergegeven voor het besturen van een systeem met behulp van een gebruikelijke personal computer. Dit eerste deelprogramma wordt op gebruikelijke wijze onder het standaard operating system van de computer, zoals bijvoorbeeld MS-DOS, doorlopen, waarbij in elke cyclus het progamma controleert of er via het toetsenbord gegevens zijn ingevoerd, waarna zo nodig één van de andere aangegeven progammastappen wordt uitgevoerd. Dit deelprogramma verzorgt hiermede de communicatie tussen het te besturen systeem en de gebruiker.In Fig. 1, in the form of a highly simplified flow chart, the first sub-program of a control program for controlling a system using a conventional personal computer is shown. This first sub-program is run in the usual way under the standard operating system of the computer, such as MS-DOS, whereby the program checks in every cycle whether data has been entered via the keyboard, after which one of the other indicated program steps is entered if necessary. executed. This subprogram thus provides communication between the system to be controlled and the user.

Zoals in fig. 1 is aangegeven wordt in een eerste programmastap gekeken of invoer via het toetsenbord heeft plaatsgevonden, waarna een gegevensverwerkingsstap wordt doorlopen, waarin berekeningen worden uitgevoerd met gegevens, die via het toetsenbord zijn ingevoerd of van het bestuurde systeem afkomstig kunnen zijn, zoals hierna nog zal blijken. Zo nodig wordt de op een gebruikelijke monitor van de computer weergegeven informatie bijgewerkt. Voorts kan een programmastap worden doorlopen, waarin de verwerkte gegevens en eventuele andere van het bestuurde systeem afkomstige gegevens in een geheugen, zoals bijvoorbeeld een harde schijf, worden opgeslagen.As shown in Fig. 1, a first program step checks whether keyboard input has been made, then goes through a data processing step, in which calculations are performed with data entered via the keyboard or which may be from the controlled system, such as hereafter will appear. If necessary, the information displayed on a common computer monitor is updated. Furthermore, a program step can be completed, in which the processed data and any other data from the controlled system are stored in a memory, such as for instance a hard disk.

Tenslotte omvat dit eerste deelprogramma een aanpas -singsroutine waarmee een wijziging kan worden aangebracht in een tabel van besturingsfuncties, zoals hierna nog nader zal worden toegelicht.Finally, this first sub-program comprises an adaptation routine with which a change can be made to a table of control functions, as will be explained in more detail below.

Aangezien dit eerste deelprogramma onder besturing van het standaard operating system van de computer wordt doorlopen, waardoor het uitvoeren van de verschillende prograramastappen niet op voorafbepaalde tijdstippen kan plaatsvinden, kan dit deelprogramma ook als asynchroon deelprogramma worden aangeduid.Since this first sub-program is run under the control of the standard operating system of the computer, so that the execution of the different program steps cannot take place at predetermined times, this sub-program can also be referred to as an asynchronous sub-program.

De te gebruiken personal computer is uiteraard uitgerust met een zogenaamde timer, die in geval van het bekende MS-DOS of PC-DOS operating system onderbrekings-impulsen afgeeft met een frequentie van ongeveer 18,2 Hz, Bij elke onderbrekings -impuls wordt een standaard DOS-routine doorlopen, waarin de volgende functies worden uitgevoerd: - het bijhouden van de DOS-klok; - het melden van een datum-verandering; - het zo nodig afzetten van een aandrijfmotor van de diskette-eenheid.The personal computer to be used is of course equipped with a so-called timer, which, in the case of the known MS-DOS or PC-DOS operating system, delivers interrupt pulses with a frequency of approximately 18.2 Hz. With each interrupt pulse a standard Run through DOS routine, which performs the following functions: - keeping the DOS clock; - reporting a date change; - if necessary, switching off a drive motor of the floppy disk unit.

De frequentie, waarmee de timer onderbrekings-impulsen af geeft, kan door programmeren worden gewijzigd. Volgens de uitvinding wordt deze frequentie zodanig gekozen, dat aan de voor het te besturen proces vereiste tijdresolutie voor het uitvoeren van de verschillende besturingsfuncties wordt voldaan. Zoals in fig. 5 schematisch is aangeduid, wordt het uitvoeren van het eerste deelprogramma telkens door een onderbrekings-impuls van de timer onderbroken en wordt een schakelprogramma, dat als ”timer Interrupt handler” kan worden aangeduid, doorlopen, welk schakel-programma de standaard DOS-routine vervangt.The frequency at which the timer delivers interrupt pulses can be changed by programming. According to the invention, this frequency is selected such that the time resolution required for the process to be controlled for performing the various control functions is met. As schematically indicated in Fig. 5, the execution of the first subprogram is interrupted each time by an interruption pulse of the timer and a switching program, which can be referred to as "timer Interrupt handler", is run through, which switching program is the standard DOS routine replaces.

In fig. 2 is een sterk vereenvoudigd stroomdiagram van dit schakelprogramma weergegeven. Zoals uit fig. 2 blijkt wordt na elke onderbrekingsimpuls een eerste programmastap doorlopen, waarin zonodig de functies van de vervangen DOS-routine worden uitgevoerd, zodanig dat deze functies met de oorspronkelijke frequentie van deze DOS-routine worden uitgevoerd. Na deze progammastap wordt een real-time klok bijgehouden en vervolgens naar een tweede deelprogramma overgeschakeld, zoals in fig. 5 schematisch is aangeduid. Nadat het tweede deelprogramma, waarvan een sterk vereenvoudigd stroomdiagram in fig. 3 is weergegeven, is doorlopen, wordt via het schakelprogramma teruggekeerd naar de plaats, waart het eerste deelprogramma was onderbroken. De taak van het schakelprogramma is derhalve het op vaste tijdstippen overschakelen van het eerste deelprogramma naar het tweede deelprogramma. Bij het doorlopen van dit tweede deelprogamma wordt een besturingsfunctie uitgevoerd. Dit betekent, dat telkens op een door de timer voorafbepaald tijdstip een besturingsfunctie kan worden uitgevoerd. Doordat het tweede deelprogramma op vaste tijdstippen wordt doorlopen, kan dit tweede deelprogramma als synchroon deelprogramma worden beschouwd.Fig. 2 shows a greatly simplified flow chart of this circuit program. As shown in FIG. 2, after each interrupt pulse, a first program step is run, in which, if necessary, the functions of the replaced DOS routine are performed, such that these functions are performed at the original frequency of this DOS routine. After this program step, a real-time clock is maintained and then switched to a second sub-program, as shown schematically in Fig. 5. After the second sub-program, a highly simplified flow chart of which is shown in Fig. 3, has been completed, the circuit program returns to the place where the first sub-program was interrupted. The task of the bridging program is therefore to switch from the first sub-program to the second sub-program at fixed times. When running through this second sub-program, a control function is performed. This means that a control function can be performed at a time predetermined by the timer. Because the second sub-program is completed at fixed times, this second sub-program can be regarded as a synchronous sub-program.

Het tweede deelprogramma omvat een routine, die als real-time interpreterroutine kan worden aangeduid en telkens na het overschakelen naar het tweede deelprogramma wordt doorlopen. Voorts omvat het tweede deelprogramma een tabel van besturingsfuncties, die is verdeeld in n opeenvolgende tijdvensters van gelijke lengte. In elk tijdvenster kan een functienummer en een argu-mentadres worden vastgelegd. Zoals in fig. 3 is aangegeven wordt als eerste programmastap van de interpreterroutine een Indexregister bijgehouden, waarvan de inhoud naar het volgende uit te voeren tijdvenster van de tabel van besturingsfuncties verwijst. Het uitvoeren van een besturingsfunctie vindt derhalve op een door het nummer van het bijbehorende tijdvenster bepaald tijdstip plaats. Vervolgens verzorgt de interpreterroutine het lezen van de inhoud van het door het Indexregister aangeduide tijdvenster van de tabel van besturingsfuncties. Zoals hierboven reeds werd opgemerkt bestaat deze inhoud uit een functienummer en een argumentadres, die respectievelijk naar een bibliotheek van functies en een argu-mentgeheugen verwijzen. Vervolgens maakt de interpreterroutine het gelezen tijdvenster vrij, zodat dit tijdvenster beschikbaar wordt voor het invoeren van een nieuw functienummer en nieuw argumentadres voor het tijdstip, dat één volledige doorloopcyclus van de tabel van besturingsfuncties later ligt. Vervolgens springt de interpreterroutine naar de door het functienummer aangegeven besturingsfunctie, welke uit een functieroutine bestaat, waarvan de algemene opbouw in fig. 4 is weergegeven.The second subprogram comprises a routine, which can be referred to as a real-time interpreter routine and which is run after every switch to the second subprogram. Furthermore, the second sub-program comprises a table of control functions, which is divided into n successive time windows of equal length. A function number and an argument address can be defined in each time window. As shown in FIG. 3, an index register is maintained as the first program step of the interpreter routine, the contents of which refer to the next time window of the table of control functions to be executed. The execution of a control function therefore takes place at a time determined by the number of the associated time window. The interpreter routine then reads the contents of the time window indicated by the Index register from the table of control functions. As noted above, this content consists of a function number and an argument address, which refer to a library of functions and an argument memory, respectively. Then, the interpreter routine clears the read time window so that this time window becomes available for entering a new function number and new argument address for the time one complete cycle of the control functions table later. Then, the interpreter routine jumps to the control function indicated by the function number, which consists of a function routine, the general structure of which is shown in Fig. 4.

Zoals uit fig. 4 blijkt is de eerste programmastap van de functieroutine het ophalen van het argument uit de door het argumentadres aangegeven plaats van een argumentgeheugen. Afhankelijk van de soort besturingsfunctie, voert de functieroutine zonodig vervolgens een invoer /uitvoer-commando naar het bestuurde systeem uit. In een volgende programmastap verwerkt de functieroutine gegevens, die verkregen zijn door het uitvoeren van het invoer/uitvoer-commando of van het gelezen argument of uit een gegevens geheugen, dat gemeenschappelijk is voor het eerste en het tweede deelprogramma.As shown in Fig. 4, the first program step of the function routine is to retrieve the argument from the location of an argument memory indicated by the argument address. Depending on the type of control function, the function routine then executes an input / output command to the controlled system, if necessary. In a next program step, the function routine processes data obtained by executing the input / output command or the read argument or from a data memory common to the first and second subprograms.

De functieroutine kan voorts een aanpassingsroutine voor het aanbrengen van een aanpassing in de tabel van besturingsfuncties omvatten, met behulp van welke aanpassingsroutine een nieuwe functie in de tabel van besturingsfuncties wordt opgenomen door in een tijdvenster, behorende bij het tijdstip, waarop de nieuwe functie moet worden uitgevoerd, een functienummer en een argumentadres vast te leggen en in het argumentgeheugen op het betreffende adres het argument te schrijven. Op deze wijze kan de uitgevoerde functie het verloop van de besturing dynamisch veranderen en kan het besturingsprogramma de besturing van het proces aanpassen aan de effecten van de uitgevoerde besturings-handelingen. Hierdoor wordt een zelf-lerend dynamisch besturingsprogramma verkregen.The function routine may further include an adjustment routine for making an adjustment to the control functions table, by means of which adjustment routine a new function is included in the control functions table by entering a time window corresponding to the time at which the new function is to be a function number and an argument address and write the argument in the argument memory at the relevant address. In this way, the function performed can dynamically change the course of the control and the control program can adapt the control of the process to the effects of the control operations performed. This provides a self-learning dynamic control program.

Het argument van de besturingsfunctie kan bijvoorbeeld ook datum en tijdstip bevatten, waarop deze functie, bijvoorbeeld het inschakelen van een verwarmingselement, moet worden uitgevoerd. Wanneer bij vergelijking van deze gewenste datum en tijdstip met de real-time klok blijkt, dat deze nog niet zijn aangebroken, kan de besturingsfunctie zichzelf door middel van de aanpassingsroutine weer in een vrij tijdvenster vastleggen.The control function argument can, for example, also contain the date and time at which this function, for example switching on a heating element, is to be executed. If, when comparing this desired date and time with the real-time clock, it appears that these have not yet arrived, the control function can again register itself in a free time window by means of the adjustment routine.

Zoals hierboven reeds werd vermeld, omvat het eerste deelprogramma dezelfde aanpassingsroutine. Hierdoor kan de gebruiker interactief tijdens bedrijf van het systeem veranderingen in het besturingsprogramma aanbrengen.As mentioned above, the first sub-program includes the same adjustment routine. This allows the user to interactively make changes to the control program during system operation.

Het is mogelijk, dat de aanpassingsroutine bij het zoeken naar een vrij tijdvenster op het gewenste tijdstip voor het uitvoeren van de nieuwe besturingsfunctie geen vrij tijdvenster kan vinden. In dat geval onderzoekt de aanpassingsroutine met behulp van een prioriteitsschema, waarin de prioriteiten voor de verschillende besturingsfuncties zijn vastgelegd, of de nieuwe besturingsfunctie dan wel de reeds in het gewenste tijdvenster vastgelegde besturingsfunctie moet worden vastgelegd in een alternatief vrij tijdvenster, waarvan het bijbehorende tijdstip het gewenste tijdstip zo goed mogelijk benadert. Bij het zoeken naar een alternatief vrij tijdvenster zijn in afhankelijkheid van het prioriteitsschema ook verdere verschuivingen van besturingsfuncties binnen de tabel van besturingsfuncties mogelijk.It is possible that the matching routine cannot find a free time window when searching for a free time window at the desired time to execute the new control function. In that case, using a priority scheme, in which the priorities for the various control functions are set, the adjustment routine examines whether the new control function or the control function already stored in the desired time window must be stored in an alternative free time window, the corresponding time of which the approaches the desired time as closely as possible. Depending on the priority scheme, when looking for an alternative free time window, further shifts of control functions within the table of control functions are also possible.

Nadat de functieroutine de plaats in het argument-geheugen met het betreffende argumentadres heeft vrijgemaakt wordt teruggekeerd naar de interpreterroutine en van de inter-preterroutine naar het schakelprogramma, waarna het schakelpro-gramma weer terugkeert naar het eerste programmadeel en wel de plaats waar dit programmadeel door de onderbrekings -impuls werd onderbroken.After the function routine has cleared the place in the argument memory with the relevant argument address, it is returned to the interpreter routine and from the interpreter routine to the circuit program, after which the circuit program returns to the first program part, namely the place where this program part the interrupt pulse was interrupted.

Het is wenselijk dat de eyclustijd voor het doorlopen van het sehakelprogramma, het tweede deelprogramma en de funetie-routine uiteraard korter is dan het tijdinterval tussen twee onder-brekings-impulsen. Het is echter ook mogelijk meer dan één tijd-venster toe te wijzen aan een uit te voeren besturingsfunctie.It is desirable that the cycle time for running the switch program, the second sub-program and the function routine is, of course, shorter than the time interval between two interrupt pulses. However, it is also possible to assign more than one time window to a control function to be executed.

Met het besturingsprogamma volgens de uitvinding wordt het mogelijk een gebruikelijke personal computer te benutten voor het real-time besturen van een systeem, doordat bij elke onderbrekings-impuls en derhalve op voorafbepaalde tijdstippen telkens een besturingsfunctie kan worden uitgevoerd.The control program according to the invention makes it possible to use a conventional personal computer for real-time control of a system, because a control function can be performed at each interrupt pulse and therefore at predetermined times.

Zoals in fig. 6 sterk schematisch is aangegeven, hebben het eerste deelprogamma en het tweede deelprogramma enkele gemeenschappelijke geheugens, waardoor de gebruiker via het eerste deelprogramma enerzijds gegevens over het bestuurde proces ontvangt en anderzijds tijdens bedrijf wijzigingen in het besturingsprogramma kan aanbrengen. Zoals uit fig. 6 blijkt hebben beide deelprogramma's toegang tot de tabel van besturingsfuncties, het argumentgeheugen en een gegevensgeheugen.As strongly schematically indicated in Fig. 6, the first subprogram and the second subprogram have some common memories, as a result of which the user receives data about the controlled process via the first subprogram and on the other hand can make changes to the control program during operation. As can be seen from Fig. 6, both subprograms have access to the table of control functions, the argument memory and a data memory.

Hoewel bij het beschreven uitvoeringsvoorbeeld is aangegeven, dat het tijdvenster en bijbehorend argumentadres telkens worden vrijgemaakt na het uitvoer van de betreffende besturingsfunctie is het ook mogelijk een vaste reeks van besturingsfuncties te doorlopen zonder telkens wijzigingen aan te brengen.Although in the described exemplary embodiment it is indicated that the time window and associated argument address are always released after the execution of the respective control function, it is also possible to run through a fixed series of control functions without making changes each time.

De uitvinding is niet beperkt tot het in het voorgaande beschreven uitvoeringsvoorbeeld, dat binnen het kader der uitvinding op verschillende manieren kan worden gevarieerd.The invention is not limited to the exemplary embodiment described above, which can be varied in a number of ways within the scope of the invention.

Claims (10)

1. Werkwijze voor het besturen van een systeem met behulp van een computer, die is voorzien van een timer, die onder-brekings-impulsen met een bepaalde frequentie af geeft, welke computer onder een gebruikelijk operating system, zoals MS-DOS, werkt, gekenmerkt door een besturingsprogramma, dat drie deelprogramma’s omvat, waarbij een eerste deelprogamma zorgt voor de communicatie met de gebruiker via het toetsenbord en de monitor, voor de verwerking van gegevens, die bestemd zijn voor resp. afkomstig zijn van het systeem en voor de opslag van gegevens in een geheugen en alle overige niet aan de tijd of het systeem gebonden functies, waarbij een tweede deelprogramma een reeks van besturingsfuncties voor het besturen van het systeem met bijbehorende tijdstippen, waarop respectieve besturingsfuncties moeten worden uitgevoerd, alsmede een routine voor het uitvoeren van de besturingsfuncties omvat en waarbij het derde deelprogramma als schakelprogramma is uitgevoerd, dat van het eerste naar het tweede deelprogramma en omgekeerd schakelt, waarbij de timer van de computer zodanig is geprogrammeerd, dat onderbrekings-impulsen worden afgegeven met een frequentie in overeenstemming met een voor de besturing van het systeem gewenste tijdresolutie, waarbij elke onderbrekings-impuls het uitvoeren van het eerste deelprogramma onderbreekt en het schakelprogramma in werking stelt, welk schakelprogramma een echte tijdklok bijhoudt en overschakelt naar het tweede deelprogramma voor het uitvoeren van de bij het betreffende tijdstip behorende besturingsfunctie, waarbij na het uitvoeren van deze besturingsfunctie wordt teruggekeerd naar de onderbroken progammastap van het eerste deelprogramma.A method of controlling a system using a computer, which is provided with a timer, which delivers interrupt pulses with a certain frequency, which computer operates under a conventional operating system, such as MS-DOS, characterized by a control program comprising three subprograms, a first subprogram providing for communication with the user via the keyboard and monitor, for the processing of data intended for resp. come from the system and store data in a memory and any other non-time or system bound functions, a second subprogram a series of control functions for controlling the system with associated times at which respective control functions are to be including a routine for performing the control functions, the third sub-program being a switching program, which switches from the first to the second sub-program and vice versa, the timer of the computer being programmed to generate interrupt pulses with a frequency corresponding to a time resolution desired for the control of the system, each interrupt pulse interrupting the execution of the first subprogram and triggering the switching program, which switching program maintains a real timer and switches to the second subprogram for the off performing the control function associated with the relevant point in time, after which this control function is returned to the interrupted program step of the first subprogram. 2. Werkwijze volgens conclusie 1, met het kenmerk dat de besturingsfuncties van het tweede deelprogramma zijn opgenomen in een tabel, die is verdeeld in een reeks gelijke tijdven-sters, die elk een besturingsfunctie bevatten, waarbij het tweede deelprogramma een interpreterroutine omvat, die telkens na het overschakelen van het eerste naar het tweede deelprogramma wordt doorlopen, welke interpreterroutine een Indexregister bijhoudt voor het bepalen van een volgend aan te roepen tijdvenster en vervolgens de in dit tijdvenster vastgelegde besturingsfunctie leest, waarna deze besturingsfunctie wordt uitgevoerd, waarbij de interpreterroutine na het uitvoeren van deze besturingsfunctie terugkeert naar het schakelprogramma, dat overschakelt naar de onderbroken programmastap van het eerste deelprogramma.Method according to claim 1, characterized in that the control functions of the second subprogram are contained in a table, which is divided into a series of equal time windows, each containing a control function, the second subprogram comprising an interpreter routine, each of which after switching from the first to the second subprogram, it is run through, which interpreter routine maintains an Index register for determining a next time window to be called and then reads the control function defined in this time window, after which this control function is executed, the interpreter routine after being executed of this control function returns to the circuit program, which switches to the interrupted program step of the first subprogram. 3. Werkwijze volgens conclusie 2, met het kenmerk, dat de tabel van besturingsfuncties functienummers en bijbehorende argumentadressen bevat, waarbij de functienummers verwijzen naar een bibliotheek van besturingsfuncties en de argumentadressen verwijzen naar de geheugenplaatsen van een argumentgeheugen, waarbij de interpreterroutine de besturingsfunctie met het gelezen functienummer doet uitvoeren met de argumenten van het bijbehorende argumentadres.Method according to claim 2, characterized in that the table of control functions contains function numbers and associated argument addresses, the function numbers refer to a library of control functions and the argument addresses refer to the memory locations of an argument memory, the interpreter routine having the control function with the read function number with the arguments of the corresponding argument address. 4. Werkwijze volgens conclusie 3, met het kenmerk, dat elke besturingsfunctie bestaat uit een functieroutine met een aantal stappen, waarbij als eerste stap het argument uit het argumentgeheugen wordt gelezen en waarbij als volgende stap een invoer/uitvoer-commando naar het te besturen systeem kan worden uitgevoerd en vervolgens een gegevensverwerking wordt uitgevoerd, waarna de functieroutine terugkeert naar de interpreterroutine .Method according to claim 3, characterized in that each control function consists of a multi-step function routine, the first step of which is to read the argument from the argument memory and the next step of which is an input / output command to the system to be controlled can be executed and then data processing is performed, after which the function routine returns to the interpreter routine. 5. Werkwijze volgens conclusie 3 en 4, met het kenmerk, dat de genoemde interpreterroutine van het tweede deelpro-gamma na het aanroepen van het betreffende tijdvenster de inhoud van dit tijdvenster vrijmaakt voor een nieuwe besturingsfunctie, terwijl de functieroutine het argumentadres vrijmaakt voor een nieuw argument.Method according to claims 3 and 4, characterized in that said interpreter routine of the second subpro-gamma after calling the respective time window frees the contents of this time window for a new control function, while the function routine frees the argument address for a new argument. 6. Werkwijze volgens conclusie 5, met het kenmerk, dat tenminste een besturingsfunctie een aanpassingsroutine omvat, die een aanpassing in de tabel van besturingsfuncties aanbrengt door een nieuw functienummer en argumentadres in een vrij tijd-venster van de tabel vast te leggen in overeenstemming met het tijdstip, waarop de nieuwe besturingsfunctie moet worden uitgevoerd, waarbij in het argumentgeheugen op het argumentadres een nieuw argument wordt vastgelegd.A method according to claim 5, characterized in that at least one control function comprises an adjustment routine that makes an adjustment in the table of control functions by recording a new function number and argument address in a free time window of the table in accordance with the time at which the new control function is to be executed, in which a new argument is stored in the argument memory at the argument address. 7. Werkwijze volgens conclusie 5 of 6, met het kenmerk, dat het eerste deelprogamma een aanpassingsroutine omvat, waarmee de gebruiker een aanpassing in de tabel van besturingsfuncties kan aanbrengen door een nieuw functienummer en argumentadres in een vrij tijdvenster van de tabel vast te leggen in overeenstemming met het tijdstip, waarop de nieuwe besturingsfunctie moet worden uitgevoerd, waarbij in het argumentgeheugen op het argumentadres een nieuw argument wordt vastgelegd.Method according to claim 5 or 6, characterized in that the first sub-program comprises an adjustment routine, with which the user can make an adjustment in the table of control functions by recording a new function number and argument address in a free time window of the table in according to the time at which the new control function is to be executed, in which a new argument is stored in the argument memory at the argument address. 8. Werkwijze volgens conclusie 4, 5, 6 of 7, met het kenmerk, dat het zoeken van een vrij tijdvenster voor het aanbrengen van een aanpassing in de tabel van besturingsfuncties wordt uitgevoerd met behulp van een prioriteitsschema, waarin de prioriteiten van de verschillende besturingsfuncties zijn vastgelegd.Method according to claim 4, 5, 6 or 7, characterized in that the search for a free time window for making an adjustment in the table of control functions is performed using a priority scheme, in which the priorities of the different control functions are defined. 9. Werkwijze volgens één der voorgaande conclusies, met het kenmerk, dat het eerste en tweede deelprogramma gegevens kunnen uitwisselen via een gemeenschappelijk geheugen.Method according to one of the preceding claims, characterized in that the first and second subprograms can exchange data via a common memory. 10. Werkwijze volgens één der voorgaande conclusies, met het kenmerk, dat het schakelprogramma de gebruikelijke functies van het operating System met de oorspronkelijke frequentie uitvoert.Method according to any one of the preceding claims, characterized in that the circuit program performs the usual functions of the operating system at the original frequency.
BE9200015A 1992-01-08 1992-01-08 Computer system for real time control of a process - uses three part program operating under conventional personal computer operating system BE1004928A3 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
BE9200015A BE1004928A3 (en) 1992-01-08 1992-01-08 Computer system for real time control of a process - uses three part program operating under conventional personal computer operating system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
BE9200015A BE1004928A3 (en) 1992-01-08 1992-01-08 Computer system for real time control of a process - uses three part program operating under conventional personal computer operating system
BE9200015 1992-01-08

Publications (1)

Publication Number Publication Date
BE1004928A3 true BE1004928A3 (en) 1993-02-23

Family

ID=3886079

Family Applications (1)

Application Number Title Priority Date Filing Date
BE9200015A BE1004928A3 (en) 1992-01-08 1992-01-08 Computer system for real time control of a process - uses three part program operating under conventional personal computer operating system

Country Status (1)

Country Link
BE (1) BE1004928A3 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0766156A1 (en) * 1995-09-29 1997-04-02 Koninklijke Philips Electronics N.V. Programmable logic controller
US5825435A (en) * 1994-09-07 1998-10-20 U.S. Philips Corporation Color cathrode ray tube and display device
CN104133395A (en) * 2014-08-08 2014-11-05 佳木斯大学 Cereal color sorting control system

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
ELEKTRONIK. deel 40, nr. 10, 14 Mei 1991, MUNCHEN DE bladzijden 178 - 180 , XP229071 HERMANN HAGGENMILLER, PETER PLUTO 'SPS-Programme sind unter OS-9 ablauffähig' *
ELEKTRONIK. deel 40, nr. 10, 14 Mei 1991, MUNCHEN DE bladzijden 82 - 88 , XP229064 OTMAR FEGER 'Werkzeuge für Embedded-Control' *
ELEKTROTECHNIK deel 72, nr. 4, 24 April 1990, WURZBURG DE bladzijden 28 - 32 , XP116748 DIPL.-ING. MANFRED HOLDER 'Programmierprobleme per PC gelöst' *
INSTRUMENTS AND CONTROL SYSTEMS deel 63, nr. 10, Oktober 1990, RADNOR US bladzijden 47 - 49 , XP170933 FRED WILSON 'Using ARTIC in PC-based distributed control systems.' *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5825435A (en) * 1994-09-07 1998-10-20 U.S. Philips Corporation Color cathrode ray tube and display device
EP0766156A1 (en) * 1995-09-29 1997-04-02 Koninklijke Philips Electronics N.V. Programmable logic controller
BE1009813A3 (en) * 1995-09-29 1997-08-05 Philips Electronics Nv Programmable logic controller.
CN104133395A (en) * 2014-08-08 2014-11-05 佳木斯大学 Cereal color sorting control system

Similar Documents

Publication Publication Date Title
US5781776A (en) Industrial controller permitting program editing during program execution
AU590532B2 (en) Compiler for evaluating boolean expressions
JP5528568B2 (en) Parallel program control
BE1004928A3 (en) Computer system for real time control of a process - uses three part program operating under conventional personal computer operating system
US5410658A (en) Microprocessor for carrying out a plurality of different microprograms at the same time and method for controlling the microprocessor
BE1009813A3 (en) Programmable logic controller.
CN110488738A (en) A kind of code generating method and device
US6327631B1 (en) Signal processing apparatus
US5239476A (en) Multi-level state language controller for multi-threaded machine control
NL9002684A (en) Controlling computer using emitting interruption pulses at set frequency - applying program switching among three sections, communication, processing, storing, control functions, switching
US5060133A (en) Transputer CNC processor
JP3102828B2 (en) Programming device
CN115453967A (en) Scheduling execution method of PLCopen single-axis motion control function block
US4374412A (en) Circulating page loose system
US4907190A (en) Computer control system and method for effecting sequence controls and servo-controls
US20050010903A1 (en) Method for creating a data processing program
EP0256149B1 (en) Computer system
EP0183877B1 (en) Microcomputer for time dependent processes
KR100258893B1 (en) Numerical controller performance method with unified controller
JP2808548B2 (en) Processor operation state transition control device from current state to subsequent state
JP3167245B2 (en) Programmable controller operating state monitoring device
US6131050A (en) Control device having a control logic switching function
JP3224068B2 (en) Programmable controller
CN1119744C (en) Programmable controller and controlling method for microcomputer of carrying out multitask function
JP3308781B2 (en) Programmable controller

Legal Events

Date Code Title Description
RE Patent lapsed

Owner name: FRAMATOME CONNECTORS BELGIUM N.V.

Effective date: 20020131