Sequencing Electrochemical Experiments

In some cases, you may want to link several experiments together to automate a more complex measurement.  These linked experiments are called a sequence.  For example, you can write a sequence to automatically run a series of Linear Sweep Voltammograms on a Rotating Disk Electrode at 250 RPM, 500 RPM, 1000 RPM, and 2000 RPM.  These sequences may also include time delays (i.e., wait for 30 minutes) or time triggers (i.e., wait until 10:00 AM).    

In Explain, two special types of scripts are used to create sequences.  These are called the "Master Script” and the "Auto Script”.  A Master Script is an Explain script that contains a list of other scripts to be run and when to run them.  Since the Master Script is written in Explain, you can create very flexible experiment sequences.   

The Master Script calls the Auto Scripts, which, in turn, run the experiments. The Master Script provides a way to schedule the timing and repetitions of the Auto Scripts. Appendix B is the Runmany.exp script, which is an example of a Master Script that is delivered with the Gamry Framework software.  This script consists primarily of a number of calls to the function LaunchWait().  The format for the LaunchWait() function is as follows: 

   if(LaunchWait(AutoScriptFile,SetupFile,SetupName,
OutputFile,PstatNo,ChannelNo)) eq  FALSE)
     return

The AutoScriptFile must be an Auto Script, which will be discussed below.  The SetupFile and SetupName are created by saving setup information using the Save button in the setup window generated by the regular (non-Auto) script.  For example, the setup information for an automated polarization resistance experiment would be saved using the setup box from the polres.exp script.  OutputFile is the name of the data file which will be created.  PstatNo is the number of the potentiostat in the computer that should be used to run the experiment (1 through 4 are available options, 1 being the default for a single potentiostat in a computer).  ChannelNo is the channel on the ECM8 multiplexer which will be used, a value of NIL is used when no multiplexer is present.  

Note that the use of an “if” statement before the LaunchWait() test requires that the experiment was successfully completed before moving on to the next experiment.

Auto Scripts are experiments designed to be launched by a Master Script.  The major difference between an Auto Script and the corresponding normal script is that the Auto Script is designed to run with minimal operator interaction.  Instead of asking the operator to supply experiment parameters, the parameters are read from setup files.  You'll need to create setup files for each type of experiment to be performed.  In addition, warning messages and queries requiring user input are avoided so the sequence does not pause waiting for an "OK"

Another difference is that the Master Script can pass parameters to the Auto Script.  This allows parameter sets, file names, etc. to be controlled by the Master Script.  A side effect is that you cannot call the Auto Scripts directly from the Gamry Framework since they expect input parameters.

You can create your own Auto Script or use the Auto Scripts Gamry has added to the application packages.  Both original and automated versions create the same data file formats so the analysis routines will work with data files from either.

Gamry supplies a number of Auto Scripts with our standard software packages.  They are easy to find – go to the Scripts Folder and look for the “Auto” appended to the normal script name.  For example, the standard script for Polarization Resistance is “Polarization Resistance.exp”.  The Auto Script is “Auto Polarization Resistance. Exp”.  




Home | Products | App Notes | Sales | Contact | News | Support | Search

Batteries | Fuel Cells | Corrosion | Paints & Coatings | Physical Electrochemistry

 

 

Gamry Instruments © 1997-2007
  
Last revised on Monday, February 19, 2007