Introduction to MethodSCRIPT
The MethodSCRIPT™ scripting language is designed to integrate our instruments or modules for OEM effortlessly in your hardware setup or product.
- No libraries needed
- No DLLs or other type of code libraries are required for MethodSCRIPT
A MethodSCRIPT™ is sent directly to the instrument, which compiles and runs the script on-board. This means no DLLs or other type of code libraries are required to communicate with the MethodSCRIPT™ communications protocol. This allows developers to program a human-readable script directly into the potentiostat (module). The MethodSCRIPT” language allows for running all supported electrochemical techniques and makes it easy to combine different measurements and other tasks.
More MethodSCRIPT” features include:
- Use of variables
- (Nested) loops and conditional logic support
- Exact timing control
- Data smoothing and peak detection
- Simple math operations on variables (add, sub, mul, div)
- Digital I/O, for example for waiting for an external trigger
- Logging results to internal storage or external SD card
- Entering and waking from hibernation mode
- Reading auxiliary values like pH or temperature
- and many more…
“MethodSCRIPT is one of the most enjoyable methods I’ve used so far and I recommend it to everyone who wants to work with electrochemistry.”
João Paulo C. Costa, Ph.D. candidate in Electrical Engineer at the University of São Paulo
Generating MethodSCRIPT in PSTrace for Windows
MethodSCRIPT can automatically be generated in PSTrace for Windows. If you are connected to any device supporting MethodSCRIPT, a button will be visible that allows you to generate the MethodSCRIPT code using the parameters as you have set in the Method Editor of PSTrace. This allows you to easily and conveniently evaluate the EmStat Pico or EmStat4M module in PSTrace and then take the MethodSCRIPT code snippet for use in your own app or microcontroller code project.
Edit MethodSCRIPT in PSTrace
Documentation and code examples
Code examples for C, C#, Python, Arduino, iOS (Swift) and Android (Java) demonstrate how to implement serial communication with the device.
The examples demonstrate some of the following functionalities:
- Establishing a connection with the device
- Send a MethodSCRIPT to the device
- Read and parse the measurement data packages from the device
A detailed explanation for each of the code examples can be found in their corresponding “Getting Started” documents. Please refer to the MethodSCRIPT Manual for more detailed information and code examples.
Code examples on GitHub