lambcutlet / dps5005_pygui Goto Github PK
View Code? Open in Web Editor NEWA python gui to display & control DPS5005 power supply
License: GNU General Public License v3.0
A python gui to display & control DPS5005 power supply
License: GNU General Public License v3.0
Do I have tu run CH341SER.EXE to install the DPS3005 communication board driver?
Hi,
i am sorry but i cant start your program, getting errors:
~/DPS5005_pyGUI/source_files $ python dps_GUI_program.py
Traceback (most recent call last):
File "dps_GUI_program.py", line 4, in
import serial
File "/usr/local/lib/python2.7/dist-packages/serial/init.py", line 10, in
from . import utilities, abc, model, marshal, errors, properties, meta, hooks, test, request
File "/usr/local/lib/python2.7/dist-packages/serial/model.py", line 1291
exec(source, namespace)
SyntaxError: unqualified exec is not allowed in function 'from_meta' it contains a nested function with free variables
can you help me getting this running?
My System is Linux Mint 17,3 Cinnamon... 64Bit.
regards & thanks,
Wolfram.
I wold like to change the CSV file during a session. It does not work jet. How do I have to change dps_GUI_program.py to make it possible?
DPS5005_pyGUI is a great program. It wold even be better, if it would show the accumulated mAh since start of the program.
I would be very happy if you could implement such a function.
How can I get or set S-OVP (over-voltage) and S-OCP (over-current)?
In DPS3005 PC Software V1.3 is this possible (see attached file). But this program is not very good.
with Windows Version 10.0.19041.450 I get the message: Failed to read from instrument.
I get this error:
Traceback (most recent call last):
File ".\dps_GUI_program.py", line 377, in loop_function
self.read_all()
File ".\dps_GUI_program.py", line 406, in read_all
data = self.pass_2_dps('read_all')
File ".\dps_GUI_program.py", line 489, in pass_2_dps
a = eval("dps.%s('%s', %s)" % (function, cmd, value))
File "", line 1, in
File "C:\Users\XYZ\Downloads\DPS5005_pyGUI-master\source_files\dps_modbus.py", line 127, in read_all
data = self.functions(0x00, 16, RWaction, value) # reg_addr, number of bytes, RWaction, value
File "C:\Users\XYZ\Downloads\DPS5005_pyGUI-master\source_files\dps_modbus.py", line 158, in functions
return self.serial_data.read_block(reg_addr, num_of_addr)
File "C:\Users\XYZ\Downloads\DPS5005_pyGUI-master\source_files\dps_modbus.py", line 44, in read_block
return self.instrument.read_registers(reg_addr, size_of_block)
File "D:\Software\Python\Python36-32\lib\site-packages\minimalmodbus.py", line 498, in read_registers
numberOfRegisters=numberOfRegisters, payloadformat='registers')
File "D:\Software\Python\Python36-32\lib\site-packages\minimalmodbus.py", line 697, in _genericCommand
payloadFromSlave = self._performCommand(functioncode, payloadToSlave)
File "D:\Software\Python\Python36-32\lib\site-packages\minimalmodbus.py", line 798, in _performCommand
payloadFromSlave = _extractPayload(response, self.address, self.mode, functioncode)
File "D:\Software\Python\Python36-32\lib\site-packages\minimalmodbus.py", line 1075, in _extractPayload
raise ValueError(text)
ValueError: Checksum error in rtu mode: '\x8d\x00' instead of 'Jt' . The response is: '\x01\x03 \x00\x96\t─\x00\x95\x00Z\x00\r\x07ñ\x00\x00\x00\x00\x00\x00\x00\x01\x00\x04\x13\x8d\x00' (plain response: '\x01\x03 \x00\x96\t─\x00\x95\x00Z\x00\r\x07ñ\x00\x00\x00\x00\x00\x00\x00\x01\x00\x04\x13\x8d\x00')
PS C:\Users\XYZ\Downloads\DPS5005_pyGUI-master\source_files> D:\Software\Python\Python36-32\python.exe .\dps_GUI_program
.py
Traceback (most recent call last):
Could you also imlement a function e.g. 'CSV show' that shows the plot of a formerly saved plot? There is no new button necessary, if the opened .csv file has more than 100 lines. The program should then restore the plot from the file.
Setting voltage to 5.1 volts results in a 5.09V on PSU
I prefer a white background for the plot. Therefore I inserted in my personal copy of dps_GUI_program.py
"pg.setConfigOption('background', 'w')" after the line "import pyqtgraph as pg".
for better visibility I changed the colour of the x axis to dark green, i.e. '0a0'
self.p1.setLabel('bottom', 'Time', units='s', color='0a0', **{'font-size':'10pt'})
self.p1.getAxis('bottom').setPen(pg.mkPen(color='0a0', width=1)),
the Y1 axis and pen1 to blue (color='b'), the Y2 axis and pen2 to red (color='r')
so that they conform with the german conventions for voltage and current.
If you find these changes interesting, you can of course implement them in your official version.
Unfortunately I did not find the option for reducing the space between the axes and the plot.
Perhaps you can help me.
Thank you for your mail.
I tried to load and run a *.CSV file by clicking 'CSV run', but nothing happened.
With my old Windows10 Computer your really excellent program dps_GUI_program.py works perfectly well.
But with my new and much faster Windows10 Computer (Acer Aspire 3) I get after about 10 minutes the message:
'Failed to read from instrument.'
With the DPS3005 PC Software V1.3.exe I get after about 2 minutes the message: 'Connection exception'.
Perhaps the Aspire 3 is to fast for both programs or what else could it be?
The UM25C PC Software V1.3, which also uses Bluetooth, works without problems.
Because some batteries have no or very little -dV, I would propose that 0.0 V be accepted.
To avoid premature termination of the charging, I would propose that charging stops 1200 sec after the first time the -dV occured.
After that the progam should change to PSU mode with current set to 'Constant Current'/10
Thank you.
As I work extensively with AutoHotkey, I would prefer to work with hotkeys instead of mouseclicks.
Is it possible to assign hotkeys to certain functions, e.g. Ctrl+S for 'Save Plot'?
The CSV view does not work. I get the following IndexError although I used your newest files:
Traceback (most recent call last):
File "D:\DPS3005-py\3\dps_GUI_program.py", line 388, in pushButton_CSV_view_clicked
self.graph_X = [row[0] for row in self.CSV_list] # Xaxis - time interval
File "D:\DPS3005-py\3\dps_GUI_program.py", line 388, in
self.graph_X = [row[0] for row in self.CSV_list] # Xaxis - time interval
IndexError: list index out of range
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.