![]() |
|
The di_burst_rate
function sets the rate at which your device will sample data. The Burst Rate is device dependent.
Note: You should not directly call di_burst_rate
when using di_maximum_rate
and di_sample_rate
. You MUST call di_burst_rate
when sampling different channels at different rates
int di_burst_rate(count); |
|
unsigned count; |
Determine the Burst Rate using count
. count
is used differently for each device.
DI_NO_ERR | No error |
DI_OPENED_ERR | Device not opened |
DI_COMM_ERR | Communication error |
DI_BURST_ERR | Burst Rate error |
Additional consideration must be given to burst rate when performing multiple tasks. The following charts show the fastest sampling speeds that can be expected (and the count required to deliver that speed) when performing the indicated tasks simultaneously.
Note: ONLY the instruments shown here support multiple tasks.
#include "200sdk.h" |
|
int errcode; |
|
unsigned rate; |
|
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"); |
|
count = 193; |
/* init rate */ |
if(errcode = di_burst_rate(count)){ |
/* stop scanning */ |
di_strerr(errcode,errstr); |
|
printf("%s",errstr); |
|
} |
|
else |
|
printf("Burst rate set.....\n"); |
|
di_close(); |
|
} |
Copyright © DATAQ Instruments, Inc.