Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Streaming with PXIe-6544

Solved!
Go to solution

I am in the planning stages for a system using PXIe-6544 cards.  I do not have hardware yet.  I want to continuously stream my generation and acquisition and perform real time software compare.  I want to be able to run minutes, hours, or days and be able to count the fails and calculate the fail rate.  I am looking at example "Continuous Acquisition - Stream to Memory".  In this example, property SamplesPerRecordIsFinite is set to FALSE, SetRelativeTo is set to "current position".  In a loop, "FetchBacklog" property is queried until there is enough data, and a Fetch Waveform action is performed.  My questions are: can I run this streaming acquisition forever, or does it stop when the card memory is full?  I suspect it can go forever since most logic analyzers have "circular memory" but I don't want to assume.  Also, I will be acquiring 16 bits of data at 20MHz clock rate, so about 40MB/s data rate.  I assume this approach will work at this data rate since it is much slower than the streaming capacity of the 6544.  Will this be a problem?

0 Kudos
Message 1 of 9
(6,286 Views)
Solution
Accepted by topic author j_osh_o

Hello,

 

The memory pointer will roll over once it hits the end of memory.  Once the FetchBackLog hits a specified value, it will pull all the values off the board and move the "oldest" sample pointer forward and refresh with new backlog information.  This will enable your stream to continue indefinitely.  The onboard memory will determine maximum buffer size you can achieve.  

 

At the rate you wish to run and the channels, that will not be a problem either.  The PXIe backplane communication will enable the board to hit rates of 660MB/s acquisition and 400MB/s generation for this HSDIO board.  Even with PXI (theoretical 130MB/s throughput) you would not have issues with 40MB/s off the board.

Kyle A.
National Instruments
Senior Applications Engineer
Message 2 of 9
(6,278 Views)

hi kyle,

 

I need to stream 1 channel from pxie 6544 with 40MHz rate. Do you think I need to use SSD or no? I'm also using the same example Digital Data Acquisition - Stream to Memory.VI to acquire the data. 

 

regards,

Yan.

0 Kudos
Message 3 of 9
(6,060 Views)

Hi Yan,

 

You might want to benchmark whichever hard drive you are using with the tools we provide here (you will use file write/read benchmark utility VI's).  Most likely, you will not need an SSD for 40MB/s (assuming you are streaming U8 data) but it would be good to benchmark it first.  Thanks.

 

ni.com/streaming

Kyle A.
National Instruments
Senior Applications Engineer
0 Kudos
Message 4 of 9
(6,056 Views)

hi Kyle, thanks for the links. I've used the benchmark VI to test how fast my system writes the datas.

But still, with using continuous acquisition - stream to disk.vi (I'm saving my data with tdms), I got full buffer error, when writing 1 byte with (40MHz clock rate). this is the screenshot:

 

zoomed in.png

 

 

 

even without displaying the graph doesnt help. But, if I'm not saving the datas, it works fine. Might there's something basic I dont know?

 

regards,

Yan.

0 Kudos
Message 5 of 9
(6,042 Views)

Hi Mystogan,

 

With the settings you had, I was able to save the fetched data to a TDMS file, without getting error -1074115589. I am not sure how you modified the block diagram to stream to disk, but since saving the data is causing this error, you may want to consider the Producer/Consumer Design Pattern. You can use this design pattern to ensure that the Fetch Waveform rate is not slowed down by other processes such as writing to a file. 

Tunde S.
Applications Engineer
National Instruments
0 Kudos
Message 6 of 9
(6,016 Views)

hi Tunde,

 

you got no error without SSD harddisk? can you please show me how you save the fetched data? this is what I do with my VI to save the fetched data to tdms file.

 

savetdms.png

0 Kudos
Message 7 of 9
(6,006 Views)

With your VI and the settings you posted earlier, I ran into error -1074115589 too. However, I was able to stream to disk with the same settings by modifying your code to use the Producer/Consumer Design Pattern.  The “Why use Producer/Consumer?” section at the Producer/Consumer Design Pattern link that I posted earlier explains why this design pattern is helpful.

 

hsdio_streaming.png

 

The code snippet, above, shows how I used the producer/consumer loop in order to avoid the error that states the requested data on your PXI-6544 has been overwritten. 

 

The attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system, or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject to the Sample Code License Terms which can be found at:

http://ni.com/samplecodelicense 

Tunde S.
Applications Engineer
National Instruments
Message 8 of 9
(5,977 Views)

hi Tunde, thanks for your input, it helps Smiley Happy

0 Kudos
Message 9 of 9
(5,962 Views)