##############################################
#Header information
##############################################
#This script records a series of CAs.
#Modify chronoamperometry parameters in Section 1
#Created by Abhiroop Mishra
#Last Updated: 2021/04/23
#macrotest #Allows the macro to compile but disables output to the instrument. Comment this line out for experimental use.

folder: C:\Users\Bigdarth\Documents\Dong Ok\TM Dissolution\20240627_LMO_LiREF_AuUME\MacroData
#Notice that the “folder” command only accepts a colon (and not a “=”) as the divider
#You must create this folder manually before running the macro.
header = Chronoamp-CollectionLCO

cellon #Ensures that the potentiostat continues applying the final experimental potential (“ei” here) after the completion of any experiment

##############################################
#Section 1
#Initialization of CA
##############################################
# multiple CAs at certain substrate potential. Change the eh, el, and cl can change the duration at each e2 step.

tech = ca #Sets the experimental technique to “Chnonoamperometry”
ei = 1.3 #Sets the initially applied potential in volts
eh = 3.2 #Sets the limiting oxidative potential in volts; make sure eh = ei
el = 1.3 #Sets the limiting reductive potential in volts
pn = p #Initial potential change direction
cl = 20 #Number of steps
pw = 1 #Pulse width in seconds
si = 0.05 #Sample interval in seconds
qt = 0 #Quiet time before run in seconds
sens = 1e-8 #Sensitivity in A/V


e2on #Enables potential control at the second working electrode (the substrate)
e2 = 3.4 #Sets the applied potential of the second working electrode (the substrate) in volts
i2on #Enables signal recording at the second working electrode (the substrate)
sens2 = 1e-3 #Sets the current sensitivity for the second working electrode (the substrate) in amperes per volt

run #Executes the most recently called technique (“Chnonoamperometry” here)
save: ca_initial #Saves most recent experimental results (not appended) in a new “.bin” file
#Notice that the “save” command only accepts a colon (and not an “=”) as the divider


##############################################
#Section 2
#Program body
##############################################
#Parametric sweep of the substrate potential. Loop “a” represent forward scan of e2, loop “b” represent a backward scan of e2. Loop “b” can be removed, and use LSV to shift back e2 instead.

fora : 400
e2incr = 0.004
run
save: capos
nexta


e2incr = 0

END #Terminates macro