The script creates the Setup dialog box, which becomes the active window and accepts changes in the experimental parameters. This Setup box remembers the experimental settings from the last time this script was run. To restore the parameters to the values defined in the script, click the Default button. If the Advanced Pstat Setup is on, a second Setup dialog box containing hardware-configuration details becomes the active window, so you can modify the hardware configuration.
The potentiostat is initialized. The current range is set to a range that allows the measurement of currents as big as the value of the Max I Setup parameter.
Finally the actual scan occurs.
N is the number of steps that have already occurred. At the start of the scan N is zero.
The potential of the sample is set to the staircase potential (Initial E plus N times the step height) plus the pulse size. This potential is applied for half the period of the square wave. At the end of this time, a current measurement is made. The sign of the pulse size is controlled, so that the pulse is always in the direction of the final potential.
A voltage equal to two times the pulse height is subtracted from the cell voltage. This voltage is equivalent to Initial E plus N times the step height minus the pulse size. This new voltage is held for half the square-wave period. At the end of this time, a current measurement is made.
The difference between the second and first current measurement (I1 – I2) is calculated and plotted versus the staircase potential.
If Autoranging was selected in Setup and the SWV frequency is less than 50 Hz, after each point the current range is automatically switched to the optimal range for the measured cell currents.
The cell is turned off. The script pauses to allow you to admire the curve you have just collected.