I am troubled with timebase/interbal matching problem with DAQ-Card6062E.
I am using Borland C++ Builder4 on Windows98 and Windows2000.
I have compiled "SCANsingleBufAsync.C", one of the sample programs
which came with NI-DAQ 6.9.2. When I compile the program as distributed,
it runs fine.
The problem occurs after midifying sample timebase and interbal.Here is
the main flaw of the program
i16 iNumChans = 2;
f64 dSampRate = 10000.0;
f64 dScanRate = 1000.0;
iStatus = DAQ_Rate(dSampRate, iUnits, &iSampTB, &uSampInt);
iStatus = DAQ_Rate(dScanRate, iUnits, &iScanTB, &uScanInt);
iStatus = SCAN_Setup(iDevice, iNumChans, piChanVect, piGainVect);
iStatus = SCAN_Start(iDevice, piBuffer, ulCount, i
SampTB,
uSampInt, iScanTB, uScanInt);
(from SCANsingleBufAsync.C)
The program runs after the modification of sample rate and scan rate
as follows.
f64 dSampRate = 100.0;
f64 dScanRate = 0;
(They results in
iSampTB:1 uSampInt:10000
iScanTB:1 uScanInt:0 )
However, an error occurs in Scan_Start() after following modifications.
f64 dSampRate = 101.0;
f64 dScanRate = 0;
( iSampTB:1 uSampInt:9901
iScanTB:1 uScanInt:0 )
Here is the error message.
[Scan_Start] returned NI-DAQ error -10697
Unable to convert your timebase/interbal pair
to match the actual hardware capabilities of this board.
The occurance of the error depends on the value of dSampInt.
I thought dSampInt takes an arbitary value between 0 and 66535.
Is there any condition to select an appropriate pair of iSampTB
and dSampIntfor my DAQ-Card6062E ?
I am waiting for any suggestions.