Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

scan_op and scan_demux for NI 4472 board

how do I use scan_op and scan_demux for the 24bit 4472 board, since all of the buffers for the arguments are shorts with out losing data, due to the data size of the short arguments?
0 Kudos
Message 1 of 2
(2,647 Views)
Hi,

To use the NI-DAQ functions with the 4472, you'll need to declare the samples buffer as a i32 array (array of 32-bit integers). The functions takes pointers to i16 arrays, so the pointer to the i32 array needs to be typecasted to an i16 pointer, for example:

static i32 piBuffer[1000] = {0};
iStatus = DAQ_Start(iDevice, iChan, iGain, (i16*) piBuffer, ulCount,
iSampTB, uSampInt);

The NI-DAQ driver will fill the array with the appropiate values.

Hope this helps. Let me know if you have any questions.

Diego Funes
National Instruments
0 Kudos
Message 2 of 2
(2,647 Views)