ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

using the SCAN_Start function

Hi,
I have trying to acquire multiple channels of data using the SCAN_Start function on a PCI-MIO-16XE-10 device using the NI-DAQ driver software.
When I try to execute the call to SCAN_Start using the following parameters device=1, buffer = ai_buffer[4096], count = 4096, sampTimebase = 1, sampInterval = 4883, scanTimebase = 1, scanInterval = 1000
I get a status error -10697 which states Unable to convert your timebase/interval pair to match the actual hardware capabilities of this board. But I have used this function before and worked fine. In this particular function I am trying to playout multiple channels of data and simultaneously aquire them back in where as other functions I just acquiring or playing out. The RATE value
I am using is 204.8.
In this particular function the series of function calls are as follows:

Init_DA_Brds
WFM_Scale
Set_DAQ_Device_Info
WFM_Group_Setup
WFM_Load
Select_Signal
Select_Signal
WFM_Rate
WFM_ClockRate
DAQ_Config
DAQ_Rate
SCAN_Setup
WFM_Group_Control
SCAN_Start
WFM_Check
DAQ_Check
WFM_Group_Control
SCAN_Demux

Any help would be gratefully appreciated!
Thanks in advance.
0 Kudos
Message 1 of 3
(2,962 Views)
Hi Wali,

On E-series boards (your PCI-MIO-16XE-10 is an E-series device) you cannot have a value of 1 for the scanTimebase parameter in the SCAN_Start function. I would recommend that you use either -3 (20MHz clock) or 2 (100 kHz clock) and then set your other parameters accordingly.

Also, I would advise you not to use the DAQ_Rate function. This function is a very old one and was supposed to be used when E-Series boards were not around. You can see the following KB (linked below) for more information on this.
http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/862567530005f09f862569de005c87ea?OpenDocument

The following example should show you how to output a waveform without using the DAQ_Rate function:

http://zone.ni.com/devzone/expl
prog.nsf/6c163603265406328625682a006ed37d/ac7c06d542e7e9eb8625687c006d1ddf?OpenDocument

Best Regards,

Afreen Siddiqi
National Instruments
0 Kudos
Message 2 of 3
(2,962 Views)
Hi Afreen,

Thanks for your answer.
I've had a look at the example.
I am very new to this kind of stuff so please bear with me.
I can't quite figure out what other function apart from DAQ_Rate I should be using.
I have read the first link but in the online help it states the following
Range: -3: 20 MHz clock used as the timebase (50 ns) (E Series only).

1: 1 µs.
2: 100 kHz clock used as the timebase (200 ns) (E Series only).
2: 10 µs.
3: 100 µs.
4: 1 ms.
5: 10 ms.

Whereas the link states "Currently, it says that -3 and -1 are valid codes for the timebase parameter" which seems to conflict with what the online help says??


Also in the example it uses the high-level function WFM_Op which (from reading the document title NI-DAQ for PC
Version 6.9.1 User Manual) to output a waveform. But I am using DAQ_Rate to input a signal (not output).
For waveform generation I am using WFM_Rate.
In my code what can I substitue the call to DAQ_Rate for?

For the card I have what should the timebase and sampleInterval be if I want to input a signal which has a sample rate of say 204.8??
0 Kudos
Message 3 of 3
(2,962 Views)