LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simultaneous DA write and AD read on PXI

I want to perform DA sine generation and AD sampling with PXI-6251. Sine generation (200 samples of 10kHz sine signal) and sampling (1,25MHz sampling 125 sample in 1 period) must be in constant phase (phase difference must be stable). Problem is that amplitude of sine must change (during 0 transition) without phase (between DA and AD) disturbance. I can do these in my development PC with PCI-6259 by writing waveforms with DAQmx Write vi (DMA mode)while AD task running (continuous sampling). PC is core2 2,13GHz. AD samples with stable changed amplitude are available 4ms after DAQmx Write performing. With PXI-8184 and PXI-6251 these time is around 750ms for each amplitude change. Before that time reading is unstable. Is there any way to do these in less then 50ms?

DAQmx Write and Read are done in sequence, not parallel.

 

My investigation till now:

With PXI system first DAQmx Read after DAQmx write return no samples (look like that AD task stops), but samples after that is in phase, so task probable don’t stop. With PCI system there is no gap in DAQmx Read.

Message Edited by Oldi on 01-19-2009 01:57 AM
0 Kudos
Message 1 of 9
(3,213 Views)

Can you post a sample of your code? It's really difficult to figure out the problem if we can't see what you're doing.

 

Ed 



Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 2 of 9
(3,188 Views)

For real test you must connect ao and ai on PXX-6251

Message Edited by Oldi on 01-20-2009 01:37 AM
0 Kudos
Message 3 of 9
(3,169 Views)

Dear Oldi,

 

I examined you VI and tried to understand it.

 

In the largest Stacked sequence structure you are performing a DAQmx Write, though at that point the task is not started.That may result one of the issues you mention.

 

Basicly if I understood well you are shifting the amplitude between two values, and these two values are set once, at the beginning. So from this point of view this gerenartion is something like an ARB generation. So one option would be using ARB hardware.

 

Of course it is also possible to do with your hardware configuration. Instead of switching among two waveforms, I suggest you create a "custom sine generator" that is a sine node connected to the iteration number with some scaling. By this way it would be really easy and fast to change between two multipliers. The advantage of this would be that you were able to change the amplitude on the run.

 

Should you have any further questions please ask!

 

Regards,

Marton Litkei

NI Hungary

0 Kudos
Message 4 of 9
(3,103 Views)

Thanks for replay

 

Problem is, that I have no additional HW, only DAQ card 6251 and 1 resistor, so everything in these project is in SW. We have few of those cards and want to use it for that purpose, so other solution is not optimal. I try these SW on other standard PC with P4 processor and also work OK with 3ms pause after amplitude change. On PXI generation is unstable till 0,75s after amplitude change. Task for sending waveform to DA converter start once at program start.

 

0 Kudos
Message 5 of 9
(3,086 Views)

Dear Oldi,

 

To achieve the best performance I suggest you use a snychronized parallel acquisition-generation. You can use the example program by searching in Find Examples for keyword "Multi-Function-Synch AI-AO".

 

I also suggest not to use the method that switches between the two waveforms but create a waveform that contains the the signals with different amplitudes.

I created this very simple example to show how to, hope it will help 🙂

 

Regards,

Marton Litkei

NI Hungary

 

 

 

0 Kudos
Message 6 of 9
(3,052 Views)

Thanks

AWG with both amplitude and synchronized generation and sampling work great. Even if PC is to slow to get all AD data, AD and AWG is steal in phase, because AD jump over 1 or more AWG cycle. AWG work perfectly without gap.

Great solutionSmiley Happy

Message Edited by Oldi on 02-19-2009 05:52 AM
0 Kudos
Message 7 of 9
(2,984 Views)
Hi,
This is stellar from canada. I am a newbie of this site and in
my opinion this is a good site to visit on for the visitors.
It has a lot for the visitors.
stellar

Message 8 of 9
(2,978 Views)

Dear Oldi,

 

Thank you for your feedback and congratulations on writing a great application!

 

Keep up the good work,

 

Marton

0 Kudos
Message 9 of 9
(2,943 Views)