02-03-2009 04:26 PM
I am trying to get my 6551 to generate data at 40MHz, but whenever I try to generate over about 12MHz I get a device data underflow error. I understand that this means that the data I am attempting to generate is not being transfered to the card from the processor fast enough, or some such thing. I read for some DAQ cards that I can set the output buffer to regenerate (just keep looping on the same data in the buffer), but I can't seem to figure out how to do this on this card, or even if it's possible. The card is supposed to be able to generate at 50MHz. Any help?
02-04-2009 11:08 AM
Thanks for posting. You are correct that the card is not receiving data fast enough and is attempting to generate data that is not present in the on-board buffer, prompting the error. Could you post your code so that we can take a look at how you have the task configured and how you are writing data to the device? Also, what is the big-picture of your application--what is the signal that you need to generate?
02-04-2009 11:46 AM - edited 02-04-2009 11:53 AM
One more thing to add... if you are not using an example currently you may want to start out with one depending on what you need.
You can regenerate your data using scripting, but if the data that you need to generate is not complicated you may be able to simply perform a standard continuous generation which will loop the data that you write to the buffer.
LabVIEW examples for HSDIO can be found in the Example Finder under:
Help >> Find Examples... >> Hardware Input and Output >> Modular Instruments >> NI-HSDIO >>
From there, you can check out Scripted and Non-Scripted examples. In particular, the Dynamic Generation with Repeat Mode.vi, and the Dynamic Generation with Script.vi are good places to start. With more information about your specific application I could go into more detail about which examples would be best--this should give you a good place to start. We also have C examples located at Start >> All Programs >> National Instruments >> NI-HSDIO >> Examples >> c.
02-04-2009 03:24 PM - edited 02-04-2009 03:32 PM
Here is the code. Nothing too fancy. I just need to get a pulse on bit 6 for this part of the test.
02-04-2009 03:33 PM
Alright, so I can't figure out how to attach images. I tried to follow the instruction in another post, and it didn't work. Anyway, trust me, I do almost exactly what is done in the example VIs mentioned above.
02-04-2009 03:35 PM - edited 02-04-2009 03:37 PM
02-05-2009 02:38 PM
According to the specifications for the 6551, the minimum waveform szie for generation of a continuous waveform is 16 samples at 50MHz. It looks like your VI is only outputting 4 samples. I would expect that you would need at least 13 samples to prevent an underflow in this situation.
Try duplicating your data a few more times in your array and see if that solves the underflow.
(See page 18 of the PXI/PCI-6551/6552 Specifications document for more details on minimum waveform size.)
National Instruments R&D