Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »


Most computer languages use the concept of a subroutine or function to logically divide a program into smaller, more manageable tasks. Dividing a program into various functions makes it more readable, eliminates repetition, and promotes re-use. By storing a function (or collection of related functions) in a stand-alone file, the same source code file can be incorporated again and again into various different programs. Whenever the implementation of a particular function is updated, the changes are automatically reflected in all of the programs that reference the source file. By contrast, if every program were to maintain its own copy of each function, a change to a function would have to be duplicated in every program.


In the Design Pad G4 graphical programming environment, the concept of a subroutine is implemented through the use of sub-schemas. A sub-schema is a schema within a schema. It is a standalone document, itself a collection of operators and interconnections, which executes within a parent schema document. Sub-schema documents can themselves contain other sub-schemas, thereby creating a hierarchical execution structure.


Design Pad G4 currently supports two types of sub-schema documents: function-block sub-schemas and state sub-schemas. A function block sub-schema is simply a collection of interconnected functional operators with defined inputs and outputs (see section 5.2 for a more detailed description). State sub-schemas are associated with state-transition diagrams and are described in section 5.3. Future versions of Design Pad may also support ladder-logic sub-schemas and standard C-language sub-schemas.


In textual computer languages, a function is provided with a list of arguments (e.g., parameters or variables) to be accessed and/or manipulated within the function body. The argument list represents inputs to, and/or outputs from, the function. The variables in the argument list provide a mechanism to link the function with its caller. That is, variable arguments are the glue that binds different program segments.


Design Pad G4 provides Variable operators to serve this same binding purpose in the function-block realm. They allow you to access and/or manipulate the same signal from multiple program locations---be it schemas executing in different modules in a node or sub-schemas executing in the same module.

  • No labels