Giter Site home page Giter Site logo

zahner-elektrik / thales-remote-python Goto Github PK

View Code? Open in Web Editor NEW
11.0 11.0 9.0 3.16 MB

Library for using Thales Remote Script 2 over TCP/IP with Python to control Zahner ZENNIUM potentiostats.

License: MIT License

Python 100.00%
automation chemistry cyclic-voltammetry eis electrochemistry electrolysis fuel-cell impedance-spectroscopy potentiostat python

thales-remote-python's People

Contributors

arkady-a avatar df9ir avatar ilka-schulz avatar maxkrapp1 avatar nkawerau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

thales-remote-python's Issues

bug: can not forceThalesIntoRemoteScript

I can not force my thales device into remote script mode:

connection = ThalesRemoteConnection()
if not connection.connectToTerm("130.75.205.165"):
    raise Exception("could not connect to Thales Remote")
device = ThalesRemoteScriptWrapper(connection)
device.forceThalesIntoRemoteScript() # hangs forever
# further method calls are not executed

I tried this with the Thales XT 5.8.2 being in two different states, neither of it worked:

  • My Zennium device is doing nothing. It is in TCP/IP VI remote control mode saying running.
  • My Zennium device is doing nothing. It shows the "classic mode" start screen from where to choose different measurement techniques.

no comma (,) characters allowed in file name, incomprehensible error message, unintuitive crash time point

I used a file name with a comma (,) character in it for my EIS measurements (ThalesRemoteScriptWrapper.setEISOutputFileName). This made the Thales software crash after an EIS measurement was successfully done with the error message Manual program interrupt!. Both the point in time of the crash as well as the error message did not really hint me into the right direction, maybe at least that can be approved?

Check that measurement is running

Hi, is there a command that can be sent to check if a measurement is running, such as an EIS? I tried checking in the script-wrapper and in the remote-2 manual but i could not find something that seems to work.

script_wrapper and error of thales version

I downloaded the latest thales version from the Zahner website (Thales XT5.8.7) but the minimum version in script_wrapper.py is 5.9.0, so whenever i try to connect to thales remote the script stops because an error is raised. Is it a bug or there's a newer version of Thales?

publish package on PyPi

I see that the driver for other Zahner devices is already publish on PyPi. Can this library please be published as well?

The README says:

Download the subdirectory thales_remote and put this directory into your source directory where your Python script is located.

This might work for development but is absolutely not manageable for production use. I want to distribute my software using Zahner libraries to colleagues and onto various lab PCs in the future. I would prefer to just add the dependency to my pyproject.toml and let pip install the dependency, like with every other dependency.

ThalesRemoteConnection.connectToTerm() should raise an exception

This method currently returns a bool which is C-style error propagation. This is prone to bugs because the errors can accidentally be ignored. Exceptions are still quite an old error propagation technique and it can be hard to determine where to catch them best (Java follows a good approach where you must declare your exception types) but I guess Python is an old language.

Or rewrite it in Rust. Rust's error handling is absolutely sleek. ๐Ÿฆ€ ๐Ÿ˜‰

any chance to use this library on Linux with device connected via USB?

I want to run a lot of (multiplexed, highly automated) long-term measurements within the next years. Windows is completely unfeasible for long-term experiments due to its lack of stability โ€“ even Microsoft knows that... And I also do not want to use the network for controls which are typically somewhat time-critical.

Is there any chance I can control a Zennium device via USB directly? The remote2 manual says there is a DLL to access the device via USB. I am almost 100 % sure I could get this DLL running under Linux with wine with minimal effort (nowadays, wine is able to run absolutely everything) but as far as I understand, this repository accesses a running instance of the Tahles software via network.

My colleague would also be glad if we can control the Thales software via network but this would not satisfy the needs in my own research project.

I will try to reverse engineer the LabView application in order to find out the usage of DevCli.dll but I would also be very glad if Zahner could provide some Python library to control Zennium devices.

Bug: CV measurement fails silently

I figured that CV measurements fail silently.

Steps to reproduce

I started a CV measurement just like in the example.

Btw, I set the output path to:

device: ThalesRemoteScriptWrapper = ...
device.setCVOutputPath("c:\\THALES")

The check function does not throw an exception:

device.checkCVSetup()

Expected behavior

Calling

device.measureCV()

should run a CV measurement.

Actual Behavior

There is no indication on the remote python application that anything is going wrong except that the measurement does not terminate after the expected duration.

However, the local Term software spams the console with this repeated error message:

DIR SET c:\thales
ERROR ILLEGAL CMD

btw: I did not specify c:\thales as the output directory but c:\THALES. This would potentially later break toolchains, e.g. file transfer to the remote client as well as any further data processing.

documentation: how to continuously read data?

I found the set<technique_name>Output<Path|File> methods but I struggle to load the measured data into my application:

  1. How do I save data when using constant current / constant voltage technique?
  2. It appears that the data are written to the host machine's file system for CV, IE, EIS and Sequence techiques. I really need the data on the client machine โ€“ the user sits at the client machine and all program logic is implemented in the client.
  3. Any chance to directly get the data into Python? I found some methods to read Thales data files from disk but this would not work due to item 2 on this list and I would really need to know the exact output file name which this library does not provide.

I really want to load the data into my application and not have the user manually click around. The zahner_potentiostat library for PP2x2 devices supports this feature seamlessly; can I have the same for Zennium devices?

support Python 3.7 and 3.8

My colleague gets the error: TypeError: 'type' object is not subscriptable when importing from this library.

StackOverflow says that for Python versions prior to 3.9, you need to from __future__ import annotations. I guess that the import statement should be added to each module header. In

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.