©
National Instruments Corporation
9-1
9
Global Scope Signals and
Parameterless Procedures
This chapter discusses global scope signals and parameterless procedures.
Introduction
The memory and performance requirements of real-time production code
force the issue of global variables. AutoCode does not generally use global
variables; rather, it creates and uses stack variables and explicit interfaces.
Whereas that architecture is perfectly sound, it does cause overhead in a
production system. Therefore, AutoCode now supports direct use of global
variables for local block outputs within a subsystem. Extending that
concept allows global variable(s) to be used as the inputs and outputs of a
procedure.
You must explicitly select which signals within the model will be generated
as global variables. In addition, you also will have to specify which of the
procedure inputs and outputs are to be global. Fortunately, you are able to
specify these signals within the SuperBlock Editor. A summary of the
capabilities regarding these global signals includes:
•
Model-level specification of global signals
•
Specification of a memory address that can be attached to each global
signal
•
Specification of which procedure inputs and/or outputs are to be global
variables
•
Verification of connectivity during Analyze-time
•
Access to global variable names from within the template, allowing
customized locality of the declarations
•
Command-line override to force all signals to be global or not global
•
DocumentIt support