From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

double buffer AI, integer, multi channel, C

Has anybody C or pascal code for AI with a flxible chanallist, fixed frequency, integer Buffer, multi channe for daqmx    

 

The old Code with nidaq was: (Pascal, Delphi 7):

 

pchans:=@chan_p[0];

   pgains:=@gain_p[0];

 

   status_ni:=SCAN_Setup (device, nchani16, pchans, pgains);

  

s_TB2:=0; s_int2:=0;

 

   status_ni := SCAN_Start (device, pbuffer, count, s_TB, s_int,  s_TB2, s_int2);

 

  While ((LoopCount < countloop) And (status_ni =  0))do

  begin

    status_ni := DAQ_DB_HalfReady(Device, pHalfReady, pDAQstopped);

 

    If ((HalfReady =  1) And (status_ni =  0)) Then

    begin

      status_ni := DAQ_DB_Transfer(Device,pBuffer_H,panz_t,pDAQstopped);

 

      if speichern then BlockWrite(f1, buffer_h[0], count, i);

 

      inc(LoopCount);

    end;  // halfready

0 Kudos
Message 1 of 1
(3,089 Views)