
Chapter 4
NI-FBUS CM Software
©
National Instruments Corporation
4-7
NI-FBUS Hardware and Software User Manual
Developing Your NI-FBUS Communications
Manager Application
This section contains information to help you develop your NI-FBUS
Communications Manager application.
Choose Your Level of Communication
While a few functions require a specific type of descriptor (for example,
nifGetDeviceList
requires a link descriptor), many functions (such as
the core, alert, and trend functions) let you communicate using any type of
descriptor. With these functions, the descriptor type you choose depends on
what is most convenient for you in designing your application, because
there is no significant difference in performance between the different
types.
For example, if it is convenient for your application to use only a session
descriptor to keep track of tags for each block (so that you refer to
all parameters in
BLOCKTAG.PARAMNAME
format), you should write your
application this way. If it is easier for you to keep track of a descriptor
for each block rather than a tag for each block, you should open a block
descriptor for each block you are communicating with, keep track of that
descriptor value, and access parameters by
PARAMNAME
using the block
descriptor.
Choose to Access by Name or Index
The NI-FBUS Communications Manager supports access by name or
by index for all block parameters. National Instruments recommends that
you access all variables by name. Although access by index might be
slightly faster in some cases, an application cannot always reliably
determine indices.
The NI-FBUS Communications Manager may convert the parameter
name you specify to the final index that F
OUNDATION
™
Fieldbus protocols
must use to access the parameter over the network. The NI-FBUS
Communications Manager converts the name to an index using standard
F
OUNDATION
™
Fieldbus-specified methods, which include a check to the
device at run time to verify the index. If you hard-code indices, you will
have to modify them when the devices they are accessing become replaced,
upgraded, or have new blocks created on them.