Linking Handwritten UCBs with AutoCode Applications
© National Instruments Corporation
To write code for UserCode Blocks (UCBs), refer to the
which is provided in your
The
file contains an example of a UCB function declaration
sa_user.c
(refer to the
Implementing Handwritten UCBs
more than one UCB, each prototype must have a unique name. Make one
or more copies of this file and insert the code that implements the
algorithm(s) of the UCB(s). One or more uniquely-named UCB code
functions can be placed inside each copy of the
copies can be given any convenient names. If renamed files are included,
the names can be placed into the stand-alone file compilation script
(
) for automatic compilation. If the UCB function—for
compile_c_sa.sh
example, USR01, refer to callout 2 of Figure 2-1—is renamed, all other
occurrences of USR01 in
changed appropriately, including the occurrence in directive
to callout 1 of Figure 2-1.
distribution directory.
src
and
sa_user.c
sa_user.h
2-11
Chapter 2
C Language Reference
sa_user.c
section). If your model has
file and the
sa_user.c
also must be
. Refer
$ucb
AutoCode Reference
file,
Need help?
Do you have a question about the AutoCode NI MATRIX and is the answer not in the manual?
Questions and answers