zahner-elektrik / thales-remote-python Goto Github PK
View Code? Open in Web Editor NEWLibrary for using Thales Remote Script 2 over TCP/IP with Python to control Zahner ZENNIUM potentiostats.
License: MIT License
Library for using Thales Remote Script 2 over TCP/IP with Python to control Zahner ZENNIUM potentiostats.
License: MIT License
This applies to:
This issue is blocked by #4.
see #12 for full explanation
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:
TCP/IP VI remote control
mode saying running
.There is a feature for the PP2x2 series to set a maximum time after which the device shall turn off any voltage applied. This would be really useful for the Zennium devices as well.
Or is there already such a feature?
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?
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.
The documentation does say how to disable current limits on CV measurements:
How could I disable current limits and could you please add the info to the documentation?
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?
acquire is spelled with additional c
. But maybe keep the old method names in addition to the corrected type and throw deprecation warnings?
@maxkrapp1 I am working on this already.
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.
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. ๐ฆ ๐
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.
The class ThalesRemoteError
currently just shows an error code but no human-readable error message. Could please add that information?
Also see #17
I figured that CV measurements fail silently.
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()
Calling
device.measureCV()
should run a CV measurement.
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.
I found the set<technique_name>Output<Path|File>
methods but I struggle to load the measured data into my application:
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?
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.