Device Control

enum PotentiostatMode(value)

Working modes for the potentiostat

Member Type

int

Valid values are as follows:

POTMODE_POTENTIOSTATIC = <PotentiostatMode.POTMODE_POTENTIOSTATIC: 1>
POTMODE_GALVANOSTATIC = <PotentiostatMode.POTMODE_GALVANOSTATIC: 2>
POTMODE_PSEUDOGALVANOSTATIC = <PotentiostatMode.POTMODE_PSEUDOGALVANOSTATIC: 3>
enum ScanStrategy(value)

Options for the EIS scan strategy

  • SINGLE_SINE: single frequency sweep

  • MULTI_SINE: multi sine

  • TABLE: frequency table

Member Type

int

Valid values are as follows:

SINGLE_SINE = <ScanStrategy.SINGLE_SINE: 0>
MULTI_SINE = <ScanStrategy.MULTI_SINE: 1>
TABLE = <ScanStrategy.TABLE: 2>
enum ScanDirection(value)

Set the scan direction for EIS measurements.

  • START_TO_MAX: from the start frequency to the maximum frequency

  • START_TO_MIN: from the start to the minimum frequency

Member Type

int

Valid values are as follows:

START_TO_MAX = <ScanDirection.START_TO_MAX: 0>
START_TO_MIN = <ScanDirection.START_TO_MIN: 1>
enum FileNaming(value)

Options for the file names in Thales.

  • DATE_TIME: naming with time stamp

  • INDIVIDUAL: only the specified filename without extension

  • COUNTER: consecutive number

Member Type

int

Valid values are as follows:

DATE_TIME = <FileNaming.DATE_TIME: 0>
COUNTER = <FileNaming.COUNTER: 1>
INDIVIDUAL = <FileNaming.INDIVIDUAL: 2>
enum Pad4Mode(value)

Options for the PAD4 operating mode.

All channels can be either voltage or current. Individual setting is not possible.

Member Type

int

Valid values are as follows:

VOLTAGE = <Pad4Mode.VOLTAGE: 0>
CURRENT = <Pad4Mode.CURRENT: 1>
class ThalesRemoteScriptWrapper(remoteConnection: ThalesRemoteConnection)

Wrapper that uses the ThalesRemoteConnection class. The commands are explained in the Remote2-Manual. In the document you can also find a table with error numbers which are returned.

Parameters

remoteConnection – The connection object to the Thales software.

getCurrent() float

Read the measured current from the device

Returns

the measured current value

getPotential() float

Read the measured potential from the device

Returns

the measured potential value

getVoltage() float

Read the measured potential from the device

Returns

the measured potential value

setCurrent(current: float) str

Set the output current

Parameters

current – the output current to set

Returns

response string from the device

setPotential(potential: float) str

Set the output potential

Parameters

potential – the output potential to set

Returns

response string from the device

setVoltage(potential) str

Set the output potential

Parameters

potential – the output potential to set

Returns

response string from the device

setMaximumShunt(shunt: int) str

Set the maximum shunt index for measurement

Set the maximum shunt index for impedance measurements.

Parameters

shunt – the number of the shunt

Returns

response string from the device

setMinimumShunt(shunt) str

Set the minimum shunt for measurement

Set the minimum shunt index for impedance measurements.

Parameters

shunt – index of the shunt to set

Returns

response string from the device

setShuntIndex(shunt: int) None

Set the shunt index for measurement

Fixes the shunt to the passed index.

Parameters

shunt – The number of the shunt.

Returns

reponse string from the device

setVoltageRangeIndex(vrange: int) str

Set the voltage range for measurement

If a Zennium, Zennium E, Zennium E4 or a device from the IM6 series is used, the set index must match the U-buffer. If the U-buffer does not match the set value, the measurement is wrong. The Zennium pro, Zennium X and Zennium XC series automatically change the range.

Parameters

vrange – index of the voltage range

Returns

response string from the device

selectPotentiostat(device: int) str

Select device onto which all subsequent calls to set* methods are forwarded

First, the device must be selected. Only then can devices other than the internal main potentiostat be configured.

Parameters

device – Number of the device. 0 = Main. 1 = EPC channel 1 and so on.

Returns

reponse string from the device

selectPotentiostatWithoutPotentiostatStateChange(device: int) str

Select device onto which all subsequent calls to set* methods are forwarded

Device which is to be selected, on which the settings are output. First, the device must be selected. Only then can devices other than the internal main potentiostat be configured. The potentiostat is not turned off.

Parameters

device – Number of the device. 0 = Main. 1 = EPC channel 1 and so on.

Returns

The response string from the device.

switchToSCPIControl() str

Change away from operation as EPC device to SCPI operation

This command works only with external potentiostats of the latest generation PP212, PP222, PP242 and XPOT2. After this command they are no longer accessible with the EPC interface. Then you can connect to the potentiostat with USB via the Comports. The change back to EPC operation is also done explicitly from the USB side.

Returns

response string from the device

switchToSCPIControlWithoutPotentiostatStateChange() str

Change away from operation as EPC device to SCPI operation.

This command works only with external potentiostats of the latest generation XPOT2, PP2x2, EL1002. This requires a device firmware with at least version 1.0.4. After this command they are no longer accessible with the EPC interface. Then you can connect to the potentiostat with USB via the Comports. The change back to EPC operation is also done explicitly from the USB side.

This function leaves the potentiostat in its current operating state and then switches to USB mode. This should only be used when it is really necessary to leave the potentiostat on, because between the change of control no quantities like current and voltage are monitored.

To ensure that the switch between Thales and Python/SCPI is interference-free, the following procedure should be followed. This is necessary to ensure that both Thales and Python/SCPI have calibrated offsets, otherwise jumps may occur when switching modes:

  1. Connect Zennium with USB and EPC-device/power potentiostat (XPOT2, PP2x2, EL1002) with USB to the computer. As well as Zennium to power potentiostat by EPC cable.

  2. Switch on all devices.

  3. Allow the equipment to warm up for at least 30 minutes.

  4. Select and calibrate the EPC-device in Thales (with Remote2).

  5. Switching the EPC-device to SCPI mode via Remote2 command.

  6. Performing the offset calibration with Python/SCPI.

  7. Then it is possible to switch between Thales and Python/SCPI with the potentiostat switched on.

With Thales, the DC operating point must first be set. When changing the EPC device then measures current and voltage and sets the size internally. When switching back to Thales, the same DC operating point must be set as when switching from Thales to USB.

Returns

The response string from the device.

getSerialNumber() str

Get the serial number of the active device

Active device ist the device selected with selectPotentiostat().

Returns

the device serial number

getDeviceInformation() tuple[str, str]

Get the name and serial number of the active device

Returns

tuple with the information about the selected potentiostat. (Name, Serialnumber).

getDeviceName() str

Get the name of the active device

Returns

the device name

readSetup() str

Read the currently set parameters

A string containing the configuration is returned. For Example:

OK;SETUP;Pset=1.0000e-05;Cset=1.0000e-06;Frq=1.0000e+03;Ampl=0.0000e+00;Nw=1;Pot=0;Gal=0;GAL=0;Cmin=-3.0000e+00;Cmax=3.0000e+00;Pmin=-5.2377e+00;Pmax=5.2377e+00;DEV=0;EPC=0;MAXDEV=4;ENDSETUP
Returns

reponse string from the device

calibrateOffsets() str

Perform offset calibration on the device

When the instrument has warmed up for about 30 minutes, this command can be used to perform the offset calibration again.

Returns

response string from the device

enablePotentiostat(enabled: bool = True) str

Switch the potentiostat on or off

Parameters

enabled – Switches the potentiostat on if True and off otherwise

Returns

response string from the device

disablePotentiostat() str

Switch the potentiostat off

Returns

response string from the device

setPotentiostatMode(potentiostatMode: PotentiostatMode) str

Set the coupling of the potentiostat

This can be PotentiostatMode.POTMODE_POTENTIOSTATIC or PotentiostatMode.POTMODE_GALVANOSTATIC or PotentiostatMode.POTMODE_PSEUDOGALVANOSTATIC.

Parameters

potentiostatMode (PotentiostatMode) – The coupling of the potentiostat

Returns

response string from the device

enableRuleFileUsage(enable: bool = True) str

Enable the usage of a rule file

If the usage of the rule file is activated all the parameters required for the EIS, CV, and/or IE are taken from the rule file. The exact usage can be found in the remote manual.

Parameters

potentiostatMode – Enable the state of rule file usage.

Returns

response string from the device

disableRuleFileUsage() str

Disable the usage of a rule file

Returns

reponse string from the device

setupPad4Channel(card: int, channel: int, state: Union[int, bool], voltageRange: Optional[float] = None, shuntResistor: Optional[float] = None) None

Setting a channel of a PAD4 card for an EIS measurement

Each PAD4 channel must be configured individually. Each channel can be switched on or off individually. But the PAD4 measurements must still be switched on globally with enablePad4Global(). Each channel can be given a different voltage range or shunt.

Parameters
  • card – index of the card starting at 1 and up to 4

  • channel – index of the card starting at 1 and up to 4

  • state – If 1 or True the channel is switched on else switched off

  • voltageRange – input voltage range, if this differs from 4 V

  • shuntResistor – shunt resistor, which is used. Only used if setupPad4ModeGlobal() is set to Pad4Mode.CURRENT

Returns

reponse string from the device

setupPad4ModeGlobal(mode: Pad4Mode) str

Switch between current and voltage measurement

The user can switch the type of PAD4 channels between voltage sense (standard configuration) and current sense (with additional shunt resistor).

Parameters

modePad4Mode.VOLTAGE or Pad4Mode.CURRENT

Returns

reponse string from the device

enablePad4Global(state: bool = True) str

Switch on the set PAD4 channels

The files of the measurement results with PAD4 are numbered consecutively. The lowest number is the main channel of the potentiostat.

Parameters

state – If state = True PAD4 channels are enabled.

Returns

reponse string from the device

disablePad4Global() str

Switch off the set PAD4 channels

Returns

reponse string from the device

readPad4SetupGlobal() str

Read the currently set PAD4 parameters

Reading the set PAD4 configuration. A string containing the configuration is returned.

Returns

reponse string from the device

setFrequency(frequency: float) str

Set the output frequency for single frequency impedance.

Parameters

frequency – the output frequency for Impedance measurement to set

Returns

reponse string from the device

setAmplitude(amplitude: float) str

Set the output amplitude

Parameters

amplitude – the output amplitude for Impedance measurement to set in Volt or Ampere

Returns

reponse string from the device

setNumberOfPeriods(number_of_periods: Union[int, float])

Set the number of periods to average for one impedance measurement

Parameters

number_of_periods – the number of periods / waves to average

Returns

reponse string from the device

setUpperFrequencyLimit(frequency: float) str

Set the upper frequency limit for EIS measurements

Parameters

frequency – the upper frequency limit to set

Returns

reponse string from the device

setLowerFrequencyLimit(frequency: float) str

Set the lower frequency limit for EIS measurements

Parameters

frequency – the lower frequency limit to set

Returns

reponse string from the device

setStartFrequency(frequency: float) str

Set the start frequency for EIS measurements

Parameters

frequency – the start frequency to set

Returns

reponse string from the device

setUpperStepsPerDecade(steps: int) str

Set the number of steps per decade in frequency range above 66 Hz for EIS measurements

Parameters

steps – the number of steps per decade to set

Returns

reponse string from the device

setLowerStepsPerDecade(steps: int) str

Set the number of steps per decade in frequency range below 66 Hz for EIS measurements

Parameters

steps – the number of steps per decade to set

Returns

reponse string from the device

setUpperNumberOfPeriods(periods: int) str

Set the number of periods to measure in frequency range above 66 Hz for EIS measurements

Note:

value must be greater or equal than the one set with setLowerNumberOfPeriods()

Parameters

periods – the number of periods to set

Returns

reponse string from the device

setLowerNumberOfPeriods(periods: int) str

Set the number of periods to measure in the frequency range at the lower frequency limit for EIS measurements.

Note:

value must be smaller or equal than the one set with setUpperNumberOfPeriods().

Parameters

periods – the number of periods to set

Returns

reponse string from the device

setScanStrategy(strategy: Union[ScanStrategy, str]) str

Set the scan strategy for EIS measurements.

strategy = “single”: single sine. strategy = “multi”: multi sine. strategy = “table”: frequency table.

Parameters

strategy – the scan strategy to set for EIS measurements

Returns

reponse string from the device

setScanDirection(direction: Union[ScanDirection, str]) str

Set the scan direction for EIS measurements.

direction = “startToMax”: Scan at first from start to maximum frequency. direction = “startToMin”: Scan at first from start to lower frequency.

Parameters

direction (string) – The scan direction for EIS measurements.

Returns

reponse string from the device

getImpedance(frequency: Optional[float] = None, amplitude: Optional[float] = None, number_of_periods: Optional[int] = None) complex

Measure the impedance

Measure the impedance with the parameters. If the parameters are omitted the last will be used.

Parameters
  • frequency – The frequency to measure the impedance at.

  • amplitude – The amplitude to measure the impedance with. In Volt if potentiostatic mode or Ampere for galvanostatic mode.

  • number_of_periods – The number of periods / waves to average.

Returns

Dict

Return type

complex

getImpedanceAsArray(frequency: Optional[float] = None, amplitude: Optional[float] = None, number_of_periods: Optional[int] = None) List[float]

Measure the impedance

Measure the impedance with the parameters. If the parameters are omitted the last will be used.

Parameters
  • frequency – The frequency to measure the impedance at.

  • amplitude – The amplitude to measure the impedance with. In Volt if potentiostatic mode or Ampere for galvanostatic mode.

  • number_of_periods – The number of periods / waves to average.

Returns

List wit [real, imag]

Return type

List

getImpedancePad4(frequency: Optional[float] = None, amplitude: Optional[float] = None, number_of_periods: Optional[int] = None) dict[int, complex]

Measure the impedance with PAD4 channels

Measure the impedance and activated PAD4 channels with the parameters. If the parameters are omitted the last will be used. The method returns a dictionary containing the channels as keys and the complex impedance as value. The MAIN channel has index 0. Switched off PAD4 channels have an impedance of 0.

Parameters
  • frequency – The frequency to measure the impedance at.

  • amplitude – The amplitude to measure the impedance with. In Volt if potentiostatic mode or Ampere for galvanostatic mode.

  • number_of_periods – The number of periods / waves to average.

Returns

A dictionary with channel index as key and the complex impedance as value.

getImpedancePad4AsArray(frequency: Optional[float] = None, amplitude: Optional[float] = None, number_of_periods: Optional[int] = None) List[float]

Measure the impedance with PAD4 channels

Measure the impedance and activated PAD4 channels with the parameters. If the parameters are omitted the last will be used. The method returns a dictionary containing the channels as keys and the complex impedance as value. The MAIN channel has index 0. Switched off PAD4 channels have an impedance of 0.

Parameters
  • frequency – The frequency to measure the impedance at.

  • amplitude – The amplitude to measure the impedance with. In Volt if potentiostatic mode or Ampere for galvanostatic mode.

  • number_of_periods – The number of periods / waves to average.

Returns

List wit [real, imag,…]

Return type

List

setEISNaming(naming: Union[str, FileNaming]) str

Set the EIS measurement naming rule.

naming = “dateTime”: extend the setEISOutputFileName() with date and time. naming = “counter”: extend the setEISOutputFileName() with an sequential number. naming = “individual”: the file is named like setEISOutputFileName().

Parameters

naming – the EIS measurement naming rule to set.

Returns

reponse string from the device

setEISCounter(number: int) str

Set the current number of EIS measurement for filename.

Current number for the file name for EIS measurements which is used next and then incremented.

Parameters

number – the next measurement number to set

Returns

reponse string from the device

setEISOutputPath(path: str) str

Set the path where the EIS measurements should be stored.

The results must be stored on the C hard disk. If an error occurs test an alternative path or c:THALEStemp. The directory must exist.

Parameters

path – path to the directory

Returns

reponse string from the device

setEISOutputFileName(name: str) str

Set the basic EIS output filename.

The basic name of the file, which is extended by a sequential number or the date and time. Only numbers, underscores and letters from a-Z may be used.

If the name is set to “individual”, the file with the same name must not yet exist. Existing files are not overwritten.

Parameters

name – basic name of the file

Returns

reponse string from the device

measureEIS() str

Make an EIS measurement.

For the measurement all parameters must be specified before.

Returns

reponse string from the device

setCVStartPotential(potential: float) str

Set the start potential of a CV measurement.

Parameters

potential – the start potential to set

Returns

reponse string from the device

setCVUpperReversingPotential(potential: float) str

Set the upper reversal potential of a CV measurement.

Parameters

potential – the upper reversal potential to set

Returns

reponse string from the device

setCVLowerReversingPotential(potential: float) str

Set the lower reversal potential of a CV measurement.

Parameters

potential – the lower reversal potential to set

Returns

reponse string from the device

setCVEndPotential(potential: float) str

Set the end potential of a CV measurement.

Parameters

potential – the end potential to set

Returns

reponse string from the device

setCVStartHoldTime(time: float) str

Setting the holding time at the start potential.

The time must be given in seconds.

Parameters

time – the waiting time at start potential in s

Returns

reponse string from the device

setCVEndHoldTime(time: float) str

Setting the holding time at the end potential.

The time must be given in seconds.

Parameters

time – the waiting time at end potential in s

Returns

reponse string from the device

setCVScanRate(scanRate: float) str

Set the scan rate.

The scan rate must be specified in V/s.

Parameters

scanRate – the scan rate to set in V/s

Returns

reponse string from the device

setCVCycles(cycles: float) str

Set the number of cycles.

At least 0.5 cycles are necessary. The number of cycles must be a multiple of 0.5. 3.5 are also possible, for example.

Parameters

cycles – the number of CV cycles to set, at least 0.5.

Returns

reponse string from the device

setCVSamplesPerCycle(samples: int) str

Set the number of measurements per CV cycle.

Parameters

samples – the number of measurments per cycle to set

Returns

reponse string from the device

setCVMaximumCurrent(current: float) str

Set the maximum current.

The maximum positive current at which the measurement is interrupted. This is also the current which is used to determine the shunt. This cannot be deactivated.

Parameters

current – The maximum current for measurement in A at which the measurement is interrupted

Returns

reponse string from the device

setCVMinimumCurrent(current: float) str

Set the minimum current.

The maximum negative current at which the measurement is interrupted. This is also the current which is used to determine the shunt. This cannot be deactivated.

Parameters

current – The minimum current for measurement in A.

Returns

reponse string from the device

setCVOhmicDrop(ohmicdrop: float) str

Set the ohmic drop for CV measurement.

Parameters

ohmicdrop – The ohmic drop for measurement.

Returns

reponse string from the device

enableCVAutoRestartAtCurrentOverflow(state: bool = True) str

Automatically restart if current is exceeded.

A new measurement is automatically started with a different reverse potential at which the current limit is not exceeded.

Parameters

state – If state == True the auto restart is enabled.

Returns

reponse string from the device

disableCVAutoRestartAtCurrentOverflow() str

Disable automatic restart if current is exceeded.

Returns

reponse string from the device

enableCVAutoRestartAtCurrentUnderflow(state: bool = True) str

Restart automatically if the current drops below the limit.

A new measurement is automatically started with a smaller current range than that determined by the minimum and maximum current.

Parameters

state – If state = True the auto restart is enabled.

Returns

reponse string from the device

disableCVAutoRestartAtCurrentUnderflow() str

Disable automatically restart if the current drops below the limit.

Returns

reponse string from the device

enableCVAnalogFunctionGenerator(state: bool = True) str

Switch on the analog function generator (AFG).

The analog function generator can only be used if it was purchased with the device. If the device has the AFG function, you will see a button in the CV software to activate this function.

Parameters

state – If state == True the AFG is used.

Returns

reponse string from the device

disableCVAnalogFunctionGenerator() str

Disable the analog function generator (AFG).

Returns

reponse string from the device

setCVNaming(naming: Union[str, FileNaming]) str

Set the CV measurement naming rule.

naming = “dateTime”: extend the setCVOutputFileName() with date and time. naming = “counter”: extend the setCVOutputFileName() with an sequential number. naming = “individual”: the file is named like setCVOutputFileName().

Parameters

naming – CV measurement naming rule to set

Returns

reponse string from the device

setCVCounter(number: int) str

Set the current number of CV measurement for filename.

Current number for the file name for CV measurements which is used next and then incremented.

Parameters

number – the next measurement number

Returns

reponse string from the device

setCVOutputPath(path: str) str

Set the path where the CV measurements should be stored.

The results must be stored on the C hard disk. If an error occurs test an alternative path or c:THALEStemp. The directory must exist.

Parameters

path – path to the output directory

Returns

reponse string from the device

setCVOutputFileName(name: str) str

Set the basic CV output filename.

The basic name of the file, which is extended by a sequential number or the date and time. Only numbers, underscores and letters from a-Z may be used.

If the name is set to “individual”, the file with the same name must not yet exist. Existing files are not overwritten.

Parameters

name – basic name of the file to set

Returns

reponse string from the device

checkCVSetup() str

Check the set parameters.

With the error number the wrong parameter can be found. The error numbers are listed in the Remote2 manual.

Returns

reponse string from the device

readCVSetup() str

Read the set parameters.

After checking with checkCVSetup() the parameters can be read back from the workstation. This command returns a list of all set parameters.

Returns

reponse string from the device

measureCV() str

Make a CV (cyclic voltammetry) measurement.

Note:

Before starting the measurement, all parameters must be checked with checkCVSetup().

Returns

reponse string from the device

setIEFirstEdgePotential(potential: float) str

Set the first edge potential.

Parameters

potential – The potential of the first edge in V.

Returns

reponse string from the device

setIESecondEdgePotential(potential: float) str

Set the second edge potential.

Parameters

potential – The potential of the second edge in V.

Returns

reponse string from the device

setIEThirdEdgePotential(potential: float) str

Set the third edge potential.

Parameters

potential – The potential of the third edge in V.

Returns

reponse string from the device

setIEFourthEdgePotential(potential: float) str

Set the fourth edge potential.

Parameters

potential – The potential of the fourth edge in V.

Returns

reponse string from the device

setIEFirstEdgePotentialRelation(relation: float) str

Set the relation of the first edge potential.

relation = “absolute”: Absolute relation of the potential. relation = “relative”: Relative relation of the potential.

Parameters

relation – The relation of the edge potential absolute or relative.

Returns

reponse string from the device

setIESecondEdgePotentialRelation(relation) str

Set the relation of the second edge potential.

relation = “absolute”: Absolute relation of the potential. relation = “relative”: Relative relation of the potential.

Parameters

relation – The relation of the edge potential absolute or relative.

Returns

reponse string from the device

setIEThirdEdgePotentialRelation(relation) str

Set the relation of the third edge potential.

relation = “absolute”: Absolute relation of the potential. relation = “relative”: Relative relation of the potential.

Parameters

relation – The relation of the edge potential absolute or relative.

Returns

reponse string from the device

setIEFourthEdgePotentialRelation(relation) str

Set the relation of the fourth edge potential.

relation = “absolute”: Absolute relation of the potential. relation = “relative”: Relative relation of the potential.

Parameters

relation – The relation of the edge potential absolute or relative.

Returns

reponse string from the device

setIEPotentialResolution(resolution: float) str

Set the potential resolution.

The potential step size for IE measurements in V.

Parameters

relation – The resolution for the measurement in V.

Returns

reponse string from the device

setIEMinimumWaitingTime(time: float) str

Set the minimum waiting time.

The minimum waiting time on each step of the IE measurement. This time is at least waited, even if the tolerance abort criteria are met.

Parameters

time – The waiting time in seconds.

Returns

reponse string from the device

setIEMaximumWaitingTime(time: float) str

Set the maximum waiting time.

The maximum waiting time on each step of the IE measurement. After this time the measurement is stopped at this potential and continued with the next potential even if the tolerances are not reached.

Parameters

time – The waiting time in seconds.

Returns

reponse string from the device

setIERelativeTolerance(tolerance: float) str

Set the relative tolerance criteria.

This parameter is only used in sweep mode steady state. The relative tolerance to wait in percent. The explanation can be found in the IE manual.

Parameters

tolerance – The tolerance to wait until break, 0.01 = 1%.

Returns

reponse string from the device

setIEAbsoluteTolerance(tolerance: float) str

Set the absolute tolerance criteria.

This parameter is only used in sweep mode steady state. The absolute tolerance to wait in A. The explanation can be found in the IE manual.

Parameters

tolerance – The tolerance to wait until break, 0.01 = 1%.

Returns

reponse string from the device

setIEOhmicDrop(ohmicdrop: float) str

Set the ohmic drop for IE measurement.

Parameters

ohmicdrop – The ohmic drop for measurement.

Returns

reponse string from the device

setIESweepMode(mode) str

Set the sweep mode.

The explanation of the modes can be found in the IE manual. mode=”steady state” mode=”fixed sampling” mode=”dynamic scan”

Parameters

mode – The sweep mode for measurement.

Returns

reponse string from the device

setIEScanRate(scanRate: float) str

Set the scan rate.

This parameter is only used in sweep mode dynamic scan. The scan rate must be specified in V/s.

Parameters

scanRate – The scan rate in V/s.

Returns

reponse string from the device

setIEMaximumCurrent(current: float) str

Set the maximum current.

The maximum positive current at which the measurement is interrupted.

Parameters

current – The maximum current for measurement in A.

Returns

reponse string from the device

setIEMinimumCurrent(current: float) str

Set the minimum current.

The maximum negative current at which the measurement is interrupted.

Parameters

current – The minimum current for measurement in A.

Returns

reponse string from the device

setIENaming(naming: Union[str, FileNaming]) str

Set the IE measurement naming rule.

naming = “dateTime”: extend the setIEOutputFileName() with date and time. naming = “counter”: extend the setIEOutputFileName() with an sequential number. naming = “individual”: the file is named like setIEOutputFileName().

Parameters

naming (string) – The IE measurement naming rule.

Returns

reponse string from the device

setIECounter(number: int) str

Set the current number of IE measurement for filename.

Current number for the file name for EIS measurements which is used next and then incremented.

Parameters

number – The next measurement number.

Returns

reponse string from the device

setIEOutputPath(path: str) str

Set the path where the IE measurements should be stored.

The results must be stored on the C hard disk. If an error occurs test an alternative path or c:THALEStemp. The directory must exist.

Parameters

path – The path to the directory.

Returns

reponse string from the device

setIEOutputFileName(name: str) str

Set the basic IE output filename.

The basic name of the file, which is extended by a sequential number or the date and time. Only numbers, underscores and letters from a-Z may be used.

If the name is set to “individual”, the file with the same name must not yet exist. Existing files are not overwritten.

Parameters

name – The basic name of the file.

Returns

reponse string from the device

checkIESetup() str

Check the set parameters.

With the error number the wrong parameter can be found. The error numbers are listed in the Remote2 manual.

Returns

reponse string from the device

readIESetup() str

Read the set parameters.

After checking with checkIESetup() the parameters can be read back from the workstation.

Returns

reponse string from the device

measureIE() str

Measure IE.

Before measurement, all parameters must be checked with checkIESetup().

Returns

reponse string from the device

selectSequence(number: int) str

Select the sequence to run with runSequence().

If this method gives an error message that the sequence does not exist, then check the ZTrace. This error message can also mean that a wrong character occurs or a parameter is out of range.

The sequences must be stored under “C:THALESscriptsequencersequences”. Sequences from 0 to 9 can be created. These must have the names from “sequence00.seq” to “sequence09.seq”.

Parameters

number – The number of the sequence.

Returns

reponse string from the device

setSequenceNaming(naming: Union[str, FileNaming]) str

Set the sequence measurement naming rule.

naming = “dateTime”: extend the setSequenceOutputFileName(name) with date and time. naming = “counter”: extend the setSequenceOutputFileName(name) with an sequential number. naming = “individual”: the file is named like setEISOutputFileName(name).

Parameters

naming (string) – The naming rule.

Returns

reponse string from the device

setSequenceCounter(number: int) str

Set the current number of sequence measurement for filename.

Current number for the file name for EIS measurements which is used next and then incremented.

Parameters

number – The next measurement number

Returns

reponse string from the device

setSequenceOutputPath(path: str) str

Set the path where the sequence measurements should be stored.

The results must be stored on the C hard disk. If an error occurs test an alternative path or c:THALEStemp. The directory must exist.

Parameters

path – The path to the directory.

Returns

reponse string from the device

setSequenceOutputFileName(name: str) str

Set the basic sequence output filename.

The basic name of the file, which is extended by a sequential number or the date and time. Only numbers, underscores and letters from a-Z may be used.

If the name is set to “individual”, the file with the same name must not yet exist. Existing files are not overwritten.

Parameters

name – The basic name of the file.

Returns

reponse string from the device

enableSequenceAcqGlobal(state: bool = True) str

Switch on that up to 8 ACQ channels are used in the sequencer.

In the ACQ setup, the display channels must be set before they can be allowed. Then the individual channels must be activated with a separate command.

Parameters

state – If state = True ACQ channels are enabled.

Returns

reponse string from the device

disableSequenceAcqGlobal() str

Switch off that up to 8 ACQ channels are used in the sequencer.

Returns

reponse string from the device

enableSequenceAcqChannel(channel: int, state: bool = True) str

Switch on the set sequence ACQ channel

The channel index for the ACQ channel results from the ACQ setup index plus 1. This means that in the ACQ, for example, the set display channel 2 becomes channel 3 in the sequencer.

Parameters
  • channel – index of the ACQ channel.

  • state – If state = True ACQ channel is enabled.

Returns

reponse string from the device

disableSequenceAcqChannel(channel) str

Switch off the set sequence ACQ channel

Parameters

channel – index of the ACQ channel.

Returns

reponse string from the device

readSequenceAcqSetup() str

Read the currently set sequencer ACQ Setup

Returns

reponse string from the device

runSequence() str

Run the selected sequence.

This command executes the selected sequence between 0 and 9.

Returns

reponse string from the device

runSequenceFile(filepath: str, sequence_folder: str = 'C:/THALES/script/sequencer/sequences', sequence_number: int = 9) str

Run the sequence at filepath.

The file from the specified path is copied as sequence sequence_number=9 to the correct location in the Thales directory and then selected and executed. The default sequence number is 9 and does not need to be changed. The old sequence sequence_number is overwritten.

The variable sequence_folder is ONLY NECESSARY if python is running on ANOTHER COMPUTER like the one connected to the Zennium. For this the controlling computer must have access to the hard disk of the computer with the Zennium to access the THALES folder. In this case the path to the sequences folder in sequence_folder must be set to “C:/THALES/script/sequencer/sequences” on the computer with the zennium.

Parameters
  • filepath – Filepath of the sequence.

  • sequence_folder – The filepath to the THALES sequence folder. Does not normally need to be transferred and changed. Explanation see in the text before.

  • sequence_number – The number in the THALES sequence directory. Does not normally need to be transferred and changed.

Returns

reponse string from the device

setSequenceOhmicDrop(value: float) str

Set the Ohmic Drop or IR Drop for the sequencer.

0 to 1 tera ohm.

Parameter name in sequence file: rodrop

Parameters

value – Ohmic Drop in Ohm

Returns

reponse string from the device

setSequenceMaximumRuntime(value: float) str

Set the maximum runtime in hours

0.1 to 1000 hours.

Parameter name in sequence file: max_ti

Parameters

value – maximum runtime in hours

Returns

reponse string from the device

setSequenceUpperPotentialLimit(value: float) str

Set the upper potential limit

Parameter name in sequence file: pot_hi

Parameters

value – upper potential limit

Returns

reponse string from the device

setSequenceLowerPotentialLimit(value: float) str

Set the lower potential limit

Parameter name in sequence file: pot_lo

Parameters

value – lower potential limit

Returns

reponse string from the device

setSequenceUpperCurrentLimit(value: float) str

Set the upper current limit

Parameter name in sequence file: cur_hi

Parameters

value – upper current limit

Returns

reponse string from the device

setSequenceLowerCurrentLimit(value: float) str

Set the lower current limit

Parameter name in sequence file: cur_lo

Parameters

value – lower current limit

Returns

reponse string from the device

setSequenceCurrentRange(value: float) str

Set the current range

Parameter name in sequence file: cur_ra

Parameters

value – current range in ampere.

Returns

reponse string from the device

setSequencePotentialLatencyWindow(value: float) str

Set the potential latency window

This defines what happens when a limit value is exceeded. The values from the following table are possible.

Latency Window Values

Value

Meaning

-1

potentiostat is not switched off

t

potentiostat is switched off after t seconds, maximum 30

2

potentiostat is switched off after 2 seconds

0

potentiostat is switched off immediately

Parameter name in sequence file: pot_of

Parameters

value – values meaning see in the table

Returns

reponse string from the device

setSequenceCurrentLatencyWindow(value: float) str

Set the current latency window

This defines what happens when a limit value is exceeded. The values from the following table are possible.

Latency Window Values

Value

Meaning

-1

potentiostat is not switched off

t

potentiostat is switched off after t seconds, maximum 30

2

potentiostat is switched off after 2 seconds

0

potentiostat is switched off immediately

Parameter name in sequence file: cur_of

Parameters

value – values meaning see in the table

Returns

reponse string from the device

enableFraMode(state: bool = True) str

Enables the use of the FRA/FRA-X probe.

With the FRA Probe, external power potentiostats, signal generators, sources, sinks can be controlled analog for impedance measurements.

FRA Product Page

FRA Manual

Before this function is called, the analog interface to the external interface must be initialized with the correct factors. It may be necessary to use + or - as sign, this must be tested to ensure that potentiostatic and galvanostatic function correctly. The set factors should also be verified by measuring with a multimeter whether the gains and offsets have been set correctly, as these are not trivial to determine.

Parameters

state – If state = True FRA mode is enabled.

Returns

reponse string from the device

readFraSetup() str

Read the currently set FRA parameters/configuration.

A string containing the configuration is returned.

Returns

reponse string from the device

disableFraMode() str

Disables the use of the FRA/FRA-X probe.

After disabling FRA mode, all parameters must be re-set for use with EPC devices, for example.

Returns

reponse string from the device

setFraVoltageInputGain(value: float) str

Sets the input voltage gain of the FRA device.

Parameters

value – The value to set.

Returns

reponse string from the device

setFraVoltageInputOffset(value: float) str

Sets the input voltage offset of the FRA device.

This value must be determined empirically as it depends on the gains used.

Parameters

value – The value to set.

Returns

reponse string from the device

setFraVoltageOutputGain(value: float) str

Sets the output voltage gain of the FRA device.

Parameters

value – The value to set.

Returns

reponse string from the device

setFraVoltageOutputOffset(value: float) str

Sets the output voltage offset of the FRA device.

This value must be determined empirically as it depends on the gains used.

Parameters

value – The value to set.

Returns

reponse string from the device

setFraVoltageMinimum(value: float) str

Sets the minimum voltage of the FRA device.

Parameters

value – The value to set.

Returns

reponse string from the device

setFraVoltageMaximum(value: float) str

Sets the maximum voltage of the FRA device.

Parameters

value – The value to set.

Returns

reponse string from the device

setFraCurrentInputGain(value: float) str

Sets the input current gain of the FRA device.

Parameters

value – The value to set.

Returns

reponse string from the device

setFraCurrentInputOffset(value: float) str

Sets the input current offset of the FRA device.

This value must be determined empirically as it depends on the gains used.

Parameters

value – The value to set.

Returns

reponse string from the device

setFraCurrentOutputGain(value: float) str

Sets the output current gain of the FRA device.

Parameters

value – The value to set.

Returns

reponse string from the device

setFraCurrentOutputOffset(value: float) str

Sets the output current offset of the FRA device.

This value must be determined empirically as it depends on the gains used.

Parameters

value – The value to set.

Returns

reponse string from the device

setFraCurrentMinimum(value: float) str

Sets the minimum current of the FRA device.

Parameters

value – The value to set.

Returns

reponse string from the device

setFraCurrentMaximum(value: float) str

Sets the maximum current of the FRA device.

Parameters

value – The value to set.

Returns

reponse string from the device

setFraPotentiostatMode(potentiostatMode: PotentiostatMode) str

Set the coupling of the FRA mode.

This can be PotentiostatMode.POTMODE_POTENTIOSTATIC or PotentiostatMode.POTMODE_GALVANOSTATIC

Parameters

potentiostatMode – The coupling of the FRA mode

Returns

reponse string from the device

readAcqSetup() str

Read the currently set ACQ parameters

Reading the set FRA configuration. A string containing the configuration is returned.

Returns

reponse string from the device

readAllAcqChannels() dict[str, float]

Read all active ACQ channels.

A string is read from Thales which contains the ACQ channels as follows. .. code-block:

ACQVAL(0)= 2.632052e-01;ACQVAL(1)= 8.413594e-02;ACQVAL(2)= 5.338292e+01
Returns

Dict which contains the ACQ channel index as key and the value as value.

readAcqChannel(channel: int) float

Read the ACQ channel to the passed index.

Parameters

channel – index of the ACQ channel

Returns

value of the channel

disableAcq() str

Disable all configured ACQ channels.

Returns

reponse string from the device

enableAcq(enabled: bool = True) str

Enable configured ACQ channels.

With this command, the ACQ channels can only be used for the EIS, CV and IE methods. The ACQ channels must first be set up via the GUI.

Parameters

enabled – True to enable ACQ.

Returns

response string from the device

setValue(name: str, value: Union[int, float, str, Any]) str

Set an Remote2 parameter or value.

Parameters
  • name – name of the Remote2 parameter

  • value – value of the parameter to set

Returns

response string from the device

executeRemoteCommand(command: str) str

Directly execute a query to Remote Script.

Parameters

command – The command query string, e.g. “IMPEDANCE” or “Pset=0”.

Returns

reponse string from the device

forceThalesIntoRemoteScript() str

Prompts Thales to start the Remote Script.

Will switch a running Thales from anywhere like the main menu after startup to running measurements into Remote Script so it can process further requests.

Note

This happens rather quickly if Thales is idle in main menu but may take some time if it’s performing an EIS measurement or doing something else. For high stability applications 20 seconds would probably be a save bet.

Returns

reponse string from the device

hideWindow()

Hide Thales window.

This is for remote integrations to prevent operation of the GUI. Thales is still visible in the taskbar but can no longer be maximized.

Returns

reponse string from the device

showWindow()

Show Thales window.

If the Thales window has been hidden, it can be displayed again with this command.

Returns

reponse string from the device

getThalesVersion(timeout: Optional[float] = None)

Get Thales Version.

Reads the current Thales version. Same version as in the application title line.

Parameters

timeout – The time in seconds in which the term must provide the answer.

Returns

serialnumber as string.

getWorkstationHeartBeat(timeout: Optional[float] = None) float

Query the heartbeat time from the Term software for the workstation and the Thales software accordingly.

The complete documentation can be found in the DevCli-Manual Page 8.

The timeout is not set by default and the command blocks indefinitely. However, a time in seconds can optionally be specified for the timeout. When the timeout expires, an exception is thrown by the socket.

Parameters

timeout – The time in seconds in which the term must provide the answer.

Returns

The HeartBeat time in milli seconds.

getSerialNumberFromTerm() str

Get the serial number of the workstation via the Term software.

The serial number of the active potentiostat with EPC devices can be read with the getSerialNumber() function. This function returns only the serial number of the workstation, which is determined by the Term software.

Returns

The workstation serial number.

getTermIsActive(timeout: float = 2) bool

Check if the Term still responds to requests.

Whether the term is still active is checked by sending a heartbeat command. If the term does not respond after the timeout, an exception is thrown and this is caught with the except block. The time returned by getWorkstationHeartBeat is not relevant, it is only important that a response was returned within the time.

Afterwards False is returned if the exception was resolved. Once False is returned, the connection to the term MUST be completely re-established with connectToTerm and forceThalesIntoRemoteScript. The workstation must also be reset. To re-establish a controlled state.

Parameters

timeout – Time in seconds in which the term must provide the answer, default 2 seconds.

Returns

True or False if the Term is Active.

_checkForForbiddenCharactersInPath(string: str)

This function ensures that only the permitted characters appear in the path to: https://doc.zahner.de/manuals/remote2.pdf

Parameters

string – string to check.

_checkForForbiddenCharactersInFilename(string: str)

This function ensures that only the permitted characters appear in the filename to: https://doc.zahner.de/manuals/remote2.pdf

Parameters

string – string to check.