![Intel Intel 80188EB Скачать руководство пользователя страница 19](http://html1.mh-extra.com/html/intel/intel-80188eb/intel-80188eb_user-manual_2071788019.webp)
Chapter 4
Interfacing to Your Round Card
80188EB-Based Fieldbus Round Card User Manual
4-4
©
National Instruments Corporation
where
deviceTemplate
is the name of your device template file, and
outputFile
is the name that you want to call the output file. Make sure
that
outputFile
ends in
.c
.
If there are syntax errors in your device template,
codegen
tells you
where they are. When you have corrected all syntax errors,
outputFile
is created.
outputFile
contains code representing the
structure of your device.
outputFile
is used again when you compile
and link your device application.
symbolFile
contains a reference to DD information for the parameters
defined in your DD and template file. If you are using only the standard
function blocks and their parameters,
symbolFile
is the standard
symbols file,
nifb.sym
, located in the
\samples
subdirectory. If you
have defined your own blocks or parameters,
symbolFile
must be set
to the output of the DD tokenizer.
Writing Function Block Callbacks
The callback functions that you must develop are responsible for the
following main functions:
•
Handling read and write requests from the network
•
Executing your function block algorithm
•
Handling alarm confirmations and acknowledgments (if you are
using alarms)
The Function Block Shell calls your execution callback whenever your
Block is scheduled to execute. This callback performs whatever
algorithm you want your function block to perform. The other
callbacks, which are called after your device sends an alarm, allow you
to perform device-specific processing upon alarm confirmations
(notifications that the alarm was received) and alarm
acknowledgments (notifications that a user has seen the alarm).
Other optional callbacks are provided for other purposes. See
Chapter 4, Callback Functions, of the NI-FBUS Function Block Shell
Reference Manual for more details.
Writing userStart and Registering Callbacks
Your
userStart
function is called by the stack during startup. It is
your chance to perform your own initialization tasks.
userStart
also
initializes the Function Block Shell and registers your callbacks with