Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

timebase/interbal inappropriate?

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.
0 Kudos
Message 1 of 3
(2,232 Views)
Hello;

You thing is not making sense is the dScanRate set to zero. If you take a look at the NI-DAQ on line help, you will see that the rate for that parameter can go roughly from 0.00153 pts/s through 5,000,000 pts/s or from 655 s/pt through 0.000001 s/pt.
Try to make that chane and see if the error keeps showing.
Hope this helps.
Filipe
0 Kudos
Message 2 of 3
(2,232 Views)
Thank you for your quick response, Filipe.

A call of DAQ_Rate(dScanRate, iUnits, &iScanTB, &uScanInt) with dScanRate=0
gives iScanTB=1 and uScanInt=0. The scanning interval, uScanInt takes 2 through
66563, OR 0. When the scan interval, uScanInt is set to 0, the time of sampling
and scanning are unified. Thus, I think, my program should run fine.

My program actually runs fine when dSampRate = 100.0 and f64 dScanRate = 0,
but it fails when dSampRate = 101.0 and f64 dScanRate = 0. I am really confused.

Hiroshi
0 Kudos
Message 3 of 3
(2,232 Views)