From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Edge detection in recorded data

Solved!
Go to solution

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.

0 Kudos
Message 1 of 3
(4,521 Views)
Solution
Accepted by topic author jonnnnnnn

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
0 Kudos
Message 2 of 3
(4,502 Views)

Thanks,

A loop it is then.

 

Jon.

0 Kudos
Message 3 of 3
(4,500 Views)