Classes
This is a list of the classes that are available in the Matlab SDK.
These wrap some of the Palmsens .NET internal data structures to make them more accessible in Matlab. Look at the class and method docstrings for further information on the interfaces.
-
EquivalentCircuitFit: Handles the equivalent circuit fitting using the PalmSens.Core.Matlab.dll -
Measurement: Returns data measured by a device as a variable, message in the command window and/or a plot in a figure. -
MeasurementGUI: Version of the Measurement.m class that can be used with a Matlab GUIDE user interface. -
MultiChannelMeasurement: Used for running when connected to multiple instruments simultaneaously, please refer to theMultiChannelMeasurementLoopExample
EquivalentCircuitFit
Fits the equivalent circuit specified with the CDC descriptor code. Optional settings are fixing the value of a parameter, setting the min/max bounds for a parameter, specifying the frequency range to fit, limitting the number of iterations, delta error term or delta parameter term
Properties
-
Parameters– Model parameters
Methods
-
EquivalentCircuitFit– Construct an instance of this class -
SetFitOptions– Set fitting options for the minimization algorithm -
SetFitRange– Set the frequency range to fit the circuit over. -
FitCircuit– Fits the equivalent circuit and returns the fit
EquivalentCircuitFit
Construct an instance of this class
Input arguments
-
measurement(PalmSens.Measurement) – A reference to the .NET measurement object -
cdc(string) – The circuit design in the CDC format are required
SetFitOptions
Set fitting options for the minimization algorithm
Input arguments
-
MaxIterations(int) – Maximum number of iterations. Minimization terminates once it reaches this number of steps (default = 500). -
MinDeltaError(float) – Minimum convergence error. Minimization converges if the residual (squared difference) falls below this value (default = 1e-9). -
MinParameterStepSize(float) – Minimum convergence step. Minimization converges if the difference in parameter values falls below this value (default = 1e-12).
Measurement
The measurement class contains the functions for starting, stopping and storing the data from a measurement.
This class requires the connected PalmSens or Emstat device’s
commManager to given in its contstructor (i.e. m = Measurement(CommManager))
Setting the properties dispInCommandWindow or dispInPlot to true
respectively displays the results of the measurement in the
Command Window or a Plot in Figure 1.
Recording devices idle status:
Idle status package can be recorded with the GetIdleData function
(i.e. m.GetIdleData()). Recording of idle status can be stopped with
the StopIdleData function (i.e. m.StopIdleData())
Measuring:
Use the New function in combination with a method in your workspace
to start a new measurement (i.e. m.New(method)). The measurement can
be aborted at any time with the Abort function (i.e. m.Abort()). The
results of the measurement are stored in the measurement properties
and can be retreived after the measurement has been completed
(measurement = m.measurement).
Measurements:
Measurements are converted to structs to improve their compatability with
Matlab. Each measurement is stored in its own struct and contains a
character array with its name (.name), measurement technique (.type) and
date (.date).
The measurement data is stored in one or more curves.
Generally a measurement has one curve struct, except for
Cyclic Voltammetry and Impedance Spectroscopy. Cyclic Voltammetry measurements
have one curve per scan and Impedance Spectroscopy measurements have
three curves, 1. Nyquist plot (Zre vs Zim), 2. Bode plot (freq vs Z) and
3. Bode plot (freq vs -phase). Each curve struct contains an array of x and y
data (.xData & .yData) and their respective units (.xUnit & .yUnit).
Properties
-
comm– Object containing handle for communication with device -
measurement– The result of the measurement converted for use in matlab -
dispInCommandWindow– When set to true the latest readings from the device are displayed in the command window. -
dispInPlot– When set to true the latest readings from the device are displayed in a new Figure. -
inMeasurement– Bool indicating whether the device is measuring -
abortMeasurement– Used by class to indicate when abort function has been used -
x_array– Array of idle potential readings -
x_unit– Unit of the data recorded in the x_array. -
y_array– Array of idle potential readings -
y_unit– Unit of the data recorded in the y_array. -
previousMeasurement– The result of the measurement as a .Net object -
curves– List of .Net curve objects returned by the PalmSens Matlab SDK
Methods
-
Measurement– Initialize measurement class. -
StopIdleData– Stop recording idle data. -
New– Start a new measurement. -
Abort– Abort a running measurement. -
GetIdleData– Record idle data. -
idleListener– Idle listener callback. -
beginListener– Start listener for measurement data. -
endListener– Stop listener for measurement data. -
dataListener– Measurement listener callback. -
curveListener– Curve listener callback. -
processMeasurement– Process previous measurement. -
plotDataRealtime– Plot data in real time. -
processEISMeasurement– Process previous EIS measurement. -
plotEISDataRealtime– Plot EIS data in real time.
Measurement
Initialize measurement class.
Input arguments
-
commManager(PalmSens.Comm.CommManager) – The comm manager manages the connection with the device.
New
Start a new measurement.
Input arguments
-
method(PalmSens.Method) – Method class with technique parameters.
GetIdleData
Record idle data.
This will be stopped once a measurement starts. Recording idle data will clear any previously recorded data.
processMeasurement
Process previous measurement.
Updates the .measurement attribute with Measurement data.
MultiChannelMeasurement
The measurement class contains the functions for starting, stopping and storing the data from a measurement.
This class requires the connected PalmSens or Emstat device’s
commManager to given in its contstructor (i.e. m = Measurement(CommManager))
Setting the properties dispInCommandWindow or dispInPlot to true
respectively displays the results of the measurement in the
Command Window or a Plot in the specified figure.
Recording devices idle status:
Idle status package can be recorded with the GetIdleData function
(i.e. m.GetIdleData()). Recording of idle status can be stopped with
the StopIdleData function (i.e. m.StopIdleData())
Measuring:
Use the New function in combination with a method in your workspace
to start a new measurement (i.e. m.New(method)). The measurement can
be aborted at any time with the Abort function (i.e. m.Abort()). The
results of the measurement are stored in the measurement properties
and can be retreived after the measurement has been completed
(measurement = m.measurement).
Measurements:
Measurements are converted to structs to improve their compatability with
Matlab. Each measurement is stored in its own struct and contains a
character array with its name (.name), measurement technique (.type) and
date (.date).
The measurement data is stored in one or more curves.
Generally a measurement has one curve struct, except for
Cyclic Voltammetry and Impedance Spectroscopy. Cyclic Voltammetry measurements
have one curve per scan and Impedance Spectroscopy measurements have
three curves, 1. Nyquist plot (Zre vs Zim), 2. Bode plot (freq vs Z) and
3. Bode plot (freq vs -phase). Each curve struct contains an array of x and y
data (.xData & .yData) and their respective units (.xUnit & .yUnit).
Properties
-
comm– Object containing handle for communication with device -
measurement– The result of the measurement converted for use in matlab -
dispInCommandWindow– When set to true the latest readings from the device are displayed in the command window. -
dispInPlot– When set to true the latest readings from the device are displayed in a new Figure. -
figureForPlot– Figure to display data in -
plotAxes– axes to plot data in -
line– animated line to plot the data in -
nPoints– number of points in plot -
inMeasurement– Bool indicating whether the device is measuring -
abortMeasurement– Used by class to indicate when abort function has been used -
x_array– Array of idle potential readings -
x_unit– Unit of the data recorded in the x_array. -
y_array– Array of idle potential readings -
y_unit– Unit of the data recorded in the y_array. -
previousMeasurement– The result of the measurement as a .Net object -
curves– List of .Net curve objects returned by the PalmSens Matlab SDK
Methods
-
MultiChannelMeasurement– Initialize measurement class. -
Abort– Abort a running measurement. -
StopIdleData– Stop recording idle data. -
GetIdleData– Record idle data. -
New– Start a new measurement. -
idleListener– Idle listener callback. -
beginListener– Start listener for measurement data. -
endListener– Stop listener for measurement data. -
dataListener– Measurement listener callback. -
curveListener– Curve listener callback. -
processEISMeasurement– Process previous EIS measurement. -
plotDataRealtime– Plot data in real time. -
processMeasurement– Process previous measurement. -
plotEISDataRealtime– Plot EIS data in real time.
MultiChannelMeasurement
Initialize measurement class.
Input arguments
-
commManager(PalmSens.Comm.CommManager) – The comm manager manages the connection with the device. -
figure(int) – Figure to display data in
GetIdleData
Record idle data.
This will be stopped once a measurement starts. Recording idle data will clear any previously recorded data.
New
Start a new measurement.
Input arguments
-
method(PalmSens.Method) – Method class with technique parameters.
processEISMeasurement
Process previous EIS measurement.
Updates the .measurement attribute with EIS data and curves.
MeasurementGUI
The measurement class contains the functions for starting, stopping
and storing the data from a measurements
This is a version of the Measurement class that can be used with a Matlab GUIDE user interface.
Properties
-
comm– Object containing handle for communication with device -
inMeasurement– Bool indicating whether the device is measuring
Methods
-
MeasurementGUI– Initialize measurement class. -
New– Start a new measurement. -
StopIdleData– Stop recording idle data. -
GetIdleData– Record idle data. -
Abort– Abort a running measurement. -
StartDataListener– Start listener for measurement data. -
StopDataListener– Stop listener for measurement data.
MeasurementGUI
Initialize measurement class.
Input arguments
-
hObject(Handle) – Handle to btnConnect -
commManager(PalmSens.Comm.CommManager) – The comm manager manages the connection with the device. -
beginMeasurmentCallback(Callable) – Callback for begin measurement event. -
endMeasurementCallback(Callable) – Callback for end measurement event. -
receiveCurveCallback(Callable) – Callback for curve event. -
receiveStatusCallback(Callable) – Callback for status update event.
New
Start a new measurement.
Input arguments
-
method(PalmSens.Method) – Method class with technique parameters.