From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NIDAQ double-buffering AO problems

Hi

I'm developing an application which requires continuous multi-channel
analog waveform output under Windows NT - eventually with multiple
output cards. Using the Config_DAQ_Event_Message call I'm trying to
ensure that the half-buffer always gets transferred (WFM_DB_Transfer)
in time to prevent NI-DAQ from disabling output. I've configured the
callback to issue every N scans, where N is 2052: my half-buffer is
2052*8 scans in size, all outputs enabled.

I'm specifying my own callback routine rather than using the Windows
PostMessage route - the documentation is very unclear, but seems to
suggest this is the better method.

The event message is very sensitive to NT timing delays, and the wave
output stops if other applic
ations require any serious attention (e.g.
moving a window) - we need to output at at least 30kHz.

Does anyone know whether there's a way to hook *directly* to the
interrupt handler so that I can send the next buffer without any delay?

Our application will not tolerate *any* loss of data output - clearly
an interrupt is the only way to guarantee this. The buffer size has no
effect (as long as it's >=FIFO size, which it is) since NI-DAQ calls
precisely when it need the next half-buffer, no matter what size that
may be.

Any help would be much appreciated - I know the hardware is capable but
I'm frustrated by apparent software limitations.

Best regards

Rob

Computer: Pentium III 550Mhz
O/S: Windows NT 4, Service Pack 4
NI Card: PCI-6713 (8-channel AO)
NI-DAQ version: 6.5.2


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
0 Kudos
Message 1 of 3
(3,027 Views)
Robert, buffer size does matter. When you call WFM_DB_Config and set the 'stop
on old data' parameter to 1, NI-DAQ will halt the waveform output when data
that has already been output is encountered. At a given output rate, the
larger your buffer, the more time you will have to receive the message and
call WFM_DB_Transfer to write fresh data into one half of the buffer while
the other half is being output.

- Tim


Robert Pym wrote:
>Hi>>I'm developing an application which requires continuous multi-channel>analog
waveform output under Windows NT - eventually with multiple>output cards.
Using the Config_DAQ_Event_Message call I'm trying to>ensure that the half-buffer
always gets transferred (WFM_DB_Transfer)>in time to prevent NI-DAQ from
disabling output. I've configured the>callback to issue every N scans, where
N is 2052: my half-buffer is>2052*8 scans in size, all outputs enabled.>>I'm
specifying my own callback routine rather than using the Windows>PostMessage
route - the documentation is very unclear, but seems to>suggest this is the
better method.>>The event message is very sensitive to NT timing delays,
and the wave>output stops if other applications require any serious attention
(e.g.>moving a window) - we need to output at at least 30kHz.>>Does anyone
know whether there's a way to hook *directly* to the>interrupt handler so
that I can send the next buffer without any delay?>>Our application will
not tolerate *any* loss of data output - clearly>an interrupt is the only
way to guarantee this. The buffer size has no>effect (as long as it's >=FIFO
size, which it is) since NI-DAQ calls>precisely when it need the next half-buffer,
no matter what size that>may be.>>Any help would be much appreciated - I
know the hardware is capable but>I'm frustrated by apparent software limitations.>>Best
regards>>Rob>>Computer: Pentium III 550Mhz>O/S: Windows NT 4, Service Pack
4>NI Card: PCI-6713 (8-channel AO)>NI-DAQ version: 6.5.2>>>Sent via Deja.com
http://www.deja.com/>Share what you know. Learn what you don't.
0 Kudos
Message 2 of 3
(3,026 Views)
Dear Robert,

we have developed an application similar to your altought digital. We have
to output a 2 Mhz 8 bit or 16 bit word. We choosed the following solution:

1)double buffering with 6533
2)high buffer dimesion (we have from 60MB to 150MB of buffer)
3)we ask the nidaq to tell us if we have to send more data
4)we do nothing during the output!

Best regards

rflogic
Phil Salamone

Robert Pym wrote:

> Hi
>
> I'm developing an application which requires continuous multi-channel
> analog waveform output under Windows NT - eventually with multiple
> output cards. Using the Config_DAQ_Event_Message call I'm trying to
> ensure that the half-buffer always gets transferred (WFM_DB_Transfer)
> in time to prevent NI-DAQ from disabling output. I've configured the
> callback to issue every N scans, where N is 2052: my half-buffer is
> 2052*8 scans in size, all outputs enabled.
>
> I'm specifying my own callback routine rather than using the Windows
> PostMessage route - the documentation is very unclear, but seems to
> suggest this is the better method.
>
> The event message is very sensitive to NT timing delays, and the wave
> output stops if other applications require any serious attention (e.g.
> moving a window) - we need to output at at least 30kHz.
>
> Does anyone know whether there's a way to hook *directly* to the
> interrupt handler so that I can send the next buffer without any delay?
>
> Our application will not tolerate *any* loss of data output - clearly
> an interrupt is the only way to guarantee this. The buffer size has no
> effect (as long as it's >=FIFO size, which it is) since NI-DAQ calls
> precisely when it need the next half-buffer, no matter what size that
> may be.
>
> Any help would be much appreciated - I know the hardware is capable but
> I'm frustrated by apparent software limitations.
>
> Best regards
>
> Rob
>
> Computer: Pentium III 550Mhz
> O/S: Windows NT 4, Service Pack 4
> NI Card: PCI-6713 (8-channel AO)
> NI-DAQ version: 6.5.2
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
0 Kudos
Message 3 of 3
(3,027 Views)