PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Read data from FlexRIO

Hi Valentin87,

 

Thanks for explaining that for me. The closest resouce available to help you get started ishttps://decibel.ni.com/content/docs/DOC-15799.  There are some synchronization example in this library that can help lead you to the right direction.

You would need to basically connect the FCO and DCO lines to the CLIP lines and read the signal. Then have some edge detection mechanism like David has posted, do some logic analysis, and start reading data based on that. 

 

 

National Instruments
Applications Engineer
0 Kudos
Message 11 of 12
(2,656 Views)

@Edna-S wrote:

 

...The closest resouce available to help you get started ishttps://decibel.ni.com/content/docs/DOC-15799.  There are some synchronization example in this library that can help lead you to the right direction...


Those examples are used to synchronize the acquisition of analog data across our Digitizer FAMs. Unfortunately the FlexRIO Instrument Development library doesn't ship with examples demonstrating how to use the libraries with HSDIO modules.

 


@Valentin87 wrote:

David posted variant of code - there we only detected state of FCO (changed level or not). But we can start read data in random time, for example, acquisition begins from red line. In this case we lost 2 bits of word, i.e. when we read 12-bit word (acquisition begins from red line) it consists bits 10 to 0 of 1-st word and bits 11, 10 of 2-nd word. Is it possible to synchronizing with rising slope of FCO so as not to lose bits?


The exact implementation will vary depending on how you are breaking your data into words. 

 

But presumably you have an array of boolean data that is populated with bits from the DCO line and you are rotating and replacing a subset of that array with the latest data every iteration. When you see a rising edge on FCO you remove a subset of that array and pass it into a FIFO to be stored in some other location as a word. If you want to account for FCO being some random number of bits before or after the start of the word then you will need to insert an offset in the value that is used to remove a subset of data from the array.  

0 Kudos
Message 12 of 12
(2,642 Views)