How can I create and execute my own custom MethodSCRIPT code?
Beside the option of exporting a MethodSCRIPT from PSTrace based on your measurement configuration you did in the GUI, you can create your MethodSCRIPT from scratch.
FYI What is MethodSCRIPT?
First you need to understand how MethodSCRIPT works. You can find a detailed description in the MethodSCRIPT protocol document v1.2.
Additional you should read through this article how to get a terminal connection running using a terminal program accessing a COM port.
Ideally you have installed notepad++ as your code editor. Below I have provided basic examples showing what the process look to sent a script to the EmStat Pico. For sure you could write your little program in python to make this more user friendly.
In this way you are able to copy the examples from the protocol document and modify them. Another idea would be to extend an exisiting MethodSCRIPT created by the PSTrace GUI.
Example 1: Hello World - sending a string
Example 2: Measuring analog input 1
1D27B4 are the HEX data which equal 1910708 micro Volts, which is 1.9V