Chapter 9 Global Scope Signals and Parameterless Procedures
AutoCode Reference 9-2 ni.com
These new features address the following two uses:
•Data Monitoring/Injection—The safe access to local subsystem
signals for the purpose of monitoring the signal’s value during the
execution of the model. This is intended as a way to provide
debugging/monitoring information.
•Parameterless Procedure—The ability to use global variable(s) to
represent a procedure’s inputs and/or outputs. This involves a clear
specification of the names of those global variables for both the
procedure and the caller.
Data Monitoring/InjectionData monitoring is the ability to have read-only access signals within a
subsystem from outside the subsystem by some external agent outside the
scope of the SystemBuild model. Data injection is the ability to modify
signals within a subsystem from outside the subsystem by some external
agent outside of the SystemBuild model. This is usually performed in a
testing environment to determine the effect of extraordinary events on the
system being tested. Both data monitoring and data injection require that
the automatic variables that are normally used for local blocks outputs
instead be global variables. When the block outputs are global variables,
the values persist after the subsystem exits for that time-cycle. Because the
AutoCode requirements for monitoring and injection are identical, the
remainder of this section will discuss the monitoring case.
You can monitor almost every signal from a basic block within a
subsystem. AutoCode will ensure that the naming of these global variables
used for monitoring are unique across the whole model. Any conflicts will
be automatically resolved by mangling the variable name.
Specifying Monitored Signals
A monitored signal is generated as a safe global variable. A safe global
variable will generate as a unique variable, regardless of the signal’s
name/label and whether it matches another block’s signal name/label.
Within the SuperBlock Editor, you have the choice of specifying which
outputs of a basic block will be monitored. Each signal has an attribute
named Output Scope. This scope attribute indicates whether or not the
signal is to be a local (automat ic) variable or a global variable. In addition,
when the signal has a Global Scope, you can enter a memory address. This
is just a string—31 characters maximum—that can be used to represent the