Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

pattern generation and acquisition loopback

Hi,
 
I am working over the NI DIO 32 HS 6534 card for the first time. One of my program in my application over the card is to run a loop back test using buffered configurations. I want to transmit a buffered pattern from one port and read it back through another port using the internal clock reference and verify that the data received is the same as data transmitted. I am able to do that perfectly at lower update rates (below 10000 updates/sec). But when i try the same at higher update rates i either miss out some data or read some junk data. I am unable to synchronize the configurations. I have to do this test at higher update rate ( >= 4Mhz). Attached is the example code which i tried and which works for lower update rates. Please help me out solving the problem.
 
Regards,
Siddu
0 Kudos
Message 1 of 8
(3,430 Views)
Hello Siddu,
 
Can you run the example VI at: http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B123AE0CB94D111EE034080020E74861&p_... ?  This example demonstrates how to synchronize the Digital Input and Digital Output tasks.  If you can run the example (even at the high speeds) then there is probably a problem with your code.
 
Please let me know your results.
 
Regards,
Sean C.
0 Kudos
Message 2 of 8
(3,409 Views)

Hi Sean,

I tried the code which you have sent and tried to run using internal clock as reference. Now i am missing data at lower speeds even at lower speeds.

Regards,

Siddu

0 Kudos
Message 3 of 8
(3,402 Views)
Hello Siddu,
 
I modified your code a little, and was able to get very good results up to 3.33 MHz.  Will this be fast enough for your application?  If you try to do this at rates of higher than 3.33 MHz, you will only read in every other sample.  I have escalated this issue to R&D and I am currently waiting on a response.  I will let you know what I find out.
 
Please see the attached VI for details about my modifications.
 
Let me know if you have any further questions.
 
Regards,
Sean C.
Message 4 of 8
(3,385 Views)

Hi Sean,

Thanks for the help. I could do the loop back test till 2.5Mhz clock rate. I am getting jumbled data for any of the clock rates beyond that. Am not sure whether the results depend on the pc speed and other factors like windows version. Still confused on why we could not work at higher speeds and suspect whether the card can really operate at 20Mhz.

Regards,

Siddu

 

0 Kudos
Message 5 of 8
(3,375 Views)

Hello Siddu,

First, the benchmark for 20 MHz is for a single timing engine at a time. Since you are using both timing engines (one for input, one for output), then you will lose some bandwidth because the board must share an internal bus between the two groups. That will cause some overhead.  Nonetheless, I think you should be able to go faster than 3.3 MHz.  I have presented this issue to a developer and am waiting on a response.  In the meantime, would you be willing to try this in NI-DAQmx?

Regards,
Sean C.

0 Kudos
Message 6 of 8
(3,365 Views)
Hi,

I also am trying loopback on 6534, using burst mode and internal clock.  I am running at 2 MHz.  I am using DAQ-MX and visual C++.   I have successfully sent and looped back a  single burst of 16 Mbytes.  However, the "number of samples read" values that I get back from the 'digital read' function is always '0', so that's wierd.... hmm..... But, the data is correct.

I would like to put this in a loop.  Can you post the loop code, C/C++?  I'm happy to try it.  Thanks for any help you may be able to offer.

Sincerely,

Kip Leitner  
0 Kudos
Message 7 of 8
(3,114 Views)
Hi Kip,

You should be able to add a loop to your current code, looping just the writing and reading portion, you won't need to loop starting and stopping the code. 

Where are you reading the number of samples read value? 

Regards,
Micaela N
National Instruments
0 Kudos
Message 8 of 8
(3,107 Views)