Chapter 4
NI-FBUS CM Software
©
National Instruments Corporation
4-9
NI-FBUS Hardware and Software User Manual
Access Object Dictionary Entries
If you want to access object dictionary entries that do not reside in a block,
you can access them with an object dictionary index along with a virtual
field device descriptor. You can access trend and linkage objects by name
using a virtual field device descriptor. To access trend objects by name,
either from an application program or from the NI-FBUS Dialog utility, use
the name
TREND.
X
, where
X
is a number from 1 to the number of trend
objects in the virtual field device. To access linkage objects, use
LINKAGE.
X
, where
X
is a number from 1 to the number of linkage objects
in the virtual field device. If
X
exceeds the number of linkage objects or
trend objects in the virtual field device, the NI-FBUS Communications
Manager returns the
E_ORDINAL_NUM_OUT_OF_RANGE
error code.
Access Management Information Base (MIB) Parameters
To access Management Information Base parameters directly, either
from a program or from the NI-FBUS Dialog utility, open the physical
device you want to communicate with and open a virtual field device
on the device with the tag
MIB
. You can use the resulting virtual field
device descriptor to access the MIB parameters by index or by their
names (as described in the
F
OUNDATION
TM
Fieldbus Specification
). For
example, to write the macrocycle duration, access the MIB parameter
MACROCYCLE_DURATION
, and to read the live list, access the object
named
LIVE_LIST_STATUS
. This method works both on local interface
devices and on remote devices over the Fieldbus.
Some MIB parameters are elements of a list (such as the list of function
block schedule entries or VCR entries). You can use the name for these
items with a
.X
appended, where
X
is the element in the list you want to
access. For example, the first function block schedule entry in the MIB
is named
FB_START_ENTRY.1
, and the first VCR static entry in the MIB
is named
VCR_STATIC_ENTRY.1
. If
X
exceeds the number of objects of
that type in the MIB, the NI-FBUS Communications Manager returns
the
E_ORDINAL_NUM_OUT_OF_RANGE
error code.
Because most of these parameters have to do with network configuration,
a network configurator, such as the NI-FBUS Configurator, can best set
these parameters.
Keep in mind that the NI-FBUS Communications Manager manages some
MIB objects internally. For instance, the NI-FBUS Communications
Manager builds up internal data structures for some MIB objects, especially