Patent Publication Number: US-2004049622-A1

Title: Programming tool

Description:
[0001] This is a Continuation of International Application PCT/DE01/04068, with an international filing date of Oct. 26, 2001, which was published under PCT Article 21(2) in German, and the disclosure of which is incorporated into this application by reference. 
    
    
     
       FIELD OF AND BACKGROUND OF THE INVENTION  
       [0002] The invention relates to a programming tool for generating a program interrupt.  
       [0003] In automation systems, a program logic is used for the open loop and/or closed loop control of the sensors and/or actuators of a technical process. With such a program logic, the parameter values detected by the sensors and the values entered via operator control elements are read and further processed with internally determined or existing states or values to provide output values to the aforementioned sensors and/or actuators. In modern automation systems, the portion of the system provided by software continually increases.  
       [0004] Creating such a program logic for an automation system is distinct from conventional programs especially in that automation systems are typically cybernetic systems that run continuously with automatic open loop and/or closed loop control. This application requires constant repetition of continuously recurring sequences, which are open loop controlled and/or closed loop controlled by correspondingly recurring program sequences of the program logic. The programming technique required for this purpose is therefore referred to as cyclic programming. An important goal within cyclic programming is to achieve the shortest possible run time, since the run time of the individual program sequences essentially corresponds to the response time of the open loop and/or closed loop control underlying the open loop controlled and/or closed loop controlled system.  
       [0005] Prior to programming, the programmer dissects the tasks that occur within the context of the open loop and/or closed loop control of an automation system, in order to obtain individual tasks that can be mapped to the programming language used. In the context of this preparation, an attempt is made to identify as many constantly repeated tasks and modules as possible. Identifying constantly repeated partial sequences allows the programming to be especially clear and concise.  
       [0006] Application programs which conventionally consist of modules are widely used. These modules consist of networks, which in turn consist of operations that combine different operands. Graphic programming languages, such as ladder diagram (LAD) or sequential function chart (SFC), are available to create corresponding application programs. Within these programs, the modules represent networks of logic operations composed of operators and operands. In terms of textual programming languages, such as C or P ascal, such a module thus corresponds to a procedure or function. Each module has an interface and can be called by other modules. After one module has been executed, the module called next in the program logic is executed. A programming apparatus for formulating application programs is known, for instance, from German Laid-Open Publication DE 197 28 476 A1, the disclosure of which is incorporated herein by reference.  
       [0007] Even with the greatest care, it is unavoidable that, as the program is executed, individual operands will suddenly have a different value than originally expected. At that point, the program will thus not respond as expected. This is the case, for the most part—especially in complex processes—if input values not previously considered or expected have acted on the preceding module.  
       [0008] So-called interrupts are familiar in connection with textual programming languages as well as in the hardware area. These are interruptions of an ongoing process by the CPU if a corresponding condition is met. A distinction is drawn between hardware and software interrupts depending on whether the condition originates in the hardware or the software. To process the hardware interrupts, most processors have a separate interrupt controller. Software interrupts are triggered by special machine code instructions, or by the processor itself, if defined error conditions occur. Such interrupts make it possible to stop a process if certain conditions occur, in order to check what conditions caused the “STOP.” In connection with textual programming languages, such interrupts can be deliberately used to bring about an interruption as soon as a parameter assumes an unexpected value. Once the process has been interrupted, the conditions that led to the unexpected or undesirable state can be analyzed. Since, in the field of automation technology, the aforementioned modules can also call one another, the program listing obtained after a program has been completely executed is typically so complex that searching for the concrete cause of the error is very difficult.  
       OBJECTS OF THE INVENTION  
       [0009] Thus, one object of the invention is to provide a method and a programming tool for generating a program interrupt that is used in conjunction with a program logic for the open loop and/or closed loop control of a technical process, in particular in conjunction with one of the graphic programming languages used in automation technology.  
       SUMMARY OF THE INVENTION  
       [0010] According to one formulation, the invention is directed to a method for generating a corresponding program interrupt within a program logic with operators and operands for open loop and/or closed loop control of a technical process. A list generated during the translation of the program and containing operand identifiers and the locations where these operand identifiers are used is summarized into an identifier list. From this relatively extensive identifier list, an operand table is compiled with selected operands and identification of the respective access operations to these operands. Furthermore, this table can then be used to define specific access operations as a condition for the occurrence of a program interrupt.  
       [0011] Using this method, it is thus no longer necessary to review all the locations where the “problematic” operand was used in order to establish a program interrupt. Instead, the access type, which has either caused an error that must be checked or which has to be checked by way of a program interrupt for other reasons, can now be selected with ease.  
       [0012] The identifier list is typically generated in the translation of the program logic being analyzed. Until now, however, it has not been available for further processing. In an advantageous embodiment of the invention, all the partial identifier lists generated in the context of the individual translation runs are combined into a single, complete identifier list, which is then available for further processing, in this particular case for generating a program interrupt.  
       [0013] This identifier list has a filter element assigned to it which can be used to make the typically very extensive identifier list more clear and concise. It is possible, for instance, to select only the operand identifiers that are transmitted at the inputs and outputs of a module. Thus, the filter element can be used to select the operands that are relevant in connection with the definition of an interface.  
       [0014] Finally, it is possible within an operand table to mark a line, or one or more cells of this line, by means of a special marking tool. This selection uniquely determines the scope of the access to the selected operand and defines it as a condition for the program interrupt.  
       [0015] In a further embodiment, it is possible not only to define the scope of the access to an operand but also the type of the access as a criterion for generating a data breakpoint.  
       [0016] If the scope of the access is defined by marking cells or lines in the operand table, then the type of the access can be conveniently defined by means of a selection menu from which a desired type of access is selected by a further marking tool.  
       [0017] A programming tool according to the invention thus enables the conditions for a program interrupt to be defined, i.e., the setting up of a data breakpoint, without a cumbersome analysis of all the locations where the operand of interest was used and combined with ease of operation and a consistently clear display.  
       [0018] As soon as the conditions for a program interrupt have been uniquely defined by means of the above-described method, the programming tool automatically generates a data breakpoint by incorporating an instruction into the program sequence of the content to be processed. As a result, when the previously defined conditions occur, an instruction to interrupt the program, i.e., an interrupt, is generated. The further processing of the program logic is thereby interrupted at least temporarily.  
       [0019] The programming tool further has a program editor that opens automatically if a corresponding program interrupt occurs, so that the program, and in particular the parameters that caused the program interrupt, can be analyzed. Within the program editor, the corresponding program sequence, or the corresponding module, can then be revised and possibly be provided with changed data breakpoints by means of the programming tool, to enable a renewed analysis of the program sequence that controls the automation system. 
     
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
     [0020] The method and programming tool according to the invention will now be described with reference to the operand table depicted in the drawing. It should be noted that the realization according to the exemplary embodiment is only one of many possible ways to implement the inventive method and/or programming tool. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS  
     [0021] The invention will now be explained in greater detail by means of an exemplary embodiment with reference to the single drawing figure. The drawing figure shows a table of selected operands used within a program logic.  
     [0022] The table of the operands used within a program logic—shown merely by way of example in the drawing—relates, e.g., to the operands of an output (A), with a byte address assignment of (AB0 to AB7). Each byte address is assigned one line in the operand table. The individual lines are divided into different columns identifying different scopes of access to the byte address assigned to the respective line. A distinction is drawn between bitwise access operations (0 to 7), bytewise access (B), wordwise access (W), and double word access (D).  
     [0023] The operands summarized in the table represent only a subquantity, selected by means of a filter, of all the operators used within the program logic. In the present example, the operators of interest are the operators of output A.  
     [0024] The table further shows several markings, in this case crosses. Instead of being marked by crosses, the individual cells or lines of the table could also be designated with color or highlighted in some other manner. These markings show how the operators used are accessed. In the present case, the table shows the scope of the access. This tabulated display represents a graphic translation of the access operations to selected operands.  
     [0025] The information shown in the table is obtained from a temporarily stored identifier list that includes all the operand identifiers and the locations where they are used within the program logic. The identifier list is generated during the translation of the program logic and is subsequently temporarily stored, as mentioned above. A filter element, e.g., the selection of the output or input of a module, is used to define and display specific operands in the operand table, together with the scope of the access operations, as explained above.  
     [0026] A specific access operation can be selected as a condition for a program interrupt by selecting one or more lines or cells with a marking tool, e.g., by positioning a cursor in the operand table. In connection with the marking, a user is offered a popup or pull-down menu, or both, to define, in addition, the type of access, i.e., write, read, or both.  
     [0027] This uniquely defines one or more access operations to a specific operand as a condition for a program interrupt. A programming tool then automatically generates the desired data breakpoint at the access location thus defined.  
     [0028] The above description of the preferred embodiments has been given by way of example. From the disclosure given, those skilled in the art will not only understand the present invention and its attendant advantages, but will also find apparent various changes and modifications to the structures and methods disclosed. It is sought, therefore, to cover all such changes and modifications as fall within the spirit and scope of the invention, as defined by the appended claims, and equivalents thereof.