Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

PCI-6534 - every N samples acquisition into buffer - time?

Hi everyone,

 

I am trying to acquire about 100000 samples (16-bit - Port A and B) at 20Mhz using PCI-6534. I am using "Register for Events" - every N samples acquisition into buffer to make a PFI line go toggle (i.e. high-low or low-high) everytime it finished acquiring 100000 samples.

 

My question is does PCI-6534 do automatic DMA transfer to hard-drive? Or do I have to do something special? It seems like acquiring 100000 samples is longer than expected. Theoretically it should take about 5 milliseconds (@ 20 Mhz clock)  but I am thinking it's taking about 10 milliseconds... 

 

Any thoughts?

 

I added a part of LabVIEW program where I am using Register Events. Let me know if someone needs more information.

 

Thanks 🙂

 

Cheers,

YK

 

 

0 Kudos
Message 1 of 3
(3,650 Views)

Hey YK,

 

Have you considered using one of the data lines on the other ports (C & D, or 2 & 3) to generate your pulse/trigger when your N samples have been acquired? This would be much faster than having software wait for an event and then generate your pulse. If you use the onboard clock, or even if you use an external clock, you could generate 100,000 samples, where all of them would be 0's and then on the last sample a 1. This would in a sense create your trigger signal when it is done acquiring the 100,000 samples. The generation and acquisition would both work off of the same clock source. If you want it to have a little delay after the 100,000th sample, you could acquire on the rising edge of the clock, and then generate on the falling edge of the clock. Or you could generate 100,001 samples, which would allow you to trigger a sample after the acquisition has completed, but if your acquisition clock is only 100,000 pulses, then this would not work. So I would recommend generating on the last 100,000th sample.

 

For your question about how the 6534 transfers data to the PC, the board does DMA the data to system memory, not to your hard drive. You have to save the data to disk if you want it to go to your hard drive. Also, there is onboard memory on the 6534 that the data goes into first, and then it gets sent across the PCI bus, but that is pretty fast, so it is negligible to how long it is taking the data to be acquired. One thing you could do to "time" your acquisition is to use my suggestion above with the generating 100,000 samples along with your acquiring 100,000 samples, but this time you could output a 1 as the first sample and the last sample on a data line, and then with a scope measure the time between the rising edges, but you would have to add 1 samples worth of time to that measurement. Or if you are doing a continuous acquisition, you could also do a continuous generation, only have a 1 on the last sample of your 100,000 generated samples, and then measure the time between the rising edges, as this would give you the exact time between each 100,000 samples acquired. If you are doing continuous acquisition, and need a continuous generation example, a good one to check out would be this example that uses the onboard memory so you don't have to stream data from the PC to the device while it is generating, which will also save PCI bus bandwidth.

I hope this helps. Please let me know if you have questions on this suggestion. Thanks, and have a great day.

Regards,

DJ L.

0 Kudos
Message 2 of 3
(3,635 Views)

Hi DJ L:

Thank you so much for your very insightful reply to my question. I have thought about the idea of using other data lines (Port C and D) but unfortunately, we are using all the ports in two groups (Port A+ B and Port C+D) of 12-bit digital data lines (24 DIO lines out of 32 DIO) for acquisition purpose.  

I tried to use manually selecting individual data lines (e.g. Line 0 to Line 11) but for some reason DAQmx doesn't seem to like that. So right now I have configured for all 16 lines and using Digital Signal Subset to isolate only 12 DIO lines out of the 16 DIOs.  

I am not sure if PCI-6534 is capable of changing port direction on the fly. May be that's why when I tried to use a simple VI to read data first and then write some data using a simple boolean push button, it couldn't do it.

Although I am using an external clock with finite acquisition, I would still like to time my acquisition using Port C+D, just to see how long it really takes. Thanks for great suggestion!

Also, thanks for information on the how 6534 transfers data. It has 32 MB on board memory per group (totally forgot about that). So DMA only to the on-board memory not RAM/hard-drive on the PC. In the past I tried to write my acquired data to a binary file because that's the fastest way to write (according to LabVIEW) but I had only single channel to worry about.

But now I think I should seriously consider PCIe-6537 which "stream" to a RAID hard-drive like a streaming device and can "theoretically" change port direction on the fly. I will get the speed of 50 MHz clock too.

I know I am asking a lot of information but have you by any chance used PCIe-6537 before?

Thank you so much for your help and insights! I really appreciate it 🙂

Cheers,

YK

0 Kudos
Message 3 of 3
(3,627 Views)