Diagram Scope

Variables with diagram scope are called global variables. Because global variables reference any part of a block diagram, you should exercise caution in your use of them. Global variables can make a block diagram hard to maintain because they increase the diagram’s complexity. To find where a global variable is defined, you must search the entire diagram for it, which can be a long and frustrating task.

In addition, global variables increase the chances of a conflict in names between modules. For example, engineers working on different parts of a large project may choose the same name for different global variables. The problem won’t surface until each module is added to the master diagram.

As a rule of thumb, global variables should be used only when transmitting system-wide constants or signals that would be laborious or visually messy to represent as wires.