Chapter 6
NI-FBUS Function Reference
©
National Instruments Corporation
6-33
NI-FBUS Hardware and Software User Manual
nifError_t
nifGetObjectName(
nifDesc_t ud,
NIFB_BLOCK_NAME_SUBINDEX (char *blocktag, char
*name, uint32 subidx),
char *outName)
Input
ud
The descriptor of the session, link, physical device, VFD or block
if you are accessing by name. If you are accessing by index,
ud
must be a VFD or block.
inName
The name of the parameter you want to read the OD symbol name
in
BLOCKTAG.PARAM
form. Refer to Table 6-5 for an explanation
of how to use macros to specify the parameter. To specify a named
structure element, supply name in
BLOCKTAG.STRUCT.ELEMENT
format.
Output
outName
The Object symbol name read from the Object Dictionary in
the device.
Context
Session, block, VFD, DDOD, physical device, link.
Description
nifGetObjectName
is used to read the Object Dictionary symbol names of objects such as
block, VFD, MIB objects, or communication objects from devices.
•
If
ud
is the descriptor of a link, then
inName
must be in
BLOCKTAG.PARAM_NAME
format.
•
If
ud
is a session descriptor, then all links are searched for the given
BLOCKTAG.PARAM_NAME
. The call fails if identical
BLOCKTAG.PARAM_NAME
tags are
found on the bus. Index access is not allowed for session descriptors.
•
If
ud
is the descriptor of a general function block application VFD, and you use the
NIFB_INDEX
macro, the index specified is the index of the object in the VFD.
•
If
ud
is the descriptor of a function block, name must be in
PARAM_NAME
format.
•
If
ud
is the descriptor of a function block, and you use the
NIFB_INDEX
or
NIFB_INDEX_SUBINDEX
macro, the index specified is the relative index of the
parameter within the block. Relative indices start at one for the first parameter. Index zero
retrieves the object dictionary symbol name of the block itself.
•
In all cases, you can expand
PARAM_NAME
to
STRUCT.ELEMENT
format to represent a
named element of a named structure.
Refer to Table 6-5 for an explanation of how to use macros to specify the parameter.