dio_set_dev(_c)
status.i4.v = dio_set_dev(device_index.i4.r, value.r4a.r [,length.i2.r]
[,offset.i2.r] [,no_queue.i4.r])
status.i4.v = dio_set_dev_c(device_index.i4.v, value.r4a.r
[,length.i4.v] [,offset.i4.v]
[,no_queue.i4.v])
This routine sets a device to a specified value (in engineering units).
Do not use this routine for table devices (ramp cards, etc).
Use the routine 'td_set_one(_c)' instead. If "device_index" is an
array device, the routine 'dio_set_array_device_c' should be used.
If you are setting data for several devices, it's better to use
'dio_bld_set(_c)' and then 'dio_set_lst'.
device_index device index
value scaled setting value. The length and offset
must be with respect to the raw data though
because of the possibility of structured
(non-array) data.
[length] raw data length in bytes
(default (0) is database minimum size)
[offset] raw data offset in bytes (default (0) is 0 bytes)
[no_queue] queueing information
(DIO_WAIT_FOR_SET -> make setting now and wait
for reply (default),
DIO_NO_WAIT_SET -> make setting now and don't wait
for reply from the destination
front end)
This function returns ACNET status values as follows:
DIO_OK success
DIO_SETDIS DIO settings are disabled
DIO_BADARG invalid number of arguments or invalid
queueing type passed
DIO_SCALEFAIL no scaling information available
negative value other ACNET format error
This function requires the following include files:
diolib_h, acnet_errors.h
Related functions:
dio_set_device_c, dio_can_set(_c), dio_set_raw(_c), dio_set_lst,
dio_get_dev(_c), td_set_one(_c), dio_set_array_device_c,
dio_set_array_device_double_c
C usage:
int status;
int device_index = 14430;
int length = 0;
int offset = 0;
int no_queue = DIO_WAIT_FOR_SET;
float value = 1.0;
status = dio_set_dev_c(device_index,&value,length,offset,no_queue);