Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NI DAQ operation much faster for 16 bits than for 32 ?!

Highlighted
Hi all,

Subject says it all. I have an old DAQ software written in MSC 7.0
for 16 bits Windows, running reasonably fast on Win95 machine (
AT-MIO16L9
and AT-AO6 boards ).
Recently I decided to upgrade my code to W32, using DAQ 6.1
and Visual C++. Not many source code changes were needed.

But to my surprise DAQ speed dropped by an order of magnitude or so !
In the program I am mostly using simple AO_Write and AI_VRead functions,
but the same effect is for more sophisticated ones.

I was suspecting the OS problem and played with setting the
process priority to realtime, but with no success.

Can anybody tell me where am I making an error ?
Configuration utility tests say that all is OK.

Thanks
in advance,
JL

------------------------------------------------------------------
Dr. Janusz Lekki e-mail:Janusz.Lekki@ifj.edu.pl
Inst. of Nuclear Physics, Cracow
tel. (+48-12) 637-02-22 x.271, fax: (+48-12) 637-18-81
------------------------------------------------------------------
0 Kudos
Message 1 of 3
(1,678 Views)
Highlighted
Are you using IRQ and DMA? Check to make sure DMA is used and not iqnored,
also check that IRQ is not shared. The board might be waiting for another
board to clear.

Janusz Lekki wrote in message
news:38C50045.1E5E6495@ifj.edu.pl...
> Hi all,
>
> Subject says it all. I have an old DAQ software written in MSC 7.0
> for 16 bits Windows, running reasonably fast on Win95 machine (
> AT-MIO16L9
> and AT-AO6 boards ).
> Recently I decided to upgrade my code to W32, using DAQ 6.1
> and Visual C++. Not many source code changes were needed.
>
> But to my surprise DAQ speed dropped by an order of magnitude or so !
> In the program I am mostly using simple AO_Write and AI_VRead functions,
> but the same effect is for more sophisticated ones.
>
> I wa
s suspecting the OS problem and played with setting the
> process priority to realtime, but with no success.
>
> Can anybody tell me where am I making an error ?
> Configuration utility tests say that all is OK.
>
> Thanks in advance,
> JL
>
> ------------------------------------------------------------------
> Dr. Janusz Lekki e-mail:Janusz.Lekki@ifj.edu.pl
> Inst. of Nuclear Physics, Cracow
> tel. (+48-12) 637-02-22 x.271, fax: (+48-12) 637-18-81
> ------------------------------------------------------------------
0 Kudos
Message 2 of 3
(1,678 Views)
Highlighted
Dave Smith wrote:
>
> Are you using IRQ and DMA? Check to make sure DMA is used and not iqnored,
> also check that IRQ is not shared. The board might be waiting for another
> board to clear.
>

Thanks for suggestions, but it is not this case. I am able to output
waveforms at 300k update rate and read them at 100k and so on.

I was surprised by the following numbers
(old Win95 PC with one AO and one MIO):

1. A loop of 10.000 AO_Write():
- code compiled using 16 bit atwdaq.lib and MSC 7.0 - loop completes
in appr. 300 ms
- 32 bit nidaq.lib from DAQ 6.1, VisualC++, realtime thread priority -
loop time appr. 1200 ms !

2. 10.000 AI_VRead():
- 16 bit: 800 ms
- 32 bit: 4000 ms !

The above numbers are still valid even after removing
the NI card from a slot.
..

Regards,
JL



------------------------------------------------------------------
Dr. Janusz Lekki e-mail:Janusz.Lekki@ifj.edu.pl
Inst. of Nuclear Physics, Cracow
tel. (+48-12) 637-02-22 x.271, fax: (+48-12) 637-18-81
------------------------------------------------------------------
0 Kudos
Message 3 of 3
(1,678 Views)