Gil,
I am a bit confused why you set this line in your code.
// (8) synchronize pads (for low frequency)
ReportError(s_nCTDevNum, nC, _T("GPCTR_Change_Parameter/ND_COUNTING_SYNCHRONOUS"), GPCTR_Change_Parameter(s_nCTDevNum, s_nCTChanNumber[nC], ND_COUNTING_SYNCHRONOUS, ND_YES));
The help says this about this function
(NI-TIO-based devices only) This
paramID is applicable only for
buffered counter measurements. In particular, synchronous counting mode is
recommended for buffered counter measurements (except buffered position
measurement) where the signal (internal or external) connected to the source
input of counter is of a lower frequency than that connected to the gate input
of that counter.
In your case the gate is the lower frequency.
Secondly
// (5) set to continuous (circular) data acquisition
ReportError(s_nCTDevNum, nC, _T("GPCTR_Change_Parameter/ND_BUFFER_MODE"), GPCTR_Change_Parameter(s_nCTDevNum, s_nCTChanNumber[nC], ND_BUFFER_MODE, ND_DOUBLE));
The available options for ND_BUFFER_MODE are
ND_SINGLE for single buffer operations or
ND_CONTINUOUS for continuous-buffer operations.
What happens if you change these options?
Just get rid of the step 8 and change step 5 to ND_CONTINUOUS
Regards,
Kenn North
Principal Product Manager - Search, Digital Analytics
http://ni.com/search