Chapter 6
NI-FBUS Function Reference
©
National Instruments Corporation
6-49
NI-FBUS Hardware and Software User Manual
Description
nifReadObjectList
reads the values of objects specified in the list, which may include
block parameters or communication parameters from devices.
•
If
ud
is the descriptor of a link, each name in
blkParamList
must be in the format
BLOCKTAG.PARAM_NAME
.
•
If
ud
is a session descriptor, then all links are searched for any given name specified by
the
blocktag.param
format in
blkParamList
. The read of this particular object fails
if identical
BLOCKTAG.PARAM_NAME
tags are located on the bus. Index access is not
allowed for session descriptors.
•
If
ud
is the descriptor of a general function block application VFD, any name in
blkParamList
must be in the format
blocktag.param_name
.
•
If
ud
is the descriptor of a function block, any name in
blkParamList
must be in the
format
PARAM_NAME
.
•
If
ud
is the descriptor of a function block and the
NIFB_INDEX
or
NIFB_INDEX_SUBINDEX
macro is used to specify a name in
blkParamList
, the index
specified is the relative index of the parameter within the block. Relative indices start at 1
for the first block parameter.
•
In all descriptor cases, any
PARAM_NAME
specified in
blkParamList
can be expanded
to
STRUCT.ELEMENT
format to represent a named element of a named structure.
For each name specified in
blkParamList
, the name can either represent a variable or a
variable list object. You should determine the size of each object specified in
blkParamList
beforehand, possibly with a call to
nifGetObjectSize
. If the cumulative size of all the
objects specified in the list is larger than the buffer size specified in
length
, the NI-FBUS
Communications Manager returns an error. The data in the buffer is valid for however many
objects were successfully read. The success or failure of the read for every object specified
in
blkParamList
is indicated in
errArray
, the array in which error codes are returned.
The error code in the first element of
errArray
is the error code indicating success or failure
upon read of the first object specified in
blkParamList
, and so on.
Refer to Table 6-5 for an explanation of how to use macros to specify the parameters in
blkParamList
.
The data
nifReadObjectList
returns is in Fieldbus Foundation FMS Application format.
You must accomplish conversion of the data to the internal format of your processor and
compiler.