![]() |
|
The di_list_length
function sets input and output scan list lengths (number of channels). di_list_length
must be called to acquire input channels.
Note: This function must be called before di_inlist
.
int di_list_length(in_length,out_length); |
|
unsigned in_length; |
/* sets input list length */ |
unsigned out_length; |
/* sets output list length */ |
Sets the input scan list length - the number of channels you will acquire data from.
Sets the output scan list length - the number of channels you will output data to.
Note: For devices that do not support output functions, out_length
is reserved for compatibility (0).
DI_NO_ERR | No error |
DI_OPENED_ERR | Device not opened |
DI_COMM_ERR | Communication error |
DI_LENGTH_ERR | List Length error |
none
#include "200sdk.h" |
|
int errcode; |
|
char errstr[255]; |
|
main() |
|
{ |
|
int i; |
|
if(errcode = di_open()){ |
/* open the device for comm */ |
di_strerr(errcode,errstr); |
|
printf("%s",errstr); |
|
} |
|
else |
|
printf("Device installed successfully.....\n"); |
|
if(errcode = di_list_length(1,0)){ |
/* scan one input element (no outputs) */ |
di_strerr(errcode,errstr); |
|
printf("%s",errstr); |
|
} |
|
else |
|
printf("Length error.....\n"); |
|
di_close(); |
|
} |
Copyright © DATAQ Instruments, Inc.