![]() |
|
The di_set_data_mode
sets a DI-700 instrument to 16-bit or 14-bit data.
Note: This function must be called before di_start_scan
.
void di_set_data_mode(datamode); |
|
unsigned datamode; |
/* sets the data mode*/ |
datamode
= 0 sets to 14-bit (default)
datamode
= 1 sets to 16-bit
In 16-bit data mode, the least significant 2 bits of each DI-700 data word are used for higher resolution instead of passing the inverse of the DI1 and DI0 digital inputs with the first channel data. For other USB devices, this is controlled by flashing different firmware programs into the device. For parallel port or /ENA Ethernet devices, resolution is controlled by loading different .BNM firmware files. For /ENB Ethernet devices, resolution is controlled by a jumper on the Rabbit card inside the device.
none
For /ENA and /ENB Ethernet devices, setting data bit 3 causes scanning to stop if a data gap occurs, and setting data bit 4 causes di_stop_scan to avoid waiting 3 seconds after requesting a stop to make sure that no further data is received. Setting data bit 5 causes di_open to skip calling Win32 API WSAStartup and di_close to skip calling WSACleanup, allowing a program to run instances of more than one device. However, the user program must then call those functions once before the first di_open and after the last di_close. Changing these bits must be done without changing other bits in the internal data mode value, some of which are used for internal purposes. Call di_get_data_mode to obtain the current value before setting or clearing data bits 3, 4, or 5 to form the parameter for di_set_data_mode.
Special versions of WinDaq recording and playback software are required to support 16-bit data files.
di_open(0) |
/* for a DI-700 with USB ID 0 */ |
di_set_data_mode(1); |
/* scan 16-bit data */ |
Copyright © DATAQ Instruments, Inc.