Hello
I'm trying to use the Impedance tool via script but I could not adjust the WaveGen parameters.
Is there any tutorial for AD2 in this part of the script?
In addition, is there any technical limitation for the amplitude to be exactly zero?
Because, for me ( voltammetric cyclic ), does it make any sense to just adjust the Offset and not have the Amplitude;
Thank you very much
Cleber Borges
Image of WaveForm Debugger below
//// script ///
// Step 01: Calculate the Impedance (Z) (fixed frequency) versus the Voltage variation (range)
// Step 02: Calculate the current (Ic)
// Step 03: Make a XY plot ( current as function of voltage )
/////////////////////////////////////////////////////////////////////
if( !('Impedance1' in this) ) throw "Please open the Impedance tool";
/////////////////////////////////////////////////////////////////////
// Configurations:
Impedance1.Frequency.value = 100
/////////////////////////////////////////////////////////////////////
var Z = [] // vector of Impedance values
var Ic = [] // vector of Current values
nScan = 100 // points numbers in scan
stepU = 10 // step (increment) in U
for( var i = 1; i < nScan; i++ ){
U = i * stepU
Impedance1.WaveGen.Offset.value = 0
Impedance1.WaveGen.Amplitude.value = U
Z = Impedance1.Traces.Ref.getData("Impedance")
print("impedance value: "+Z );
Ic = U / Z
print("current value: "+Ic );
}
//////////////
error:
////////////
Error in line: 4
TypeError: Result of expression 'Impedance1.WaveGen' [undefined] is not an object.
Error in line: 10
TypeError: Result of expression 'Impedance1.WaveGen' [undefined] is not an object.
Question
Cleber Borges
Hello
I'm trying to use the Impedance tool via script but I could not adjust the WaveGen parameters.
Is there any tutorial for AD2 in this part of the script?
In addition, is there any technical limitation for the amplitude to be exactly zero?
Because, for me ( voltammetric cyclic ), does it make any sense to just adjust the Offset and not have the Amplitude;
Thank you very much
Cleber Borges
Image of WaveForm Debugger below
//// script ///
// Step 01: Calculate the Impedance (Z) (fixed frequency) versus the Voltage variation (range)
// Step 02: Calculate the current (Ic)
// Step 03: Make a XY plot ( current as function of voltage )
/////////////////////////////////////////////////////////////////////
if( !('Impedance1' in this) ) throw "Please open the Impedance tool";
/////////////////////////////////////////////////////////////////////
// Configurations:
Impedance1.Frequency.value = 100
/////////////////////////////////////////////////////////////////////
var Z = [] // vector of Impedance values
var Ic = [] // vector of Current values
nScan = 100 // points numbers in scan
stepU = 10 // step (increment) in U
for( var i = 1; i < nScan; i++ ){
U = i * stepU
Impedance1.WaveGen.Offset.value = 0
Impedance1.WaveGen.Amplitude.value = U
Z = Impedance1.Traces.Ref.getData("Impedance")
print("impedance value: "+Z );
Ic = U / Z
print("current value: "+Ic );
}
//////////////
error:
////////////
Error in line: 4
TypeError: Result of expression 'Impedance1.WaveGen' [undefined] is not an object.
Error in line: 10
TypeError: Result of expression 'Impedance1.WaveGen' [undefined] is not an object.
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.