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.

Similar Messages

  • 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.

  • 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

  • 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

  • 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

  • What is the Analog Ouput FIFO size of the LAB PC 1200 ?

    Hello,
      does anyone know what is the Analog Ouput FIFO size of the LAB
    PC 1200 ? I can't find anything in the documentation nor with "Get DAQ
    device information" vi.
    Thanks.

    The Lab PC 1200 does not have an analog output FIFO.

  • Trying to do a simple analog out in LabView8 imported form LV7

    I have a PCI-6733 DAQ board and I can set it's analog outputs in
    'Measurement and Aquisition' so I know the hardware is working
    correctly.  I can also create a simple VI in labview 7 to set
    those analog outputs.  However, I dont' see any of the same
    components in my LV 8 installation.  I cannot figure out how to do
    an analog output in version 8 and if I try to simply import my LV 7 vi
    I get an error when it tries to load 'AO Update Channel.' 
    Specifically, it says, 'AO Update Channel is not a valid Labview file.'
    ANy idea what is going wrong?

    You may have 7.4.1 installed but if you installed LabVIEW 8 after you installed it, you probably don't have the VIs in the LabVIEW 8 folder. If you re-install 7.4.1, then you should be able to proceed.
    To set an analog output to a fixed value, it's just a DAQmx Write (analog DBL 1Chan, 1Samp), with a DBL wired to the data input.
    Message Edited by Dennis Knutson on 04-28-2006 08:32 AM
    Attachments:
    Analog Out.JPG ‏8 KB

  • FCP 4.5 DV to DSR-11 to Analog Outs to TV?

    I got a DSR-11 recently and can't get this to happen. I want my playback from FCP (DV) to go through firewire to the DSR-11, then to the DSR-11's 3 RCA analog outputs (1 video, 2 audio L & R) and playback on my TV, which I hope to use as an NTSC monitor for now. I can't get this to work.
    I connected the analog outs of the DSR-11 to the inputs on the TV and was able in that way to select the various settings in the DSR-11 menus.
    I also captured from a miniDV tape in the DSR-11 to FCP 4.5 successfully.
    I've tried new RCA and firewire cables. But, playback from FCP still gives me nothing on the TV. What else should I do?
    FrankELF

    In FCP, make sure View->External Video is set to "All Frames." You may also want to do the "Refresh AV Devices" thing. Oh ... and make sure that you have the palyhead on a clip instead of a slug or Timeline gap (which will show as black).
    I don't have a DSR-11, but on my DSR-20s, there's a menu setting for EE mode that has to be turned on for the Firewire signal to be passed on to the analog outputs.
    Since you're seeing the VTR's menu on the TV monitor, you can assume the monitor is set to the porper input.
    -DH

  • 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

  • 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.

  • How to drive Analog Out For Hbm MX879

    Hello,
    I use labview with Hbm 879 Module. I try to drive an analog out directly from labview. I can't find any Vi for this in the Hbm library. I asked directly to hbm but such vi are not developped and there is no ETA.
    Does someone have done this kind of feature on hbm analog output and can share his vi ?
    Thank's.
    Jacques

    Hello,
    I didn't find this instrument driver on the third party driver page :http://www.ni.com/downloads/instrument-drivers/f/
    If this material support SCPI command (like *idn?) may be you can try to send those command directly with VISA functions. Also may be the commands are given in the user manual of the HBM 879.
    Best regards
    Jean-Luc D. NI France
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    Journées techniques : du contrôle d'instruments aux bancs de test
    Du 4 au 13 juin : Grenoble - Pari...

  • 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

  • PCI-7344 Analog out

    How to output a signal to Analog out in NI PCI-7344 in Borland C++?
    Thank you very much.

    http://digital.ni.com/public.nsf/allkb/67253305A52EFB1986256E94005945D2

Maybe you are looking for

  • Ipod shuffle with itunes no playlist

    After upgrading to latest iTunes 12.0.1.26 I can no longer sync any music or playlists to my ipod shuffle. I have 37Gb of music available, but when I select my device and then settings/music, it shows no playlists or tracks to sync? I hate this new i

  • Standard Edition Memory Limitations

    What is the upper memory limitation for the SGA size when using Standard Edition 9.x on Windows 2000? What about Enterprise?

  • Unread emails being marked as read

    I have noticed a strange occurrence on mu ipad mini which I haven't seen before. My emails are set to download manually and not be pushed. When I go into my account and download any emails they download fine and are marked unread. If I were to switch

  • Submit XML to PHP

    Hi, I have problem with that. I`ve done regular button with javascript on click event. var aSubmitFields = xfa.data.saveXML("pretty"); xfa.host.messageBox(aSubmitFields, "XML", 1, 0); event.target.submitForm({   cURL:"http://domain.com/index.php",  

  • DNG files are too big

    I tried converting canon raw file to DNG but the dng files are 2 times at big as the canon raw files. What's up with that?