Chapter 9 Global Scope Signals and Parameterless Procedures
AutoCode Reference 9-6 ni.com
Note NI suggests that you adopt a naming convention for all of your global variables used
for parameterless procedure signals. For example, specify all of the names with a leading
“g,” like gThrottleValue.
Output Specification
Procedure outputs are specified from the basic blocks that connect to the
external signal pins. Therefore, you must specify the global output of a
procedure at the basic block that is the source of the output signal. After the
basic block and channel is identified, select the channel’s Output Scope to
be Global and specify the exact name of the global variable to use within
the Output Label or Name field for that signal. Notice that the normal
Name/Label precedence for basic block outputs still applies. Again, a
naming convention for the global variables is recommended.
Using a Parameterless Procedure
After the procedure has been defined with parameterless signals, you now
have to connect signals to and from the procedure reference. The following
sections describe the connections of a parameterless signal.
Global-to-Global Input Connection
The global-to-global input connection is the most optimal usage of the
parameterless procedure interface. This form indicates that the source of
the input directly uses the global variable used for the procedure’s
parameterless signal. Therefore, you must match the global variable(s)
properly to connect to a parameterless procedure. The Analyzer will verify
that the global variable names match.
Note You must indicate within the source block the signal connected to the procedure to
be Global Scope and specify the same name for its global variable as the global variable
specified for the procedure’s Input Name.
Global Output Connection
You can use a global output of the procedure like any basic block with a
Global Scope Output, but you cannot change the Scope of the signal at the
procedure reference.