Analog out DMA performanc​e problems

I'm working on an open-source driver for m-series and e-series boards (http://www.comedi.org). I've discoved some performance problems doing dma to analog outputs that I can't resolve. In summary, dma transfers to the analog output of a PXI-6281 in a pxi crate being controlled through a mxi-4 connection (pxi-pci8336) are VERY slow. I'm talking 250k samples/sec slow. That's the maximum speed the dma controller can fill the board's analog output fifo from host memory. I've also got an older PXI-6713 in the same crate, and dma transfers to it are about 15 times faster (about 3.5M samples/sec). I did notice that clearing the dma burst enable bit in the mite chips channel control register caused the 6713 to slow way down to something comparable to the 6281 (about 500k samples/sec). Setting or clearing the burst enable bit had no effect on the speed of the 6289. Is there some special mojo that needs to be done to enable burst transfers on the 6289? Also, even the relatively speedy 6713 does dma transfers much slower than it should, since the pxi-pci8336 advertises 80MB/sec sustained transfer rates over mxi4. Can you provide any insight into this matter? I've already looked through the ddk, and a register level document describing the mite chip, and example code which had chipobjects for the mite and an analog input example.
By the way, dma transfers for analog input on the 6281 weren't as bad, I didn't measure the transfer time, but I was at least able to do input at 500k samples/sec without fifo overruns.
I'll post more detailed performance measurements in a subsequent post, and include measurements for a couple other similar pci boards (a pci-6289 and pci-6711). In case you're wondering, neither of the pci boards get anywhere close to the bandwidth provided by the pci bus, but they're not as spectacularly bad as the pxi-6281.

Here are my measurements:
PCI-6711, tested on 1.4GHz Pentium 4:
5.2 to 5.3 milliseconds to load fifo to half-full using dma. 0.9 to 1.0 microseconds to write to a 16-bit register. 1.9 to 2.1 microseconds to read from a 16-bit register. The mite's burst enable bit has no effect.
PXI-6713, tested on 3.2GHz Pentium D:
2.2 to 2.4 milliseconds to load fifo to half-full using dma. 0.5 to 0.7 microseconds to write to a 16-bit register. 5 to 7 microseconds to read from a 16-bit register. Turning off the mite's burst enable bit causes the dma fifo load time to increase to 16 to 17 milliseconds.
PCI-6289, tested on 3GHz Pentium 4:
2.0 to 2.2 milliseconds to load fifo to half-full using dma. 0.4 to 0.6 microseconds to write to a 16-bit register. About 1.2 microseconds to read from a 16-bit register. The mite's burst enable bit has no effect. I could do streaming analog output on 1 channel with an update rate of about 2.1MHz before the board's fifo started to underrun.
PXI-6281, tested on 3.2GHz Pentium D:
18 to 19 milliseconds to load fifo to half-full using dma. 0.3 to 0.4 microseconds to write to a 16-bit register. 4 to 6 microseconds to read from a 16-bit register. The mite's burst enable bit has no effect. I could do streaming analog output on 1 channel with an update rate of about 250kHz before the board's fifo started to underrun.
Notes: the 671x boards have a 16k sample ao fifo, the 628x boards have 8k.
The 4 to 7 microseconds times to read a register on the PXI boards seems large too, is that normal overhead for going over the mxi-4 connection?
I wasn't doing anything else intensive on the pci bus during these tests. For what it's worth, according to pci specs the two pci boards should be able to dma their analog output fifos to half full in less than 150 microseconds.

Similar Messages

  • Looking for Analog Out example using DMA and C++; cannot find sample "GenMultVoltUpdates_SWTimed"

    Looking for example for Analog Out to multiple channels using DMA and C++.  Found reference to sample "GenMultVoltUpdates_SWTimed" which I do not have and cannot find.

    Hello Gerry,
    When you install DAQmx, there is an option to install
    support for Measurement Studio.  When you
    select this option, it will install these examples onto your hard drive.  All of the examples can be found at the
    following location: (C:\Documents and Settings\All Users\Documents\National
    Instruments\NI-DAQ\Examples\DotNET2.0\Analog Out\Generate Voltage)
    Respectfully,
    Rob F
    Test Engineer
    Condition Measurements
    National Instruments

  • Analog out problem

    I am generating pulses ans sending them through the analog outs. I have the outs connected to the oscilloscope. When i run my prog. both the analog out channels shift up by 5v. When i stop the prog it remains in the shifted 5V. Now i goto the Measurements and Automation software and say test on either one of the analog out and it falls back to zero. But when i run the prog again i find the output shifted by 5V. Can anyone tell me why its happening this way? Thanks!

    You could upload the vi in question so we can see what's up.
    Sounds like you aren't putting a "reset" segment into your program, such as a frame at the end that sets the AO's to 0V.
    Run vi->Set AO to 5V->Do stuff->Set AO to 0V->Shutdown vi.
    MAX well reset the AOs when it opens up, so you need to do the same within your program.
    2006 Ultimate LabVIEW G-eek.

  • X-series analog out fifo preload

    i am porting an m-series driver to x-series, and have a quick question about analog output.
    i have found that I can preload the aout FIFO by writing sequential data to:
            device.AO.AO_FIFO_Data_Register.writeRegister(val);
    however this is a 32-bit register, and through trial and error I have found that i have to write two values at a time:
        for(int i=0;i<preloadCount;i+=2)
            u32 val = buffer[i] & 0xffff;     // buffer has correctly scaled DAC values, as 32-bit ints
            if (i<(preloadCount-1))           // in case preload count not divisible by 2
                val |= buffer[i+1]<<16;
            device.AO.AO_FIFO_Data_Register.writeRegister(val);
    is there a way to write one 16-bit value at a time to the analog out fifo?
    thanks,
    --spg
    scott gillespie
    applied brain, inc.
    Solved!
    Go to Solution.

    additionally, is there a way to DMA 32-bit values to analog out, without them being interpreted as pairs of 16-bit values?
    for analog input, both problems (writes to the fifo, and dma to the fifo) are solved by setting the fifo width:
    aiHelper.programFIFOWidth(nAI::kFourByteFifo, status)
    but so far I have not found a similar mechanism for analog output.  
    national instruments guys, can you comment?
    thanks,
    --spg
    scott gillespie
    applied brain, inc.

  • Read spreadsheet file for Analog Out Profile using DAQmx

    I am trying to read a .txt file in, then output the Analog out profile (Daqmx) vs. time.  The first column is time is (ms) in .001 sec increments.  The second column is the Analog out voltage I want to output.  I want to read the profile in, and ouput the a Analog out voltage incrementing in .001 sec intervals (or whatever the time increments are in the .txt file).  The problem I am having is, it reads in the whole file and outputs it in a fraction of a sec, instead of incrementing by the time.  I attached a screen shot of what I have.  Any help would be great. Thanks 
    Attachments:
    screen shot read.jpg ‏75 KB

    You are reading the timing but not doing anything with it. You've specified Analog Wfm 1Chan NSamp for the DAQmx Write but you did not create the waveform data type. Use the Build Waveform function on the Waveform palette and wire in your array to the Y (waveform component) input and the time interval to the dt input.
    Message Edited by Dennis Knutson on 04-06-2006 08:56 AM
    Attachments:
    Build Waveform.JPG ‏6 KB

  • 6025e daqmx analog out then input

    I have a 6025E card and I am trying to output a triangle wave on ao0 and read it back on ai1.  it used to work until i added three more analog inputs then i get buffer errors.  I tried changing the analog out to interrupts but it says that property is invalid.  i went into MAX and output a sine wave on ao0 and when i read it back into ai1 in the test panels i a sine wave with a bunch of steps.  Is something wrong with my card? i tried to reset it with no luck.  I even tried the shipping examples and get property invalid on the interrupt and it doesn't like the sample clock?
    any suggestions ?
    James
    Message Edited by James R on 11-16-2006 10:57 AM
    - James
    Using LV 2012 on Windows 7 64 bit

    Hey James,
    Is there a particular reason you are want use interupts? DMAs are generally much faster. If you are getting buffer errors, try increasing the size of the buffer using the DAQmx Configure Output Buffer.
    Let me know if that works for you.
    Cheers
    Malay Duggar
    NI

  • Bad point on FP analog out module

    When moving through the 4-20 mA range on an FP analog out module by .1 mA increments. I am seeing several specific points ex. 5.2 mA or 11.3 mA. That appear to short the module to 20 mA. I have confirmed this both with FP explorer and a DVM. The points are reproduceably bad. In addition the only way I have succeded in solving this is by switching the CFP 20-20 head module. The problem is that I have many systems to field and I have now seen this on 3 seperate heads. I have even tried different power supplies. any feedback would be great.

    Shock,
    So you have seen this issue on multiple systems and when you replace the cFP-2020 controller the issue goes away? When you say it shorts the module to 20mA, do you mean you tell it to output 5.2mA and it then actually outputs 20mA? I would have guessed that this issue has to do with the I/O module. Does reformatting a problematic controller resolve the issue or does it still demonstrate the behavior? Also which specific cFP I/O module are you seeing this behavior from?
    Ames

  • Hello , please am having a problem with my iphone 5 , the battery runs out quickly , also if i turn on 3G it will run faster , 15 minutes and the iphone battery will be out , and my final problem is that is "no service " appears a lot can you help ?

    Hello , please am having a problem with my iphone 5 , the battery runs out quickly ,another problem also if i turn on 3G it will run faster , 15 minutes and the iphone battery will be out . My final problem is that  "no service " appears a lot  especially when opening wifi or 3G , can you help ?

    Your battery is running quickly because your cellular data connection is weak.
    Is your phone carrier a supported carrier:   Wireless carrier support and features for iPhone in the United States and Canada - Apple Support
    For your no service issues:  If you see No Service in the status bar of your iPhone or iPad - Apple Support

  • So I have been creating a logo for my company and it came out great. The problem is, when I format it for PNG or when I want to use it on freshbooks or my webpage, the image becomes blurred and the text is not as clear. How do I fix this?

    So I have been creating a logo for my company and it came out great. The problem is, when I format it for PNG or when I want to use it on fresh books or my webpage, the image becomes blurred and the text is not as clear. How do I fix this? Is it because the text get shrunk?

    This is how it looks on adobe illustrator

  • Simultaneous Analog In and Analog Out

    How to Output on Analog Out and read Analog In at the same time.
    I am using a VC++, NIDAQ 7.01.
    No LabView.

    Greetings,
    The following example demonstrates how to perform synchronized analog input and analog output:
    Synchronizing Analog Input and Output
    The example was written in CVI, but modifying it for use in VC++ is fairly straightforward and documented within the code.
    Good luck with your application.
    Spencer S.

  • Xtrememusic: Digital out or Analog out, Advantages Disadvanta

    I have a Xtrememusic card, that has a wonderful sound using the analog outputs to 3 Sonic Impact T-Am
    ps.
    Now, I'm curious about using the digital out to a Panasonic SA-XR55 digital amp/receiver. I know I would lose the CMSS, but the Panasonic can do it's own synthesis of surround. I'm interested in knowing from users about the pros and cons of using the digital out or analog outs. I know the quality of the Xtrememusic DACs are good, and I read that the Panasonic?has a excellent sound output as well. If I choose to use the digital out, I could just use?the motherboard onboard digital out, although only in DVD modes does it do a true bitperfect pass through. In stereo mode, it's still using some of Windows to mix the sound. I could also use the digital out of the card. Seems like a shame to bypass all of that nice analog the card is capable of?
    Oh yeah, anyone know if a old Creative Li've 5. I/O panel will work with a Xtrememusic card??Thanks

    wiersch,
    I believe you might have Skype set to auto-configure your soundcard. Try this, open Skype and go to it's audio setting menu. Disable the option 'Let Skype adjust my sound device setting.'
    Jason

  • How can I generate tones with usb 6008 using analog out?... tia sal2

    Greetings All
    I've been looking at the example Sim Phone.vi that comes with labview and would like to generate similar tones out of our usb 6008 device. I can get a very faint sound out of our usb 6008 using the example Gen Multi Volt Updates-SW Timed.vi Does anyone know the best way to alter Sim Phone.vi to have the sound come out of the Analog output of our usb 6008 device. ( I have a small speaker connected to the Analog out on our USB 6008)
    PS: we are using labview 7.1
    Does anyone know the Analog output frequency range of the usb-6008? Is this possible?
    TIA
    Attachments:
    Gen Mult Volt Updates-SW Timed.vi ‏78 KB

    Hi sal2,
    As stated earlier you could most certainly use the USB device to generate sound, but that would be at a max update rate of 150 Hz. While according to Nyquist theorem you could get frequency information for signals below 75 Hz, you may notice that the quality of the data in that spectrum to be very low due to having so few samples.
    While technically possible to produce you really should look for a device with a faster Analog Output update rate. I would look for a device that supports Analog Output at least 10x the maximum frequency that you want the user to hear. Some great, yet lower cost products, would be the M-Series line of products. They would give you the performance that is really needed in the type of application that you are talking about.
    If you still want to use the USB Device, then you would need to use code similar to that found in the example Gen Mult Volt Updates-SW Timed (Found here: C:\Program Files\National Instruments\LabVIEW 7.1\examples\daqmxbase\Dynamic\ao).
    Best of luck getting your system together,
    Otis
    Training and Certification
    Product Support Engineer
    National Instruments

  • HT1937 Dear the new update iOS 7.0.4 is not opening some pages in safari. Tray to find out what's the problem. Thanks

    Dear the new update iOS 7.0.4 is not opening some pages in safari. Tray to find out what's the problem. Thanks

    There are billions of web pages. Any clue as to which ones are not opening?

  • Lync 2013 I have a strange problem concerning group call pickup in lync 2013.the pickup calls on snom 710 having only a second delay, but in lync client it having about 5-7 second Anybody out there having similar problems with call pickup Groups?

    HI
    I have a strange problem concerning  group call pickup  in lync 2013.the pickup calls on snom 710 having only a second delay, but in lync client it having  about 5-7 second
    Anybody out there having similar problems with call pickup Groups?

    Hi,
    Did you meet any other call delay when you using Lync?
    As the issue happen for Lync desktop client, it can be performance issue. Please check if there is any error message from FE Server when the issue happen.
    Also please check if you have updated Lync Server to the latest version, if not, update it and then test again.
    Best Regards,
    Eason Huang  
    Eason Huang
    TechNet Community Support

  • HT201272 Hi there! today i wanted to buy some gems so i charged my acc with 10 dolars and try out to buy gems. problem is i m getting "your purchase could not be completed" error... I have tried all possible solutions i found on internet...my restrinction

    Hi there! today i wanted to buy some gems so i charged my acc with 10 dolars and try out to buy gems. problem is i m getting "your purchase could not be completed" error...
    I have tried all possible solutions i found on internet...my restrinctions are disabled...tried reinstaling, relogging, restarting phone.. nothing seems to help...
    normally i would contact custommer support but i m using US account and i m not from US. anyway my US account is charged with money and it workes perfectly for all my other friends using this method ( we got some free US vouchers so we needed US accounts)
    Any advice?
    thanks in advance

    iTunes Store Support
    http://www.apple.com/emea/support/itunes/contact.html

Maybe you are looking for