Chapter 2
C Language Reference
©
National Instruments Corporation
2-15
Figure 2-2.
Linking Handwritten UCBs with AutoCode Applications
Generate AutoCode Application
dsp
.
c
usr_dsp.c
(Handwritten UCB using
sa_user
.
c
example)
compile
and link
File Name:
usr_dsp.c
y (k) = -1/2*y(k-2) + 3* u(k) + u(k-2);
which leads to the State-Space realizati on:
x1(k+1) = x2(k)
x2(k+1) = -1/2* x1(k) - 1/ 2*u(k)
y(k) = x1(k) + 3*u (k)