Jump to content
  • 0

Continuously collecting impedance data for up to 1 hour


Alicia865

Question

default.dwf3work

I am trying to use the Digilent Analog Discovery 2 Device to continuously collect data on impedance and phase angle. I have the device set to run from 1kHz-25MHz with 101 steps, an amplitude of 50 mV, resistor set to 1 ohms, and averaging every 50ms. Included is a sample of the workspace. My goal is to continuously collect data on a sample for a set time limit (up to 1 hour- though even 10 minutes would be a good start). The frequency sweep can restart during this timeframe, but I cannot manually collect several references since only 8 references can be stored at a time. Is there a way to collect this continuously data and have it exported to a .csv afterwards?

Other options: Another idea is to continuously collect impedance and phase angle data at 20kHz (it's a good frequency for my samples), but I'm not sure if that would work without a frequency sweep. I have also tried doing this on labview, but there has been little progress since I haven't found any guides on making impedance analyzers that use the analog discovery 2 device on labview.

Any help is appreciated! Please let me know if any other information is needed. This is my first post on these forums :)

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Hi @Alicia865

You can use a short script to automate the export like this:

image.png

// 1 hour = 60min * 60sec * 1000ms
for(var i = 0, end = Date.now()+60*60*1000; end > Date.now(); i++){
    Impedance.single();
    if(!Impedance.wait()) break; // wait for or exit on stop
    print(i);
    Impedance.Export("~/Desktop/ia/file"+i+".csv", "Impedance Analyzer", false);
}

image.png

Edited by attila
Link to comment
Share on other sites

  • 0

Thank you very much for your help @attila 😄

I noticed that (1) the export saves each frequency sweep in a separate .csv file, (2) the files appear after the workspace is closed, and (3) if several runs are conducted, only the most recent run will export.

I can work around these, but for convenience, how would you recommend adding a script that combines the frequency sweeps from one run into one .csv that is generated after the time limit without needing to close the workspace? It would be much easier to collect data on samples back to back like this.

I would love to learn more about scripting since this is very new to me.

Link to comment
Share on other sites

  • 0

Hi @Alicia865

1. This is what the above script does.
2. No, the csv files appear immediately when the script calls the export function.
3. When pressing the export menu or calling the function the current data is save, what you see is what you get.
You could write a script to append data to file, see the Help tab/ Script/ File functions
There are various export sources, the "Impedance Analyzer" contains all the opened views and traces.
A constant frequency can also be used, like here 10s average and 60 steps will take about 10minutes, if this is what you are looking for.

image.png

image.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...