Automatic generation of evaluation order for a function block diagram and detection of any associated errors
First Claim
1. A computerized method for facilitating the development of a computer program documented in the form of a function block diagram in conformance with IEC standard 1131-3, said method comprising the steps of:
- providing a user with a graphical user interface for defining at least two executable function blocks, each said function block including one or more input terminals and one or more output terminals, and connecting, either directly or indirectly via other program elements, at least one said block output terminal of one said block to a respective said block input terminal of another said block;
using the graphical user interface to define a function block diagram comprising at least two connected function blocks;
automatically detecting in said diagram thus defined, any cyclic connections from an output terminal of given instance of a particular said block to an input terminal of the same instance of said particular block;
if any said cyclic connection is detected, using said graphical interface to automatically highlight at least one said cyclic connection to said user; and
if no such cyclic connection is detected, automatically determining an evaluation order for evaluating all said function blocks such that if a first block has an output terminal connected to an input terminal of a second block, said first block is evaluated before said second blocks wherein both said detecting and determining steps utilize a recursive topological sort procedure in each iteration of which a respective evaluation ordinal is automatically assigned to a block which has not already been assigned any said evaluation ordinal and which does not lead to another block which had not previously been assigned any said evaluation ordinal.
8 Assignments
0 Petitions
Accused Products
Abstract
The programming of programmable controllers and other sequential computing devices is facilitated by automatically generating an order for evaluating function blocks in a function block diagram and by automatically detecting any errors in a function block diagram which would adversely affect the generation of a unique evaluation order, such as illegal cycles, disconnected subnetworks, and/or wired-OR connections. The nodes affected by the noted errors are graphically displayed to the user, who then may use a graphical interface to edit the network until all the noted errors have been corrected. A recursive procedure analogous to a topological sort may be used to automatically generate a unique evaluation order. The blocks upstream from each “maximal” output are visited recursively from the input of one block to the output of a preceding block until a “minimal” node is reached which either is not preceded by other blocks or is preceded only by blocks which have already been visited, whereupon the current block is assigned the next available sequence number and the same procedure is used to process any nodes that are upstream from the next downstream output.
29 Citations
9 Claims
-
1. A computerized method for facilitating the development of a computer program documented in the form of a function block diagram in conformance with IEC standard 1131-3, said method comprising the steps of:
-
providing a user with a graphical user interface for defining at least two executable function blocks, each said function block including one or more input terminals and one or more output terminals, and connecting, either directly or indirectly via other program elements, at least one said block output terminal of one said block to a respective said block input terminal of another said block;
using the graphical user interface to define a function block diagram comprising at least two connected function blocks;
automatically detecting in said diagram thus defined, any cyclic connections from an output terminal of given instance of a particular said block to an input terminal of the same instance of said particular block;
if any said cyclic connection is detected, using said graphical interface to automatically highlight at least one said cyclic connection to said user; and
if no such cyclic connection is detected, automatically determining an evaluation order for evaluating all said function blocks such that if a first block has an output terminal connected to an input terminal of a second block, said first block is evaluated before said second blocks wherein both said detecting and determining steps utilize a recursive topological sort procedure in each iteration of which a respective evaluation ordinal is automatically assigned to a block which has not already been assigned any said evaluation ordinal and which does not lead to another block which had not previously been assigned any said evaluation ordinal. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
said graphical user interface is adapted to edit said cyclic connection to include a “ - feedback”
connection from an output terminal of a block included in said cyclic connection that was evaluated during a first evaluation cycle to an input terminal of a subsequent instance of the same or another block included in said cyclic connection to be evaluated during a subsequent evaluation cycle.
-
8. The computerized method of claim 1, further comprising the step of automatically checking the network thus defined for the presence of a disconnected network error in the form of at least one disconnected subnetwork.
-
9. The computerized method of claim 1, further comprising the step of automatically checking the network thus defined for the presence of a wired-OR error in the form of a direct connection to one of said input terminals from more than one of said output terminals.
-
Specification