Post Go back to editing

C# code example - make your own electrochemical GUI

Can you explain the available ressources for C# and how to get the code running to read data from the serial port the EmStat Pico is connected with?

Top Replies

  • Hi

    You can download the code files here:

    Goto “Downloads” and download the zip file “MethodSCRIPT Code Examples”. After unzipping the file open file “MSCodeExamples.sln” at this location “C:\..\MethodSCRIPTExamples\MethodSCRIPTExamples\MethodSCRIPTExamples_C#” using Visual Studio.

    After you open the file, the solution explorer will have the 4 projects:


    Depending on which project you want to use, right click on the project and “Set as startup project”. Click “start” to run the project.

    Project descriptions:

    1. MSConsoleExample
      1. This example demonstrates how to implement USB serial communication to
        Establish a connection with the device
        · Write a MethodSCRIPT to the device
        · Read and parse measurement data packages from the device
        This does not include error handling, method validation etc.
    1. MSPlotExample
      1. In addition to the basic communications as in the above example, this plot example demonstrates how to
        implement the plot object.
      2. Note: use the OxyPlot library for windows forms.
    1. MSEISConsoleExample
      1. This console example demonstrates sending, receiving and parsing data for a simple EIS measurement.
    1. MSEISPlotExample
      1. This example demonstrates the implementation of OxyPlot to show the EIS measurement response on
        Nyquist and Bode plots

    The default MethodSCRIPT code can be found in “Scripts” folder for each project. To use your own MethodSCRIPT code instead of the default code just replace this code files with your own files.