Chapter 2 C Language Reference
AutoCode Reference 2-16 ni.com
Linking Handwritten UCBs (for AutoCode) with SystemBuild
After you have written a UCB to create an AutoCode application, you can
use the same UCB for simulation. SystemBuild can automatically compile
and link your UserCode function into the simulation engine (release 4.0 and
later). Refer to Figure 2-3.
SystemBuild provides the usr01.c example file and AutoCode provides
the sa_user.c example file for writing UCBs. These files are different
and should not be used interchangeably for linking UCBs with
SystemBuild and AutoCode applications. usr01.c is strictly meant to link
user-written code with the SystemBuild simulator. sa_user.c is meant to
link user-written code with AutoCode applications. After the code has been
written using sa_user.c, the same file might be linked with SystemBuild.
The $ucb directive in usr_dsp.c in Figure2-3 makes it possible to link
handwritten UCBs for AutoCode with SystemBuild. However, code
written using usr01.c, provided by SystemBuild, cannot be linked with an
AutoCode application.