Jump to content
  • 0

Record impedance value along with the time elapsed in a CSV file


aaaaa

Question

Hi!

I have an Analog Discovery 2, and I want to ask: Is it possible to save the value of impedance |Z| measured by the meter, along with the time that has elapsed since the start of a succession of measurements, into a CSV file at intervals of x time units?

Thank you very much.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hi @aaaaa

You can use the Script tool like this:

image.png

Impedance.run();
var t0 = Date.now()
for(var i = 0; wait(0.999) && i < 1000; i++){ // wait 999ms
    var v = (Date.now()-t0)+","+Impedance.Traces.Trace.getData("Impedance")[0];
    print(v); // ms, ohm
    FileAppendLine("~/Desktop/imp.csv",v);
}

 

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...