dio_wildcard_build
status.i4.v = dio_wildcard_build(wc_device_index.i4.v,
num_devices.i4.v, device_indices.i4a.r,
errors.i2a.r, ftd.i2.v, scale_it.i4.v)
This routine builds a wildcard device to read MADCs. This is a list
of devices that are later read as one device. Getting the readings
as a wildcard is more efficient for the front end. The limit for the
number of devices in a wildcard is 128. The wildcard device keeps its
composition until another dio_wildcard_build is done with the same
device index. All the device indices in the wildcard must be from
the same front end. The list can contain devices that do not have
scaling even if "scale_it" is set to TRUE. In this case, the devices
that do not have scaling will be returned as floating values during
a call to dio_wildcard_read. Also, the status will return the
number of devices without scaling. See function dio_wildcard_read.
wc_device_index special wildcard device index (there are a limited
number of these devices "User list MADC" for a
particular front end)
num_devices number of devices in the wildcard list
device_indices list of device indices to read as a single
wildcard device (maximum allowed is 128)
errors returned ACNET status value for each device in the list
ftd Frequency Time Descriptor (FTD)
(FTD_ONESHOT -> one shot,
FTD_DEFAULT -> use database default FTD,
FTD_1HZ -> 1 Hz request,
FTD_EVENT_MASK OR'ed with TCLK event value -> read
on TCLK event (event constants are in 'tclk_events')
(can use the macro BUILD_EVENT_FTD(event) or
BUILD_EVENT_PLUS_DELAY_FTD(event,delay) in 'macro'))
(FTD constants are in 'diolib')
scale_it determines if returned values are scaled during the
dio_read_wildcard call:
(TRUE -> scaled (4-byte float values),
FALSE -> raw (4-byte integer values))
This function returns status values as follows:
OK success
DIO_BADARG invalid number of devices passed
DIO_MEMFAIL memory allocation failure
DIO_TOO_MANY too many wildcard devices registered
negative value other ACNET format error
positive value number of first device in error
This function requires the following include files:
cnsparam_h, diolib_h, acnet_errors_h, tclk_events_h, macro_h
Related functions:
dio_wildcard_read, dio_wildcard_cancel, error_in_list(_c)
C/C++ usage:
short errors[NUM_DEVICES];
short ftd = FTD_ONESHOT;
int status;
int wc_device_index = 65825;
int num_devices = NUM_DEVICES;
static const int device_indices[NUM_DEVICES] = {5552, 5560};
int scale_it = TRUE;
status = dio_wildcard_build(wc_device_index,num_devices,
device_indices,errors,ftd,scale_it);