NI Home > Community > NI Discussion Forums

Digital I/O

Showing results for 
Search instead for 
Do you mean 
Reply
Member
jonnnnnnn
Posts: 28
0 Kudos
Accepted Solution

Edge detection in recorded data

Hello,

We are going to perform some high speed data capture using a number of PXIe-6537 cards.

 

Once we have captured the data we need to re-load it and decrypt it. One of the steps of this decryption will require edge detection on specific lines, in the recorded data. Traditionally, in a language such as C++, the code would loop through the data keeping the previous values for comparison. It strikes me that LabVIEW might be a bit smarter than that, if we knew where to look. Is there a better way, e.g. replay the data through a simulated card? Load the data into some structure and perform a function call on it? (We're expecting a lot of data, so we won't be able to load it all in at once)

 

If anyone could point us in the right direction that would be most helpful,

Thanks, Jon.

Member
Jamie_S.
Posts: 158
0 Kudos

Re: Edge detection in recorded data

Hi Jon,

 

Thank you for your forum post.

 

Just to confirm, you wish to continuously "Acquire" data (storing in a file) then "Generate" an output based on the stored data following some post-processing/decryption.

 

The PXIe-653x series of HSDIO cards utilise the "DAQmx API" functions (known as VI's in LabVIEW) to perform such tasks. Unfortunately you won't be able to utilise a "Simulated Card" such as the ones configurable in "Measurement and Automation Explorer" to replay data, the simulated cards are used for setting up tasks, testing and coding NI hardware that has yet to be purchased, their input/output is a fixed.

 

Can I refer you to some examples (linked below) that illustrate how DAQmx API calls can be used to both Acquire and Generate data.

 

Example - DAQmx: High Speed Digital Continuous Acquisition for the 6536/6537 (continuously acquires data, storing it in the card's RAM)

 

Example - Continuously Generate and Acquire Source Synchronous Data with Software Compare

 

As you are logging to file can I recommend utilising the "Producer/Consumer" architecture whereby data is queued in FIFO memory as it is acquired, so the acquisition loop can run at a faster rate. The data is dequeued in the second lower priority loop and written to file.

 

Community Example - Using Producer/Consumer Architecture for DAQmx Read and Write to File

 

Your data will then have to be "looped through" as you would in C++, the post-processing/decryption will then be performed before the data is written out via the card.

 

Hopefully this assists when considering the architecture of your application Jon.

 

Many Thanks

Jamie S.

Applications Engineer
National Instruments
Member
jonnnnnnn
Posts: 28
0 Kudos

Re: Edge detection in recorded data

Thanks,

A loop it is then.

 

Jon.