Functions
This is a list of the functions and classes that are available in the Matlab SDK.
These wrap some of the classes and functions in the .NET SDK and make them accessible through Matlab. Look at the function docstrings for usage and parameter descriptions.
-
GetConnectedDevices: Returns a list of connected PalmSens and Emstat devices. -
LoadMethod: Loads a method from a.psmethodfile. -
LoadPSSDK: Loads the PalmSens Matlab SDK. -
LoadSession: Load (a) measurement(s) from a.pssessionfile. -
MultiChannelMeasurementLoopHelper: Waits for multiple instruments to finish their measurements -
NewMethod: Creates a new method. -
OpenConnection: Opens a connection to a device. -
SaveMethod: Saves a method.
GetConnectedDevices
Return a list of all the connected comm devices.
Input arguments
-
bluetooth(bool) – If true, enable scanning for bluetooth. Setting bluetooth to false is faster. By default scanning for bluetooth is disabled. -
serial(bool) – If true, enable scanning for serial devices. By default scanning for serial devices is disabled.
Output arguments
-
deviceList(List objects<PalmSens.Devices.Device>) – list containing the connected devices
LoadMethod
Load a method object from the specified path
Input arguments
-
methodPath(string) – The path to the psmethod file this function will load. The full path is required, i.e.'C:\Data\LinearSweep.psmethod'.
Output arguments
-
method(None) – The method object containing its parameters. When the method file cannot be loaded it will return false.
LoadPSSDK
LoadPSSDK loads the PalmSens SDK and adds it to the workspace
Output arguments
-
PSSDK(None) – The matlab assembly handle of the PalmSens SDK. If the SDK was not loaded successfully this output is set to false.
LoadSession
Load a session from the specified path.
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).
Input arguments
-
sessionPath(string) – The path to the pssession file this function will load. The full path is required, i.e.'C:\Data\LinearSweep.pssession'.
Input arguments
-
measurements(None) – a struct containing one or more measurements. When the session file cannot be loaded it will return false.
MultiChannelMeasurementLoopHelper
Wait for multiple instruments to finish their measurements.
Input arguments
-
comms(None) – List of channels
Output arguments
-
busy(bool) – Return true if any channel is busy -
comms(int) – List of channels
NewMethod
Instantiate a new method object of the specified technique.
The techniques are defined by their technique number:
-
Linear Sweep Voltammetry
-
Cyclic Voltammetry
-
AC Voltammetry
-
Differential Pulse Voltammetry
-
Square Wave Voltammetry
-
Normal Pulse Voltammetry
-
Chronoamperometry
-
MultiStep Amperometry
-
Fast Amperometry
-
Pulsed Amperometric Detection
-
Multiple Pulse Amperometry
-
Open Circuit Potentiometry
-
Chronopotentiometry
-
MultiStep Potentiometry
-
Chronopotentiometric Stripping
-
Impedance Spectroscopy (PS3, PS4, ESPico, Sensit and ES4 only)
-
Fast cyclic voltammetry
-
Galvanostatic Impedance Spectroscopy (PS4 and ES4 only)
Input arguments
-
technique(int) – a number specifying the index of one of the following techniques
Input arguments
-
method(PalmSens.Method) – The respective technique’s method object containing its parameters. If an invalid method is specified this will return false.
OpenConnection
Opens a connection with the specified device and returns its CommManager.
If a device’s connection has allready been opened it will be closed (for exmpale in PSTrace or Multitrace).
Note that connecting multiple devices at once may result in unexpected behaviour.
Input arguments
-
device(None) – The device to open a connection with.
Output arguments
-
comm(None) – CommManager object that is used to communicate with the device. When to the device cannot be openened it will return false.
SaveMethod
SaveMethod save a method object to a specified path
Input arguments
-
method(PalmSens.Method) – A method object -
path(string) – the full path (including filename) where the method file must be saved. A full path is required, i.e.'C:\Data\LinearSweep.psmethod'. -
PSSDK(None) – Handle to the PalmSens Matlab SDK library. This can be obtained using the LoadPSSDK funtion.
Output arguments
-
success(bool) – True if the method was successfully saved.