Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

pxi 6551 device data underflow

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?

 

~Benjamin

0 Kudos
Message 1 of 7
(4,365 Views)

Hi Benjamin,

 

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?

 

-John 

John Passiak
0 Kudos
Message 2 of 7
(4,348 Views)

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.

 

-John

Message Edited by John P on 02-04-2009 11:46 AM
Message Edited by John P on 02-04-2009 11:53 AM
John Passiak
0 Kudos
Message 3 of 7
(4,345 Views)

Here is the code.  Nothing too fancy.  I just need to get a pulse on bit 6 for this part of the test.

 

 

 

 

Message Edited by BenjaminS on 02-04-2009 01:32 PM
0 Kudos
Message 4 of 7
(4,329 Views)

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.

0 Kudos
Message 5 of 7
(4,324 Views)

Oh wait.  Got it.

 

 

Message Edited by BenjaminS on 02-04-2009 01:37 PM
0 Kudos
Message 6 of 7
(4,323 Views)

Hi Benjamin,

 

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

 

Keith Shapiro

National Instruments R&D

Message 7 of 7
(4,301 Views)