NOTE: With the advent of the Sequence Wizard, creating auto scripts is unnecessary. We include the discussion pages concerning auto scripts for the sake of completeness, and instead, recommend you use the Sequence Wizard for automated experiments.
The easiest way to create a master script is to use the Gamry editor to modify one of the sample master scripts we have included. The sample master script above is named RUN MANY.EXP and is included in the Gamry Framework installation. You can load RUN MANY.EXP into the Gamry Framework by using the File > Open command. To avoid actually modifying RUN MANY.EXP, immediately use File > Save As to change the filename to a new name like MYEXPS.EXP. You can now edit this file without worrying about changing RUN MANY.EXP. This sample script carries out three experiments: a Corrosion Potential experiment, a Polarization Resistance experiment, and an Electrochemical Impedance experiment. Each experiment is run by using calls to LaunchWait(). The NILs in the place of MuxChannel indicate that no multiplexer is used.
Look again at the first line in RUN MANY.EXP that starts an auto script:
if (LaunchWait("Auto Corrosion Potential.exp","auto.set","Ecorr","autocpot.dta",1,NIL) eq FALSE)
The first parameter to the first LaunchWait() is AUTO CORROSION POTENTIAL.EXP. This is the name of the script file that runs the Corrosion Potential experiment.
Suppose you need to set up a polarization experiment in your master script. You need to list AUTO POLARIZATION RESISTANCE.EXP as the first parameter to LaunchWait(). Continuing on, suppose you are using the setup created above (MyRpSetup in MYPARMS.SET) and you want to use potentiostat 1 on multiplexer channel 5 and save the data into RP.DTA. You edit the first call to LaunchWait() to read:
if (LaunchWait("Auto Polarization Resistance.exp","myparms.set","MyRpSetup","rp.dta",1,5) eq FALSE)
It does not matter whether you refer to AUTO POLARIZATION RESISTANCE.EXP or auto polarization resistance.exp or Auto Polarization Resistance.Exp. The strings used when calling LaunchWait() are not case-sensitive.
Be careful about the names of the parameter setup and setup file. If you mistakenly give a non-existent name for the file or the setup, your master script gives you an error message "SetupRestore failed", pauses until the message is acknowledged, then aborts that experiment script. You then get the choice of aborting all experiments or continuing to the next experiment.
Be careful also when you name the output data file. If this file exists beforehand, it gets overwritten when that particular experiment is run. You get no warning messages about an existing file.
The multiplexer number used in the experiment scripts is always assumed to be the same as the potentiostat number. For example, if a multiplexer is used with potentiostat 1 it is assumed to be multiplexer 1, while potentiostat 2 is paired with multiplexer 2. If you are not using a multiplexer, use NIL as the channel number.
The RUN MANY.EXP master script is designed to run three experiments sequentially. If you don't need that many experiments, you may delete the extra lines that call LaunchWait(). If you need more than three experiments, use the Copy function of the Gamry editor to add extra calls to LaunchWait().