Chapter 4
NI-FBUS CM Software
©
National Instruments Corporation
4-3
NI-FBUS Hardware and Software User Manual
Because you can use the NI-FBUS Communications Manager to
communicate with each of the F
OUNDATION
™
Fieldbus entities, such as
links, physical devices, virtual field devices, and blocks, there are
nifOpen
calls for you to open and get a descriptor to each of these entities.
Example: Using Administrative Functions
Suppose you want to get a descriptor to a block with
nifOpenBlock
before you read or write the block parameters. Then you want to open
a block using the block’s tag.
To open a block with the tag
TI101_Analog_Input
, invoke
nifOpenBlock(sessionDesc, "TI101_Analog_Input",
&blockDesc)
, where
sessionDesc
is the descriptor of the session that
you established with the NI-FBUS Communications Manager. The
NI-FBUS Communications Manager returns the descriptor of the block
that you opened in
blockDesc
. From then on, you can use this descriptor
for calls associated with this block.
Core Functions
Core NI-FBUS functions are the functions that deal with processing
function block parameters—primarily the
nifReadObject
and
nifWriteObject
functions, which read and write block parameters.
The NI-FBUS Communications Manager encapsulates the device
description services with the core function
nifGetObjectAttributes
,
which gives you the device description attributes of any parameter.
Function blocks contain view or display objects. As the name implies, these
objects are a collection of parameters in function blocks that are typically
displayed in an operator console. Four view objects are defined for each of
the ten standard function blocks in the F
OUNDATION
™
Fieldbus specification.
The following examples are a summary of the NI-FBUS Communications
Manager because they demonstrate that details such as VCRs, indices, and
connections are hidden by the
TAG.PARAMETER
access provided by the
NI-FBUS Communications Manager. However, to correctly write an
application using the NI-FBUS Communications Manager, you must be
familiar with the
Foundation Specification: Function Block Application
Process, Parts 1 and 2
document—the standard blocks, their parameters,
and their syntax—and have an idea of the architecture of Fieldbus. Refer to
the
F
OUNDATION
TM
Fieldbus Overview
document for an outline of Fieldbus
architecture.