National Instruments AutoCode NI MATRIX User Manual

Page 20

Advertising
background image

Chapter 2

C Language Reference

© National Instruments Corporation

2-3

AutoCode Reference

The principal file is

sa_utils.c

, the stand-alone utilities file. At the

time that you compile

sa_utils.c

and your generated code program,

you must make the following header files available locally:

sa_sys.h

sa_defn.h

sa_utils.h

sa_math.h

sa_types.h

sa_intgr.h

sa_math.c

(C file from distribution directory)

If the generated code contains time references (that is, if the variable

RT_DURATION

appears in the generated code), file

sa_time.h

must

be available in the local directory.

If you have defined any UserCode Blocks, the following files must be
available locally:

sa_user.c

AutoCode UCB template

sa_user.h

Header file

Note

If you use the fuzzy logic block in your model, the

sa_fuzz.c

and

sa_fuzzy.h

files must be available locally. Use this file only when linking an AutoCode UCB back into
SystemBuild. Also,

sa_user.c

is just a template for a UCB and only needs to be compiled

into the stand-alone simulation if your SystemBuild model includes UCBs. Refer to the

Linking Handwritten UCBs (for AutoCode) with SystemBuild

section for more

information.

If you use fixed-point data types in your model, files that implement
fixed-point operations must be available. For more details about
AutoCode fixed-point implementation and fixed-point support files,
refer to the

C Fixed-Point Arithmetic

section.

Table 2-3 summarizes the most significant header files. The

sa_

prefix

indicates stand-alone.

Templates

Directory:
Templates:
Direct Access
Templates:

$CASE/ACC/templates

c_sim.tpl,

c_intgr.tpl

c_sim.dac

%CASE%\ACC\templates

c_sim.tpl,

c_intgr.tpl

c_sim.dac

Demos

Directory:

$XMATH/demos

%XMATH%\demos

Table 2-2. Distribution Directories and Files (Continued)

Platform

UNIX

Windows

Advertising