LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Analog discovery 2 continous data logging

Solved!
Go to solution

Hello all!

I am doing a university project which needs to use AD2 to do continuous data aquisition on analog signals.

I have tried 2 libraries: 'Digilent WF VIs' and 'AD2 toolkit'.

I found the 'Digilent WF VIs' seems not having continuous data logging features. And 'AD2 toolkit' cannot measure multiple samples.

Any help would be appreciated! Thanks!

0 Kudos
Message 1 of 8
(1,163 Views)

Well continuous data logging is rather vague.

 

Other than log data forever what are your requirements?

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 8
(1,125 Views)

This link (Getting Started with LabVIEW and Analog Discovery 2) makes me think that your best bet will be the Digilent WF VIs.

 

Probably you'll want to set up some sort of hardware-timed acquisition, and then use a While loop (or two) in LabVIEW (the two would be for some sort of Producer/Consumer architecture) in order to continuously acquire the data.

 

Try setting up a VI that can read a sample/block of samples from the AD2, and then see if wrapping the Read parts (not initialize/configure or close/shutdown/teardown methods) in a While loop gets you close to what you want.


GCentral
0 Kudos
Message 3 of 8
(1,105 Views)

I need 12.8 kHz sampling frequency to record about 10 seconds data.

Thanks!

0 Kudos
Message 4 of 8
(1,095 Views)

Hi,

I tried to use the while loop, but there are sample lost. The gap between each data block is about 0.0083s (Fs:12800/ recording time:0.5s/ measured signal: 50Hz)

As my project needs the local oscilator locked to the waveform measured by AD2, the measurement result can not phase jump. Thanks!

 

 

0 Kudos
Message 5 of 8
(1,069 Views)

I'll download the driver and take another look, but as an initial guess (without being able to read much about the functions) I'd suggest that either

a) Run should be before the loop, not in the loop?

or b) You have a problem with both being in the same loop. Try creating two parallel While loops, it may be that the timing of one is interfering with the other operation.


GCentral
0 Kudos
Message 6 of 8
(1,046 Views)

So, I suspect I was previously wrong.

I'm no longer sure you can manage what you want (continuous acquisition) using the WF VIs, and I'm fairly certain you can't with the AD2 Toolkit.

 

However, the SDK manual provided with the driver describes how you could set it up if you're willing to create your own Call Library Function nodes and call the lower-level functions.

You need to use "acqmodeScanShift" or "acqmodeScanScreen" mode acquisitions, which you can configure using the "FDwfAnalogInAcquisitionModeInfo" function.

 

Looking at the WF VI functions, they are all calls into the same library that you need to use, but they call functions like "niVB_MSO_ConfigureAnalogChannel".

Running dumpbin on the DLL provides a long list of functions (including a sizeable number prefixed by "ni" which are presumably the contents of the WF VIs VI package, and then some "niAcademic_*" functions which I suspect match the AD2 Toolkit functions.

 

Sorry for the probably frustrating news - but good luck if you decide to continue!


GCentral
0 Kudos
Message 7 of 8
(1,040 Views)
Solution
Accepted by topic author Sunq

Hello, 

Problem solved!

The Diligent waveforms software just upgraded. Now with the new dwf library, continuous data logging is achievable on LabVIEW.

Thank you very much for your information, you gave me a lot of ideas.

 

https://forum.digilentinc.com/topic/21482-analog-discovery-2-continuous-data-acquisition/#comment-61...

0 Kudos
Message 8 of 8
(1,010 Views)