Compare commits

..

10 Commits

Author SHA1 Message Date
198b07f2a6 README: Introduce Thermostat GUI
Co-authored-by: topquark12 <aw@m-labs.hk>
2024-11-18 11:59:59 +08:00
8a6253ba8a pytec GUI: Set up packaging
Co-authored-by: Egor Savkin <es@m-labs.hk>
2024-11-18 11:59:59 +08:00
0551775ca3 pytec GUI: Implement Control Panel
Co-authored-by: linuswck <linuswck@m-labs.hk>
Co-authored-by: Egor Savkin <es@m-labs.hk>
2024-11-18 11:59:59 +08:00
c16539e45b pytec GUI: Implement PlotSettingsMenu
Co-authored-by: linuswck <linuswck@m-labs.hk>
2024-11-18 11:59:59 +08:00
51ce4ea603 pytec GUI: Implement plotting
Co-authored-by: linuswck <linuswck@m-labs.hk>
2024-11-18 11:59:59 +08:00
136e4d6333 pytec GUI: Incorporate autotuning
Co-authored-by: topquark12 <aw@m-labs.hk>
Co-authored-by: linuswck <linuswck@m-labs.hk>
Co-authored-by: Egor Savkin <es@m-labs.hk>
2024-11-18 11:59:59 +08:00
99ebb03ead pytec GUI: Implement ThermostatSettingsMenu
Co-authored-by: linuswck <linuswck@m-labs.hk>
Co-authored-by: Egor Savkin <es@m-labs.hk>
2024-11-18 11:59:59 +08:00
000d927ee6 pytec GUI: Implement status line
Co-authored-by: linuswck <linuswck@m-labs.hk>
Co-authored-by: Egor Savkin <es@m-labs.hk>
2024-11-18 11:59:59 +08:00
b0365bd4de pytec: Create GUI to Thermostat
- Add connection menu

- Add basic GUI layout skeleton

Co-authored-by: linuswck <linuswck@m-labs.hk>
Co-authored-by: Egor Savkin <es@m-labs.hk>
2024-11-18 11:59:59 +08:00
3ec0990c89 pytec: Create asyncio clients 2024-11-18 11:59:59 +08:00
2 changed files with 8 additions and 10 deletions

View File

@ -200,30 +200,31 @@ Testing heat flow direction with a low set current is recommended before install
### Limits ### Limits
Each channel has maximum value settings, for setting Each MAX1968 TEC driver has analog/PWM inputs for setting
output limits. output limits.
Use the `output` command to see them. Use the `output` command to see current settings and maximum values.
| Limit | Unit | Description | | Limit | Unit | Description |
| --- | :---: | --- | | --- | :---: | --- |
| `max_v` | Volts | Maximum voltage | | `max_v` | Volts | Maximum voltage |
| `max_i_pos` | Amperes | Maximum positive current | | `max_i_pos` | Amperes | Maximum positive current |
| `max_i_neg` | Amperes | Maximum negative current | | `max_i_neg` | Amperes | Maximum negative current |
| `i_set` | Amperes | (Not a limit; Open-loop mode) |
Example: set the maximum voltage of channel 0 to 1.5 V. Example: set the maximum voltage of channel 0 to 1.5 V.
``` ```
output 0 max_v 1.5 output 0 max_v 1.5
``` ```
Example: set the maximum negative current of channel 0 to -2 A. Example: set the maximum negative current of channel 0 to -3 A.
``` ```
output 0 max_i_neg 2 output 0 max_i_neg 3
``` ```
Example: set the maximum positive current of channel 1 to 2 A. Example: set the maximum positive current of channel 1 to 3 A.
``` ```
output 1 max_i_pos 2 output 0 max_i_pos 3
``` ```
### Open-loop mode ### Open-loop mode

View File

@ -1,4 +1,3 @@
import time
import numpy as np import numpy as np
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import matplotlib.animation as animation import matplotlib.animation as animation
@ -48,8 +47,7 @@ quit = False
def recv_data(tec): def recv_data(tec):
global last_packet_time global last_packet_time
while True: for data in tec.report_mode():
data = tec.get_report()
ch0 = data[0] ch0 = data[0]
series_lock.acquire() series_lock.acquire()
try: try:
@ -63,7 +61,6 @@ def recv_data(tec):
if quit: if quit:
break break
time.sleep(0.05)
thread = Thread(target=recv_data, args=(tec,)) thread = Thread(target=recv_data, args=(tec,))
thread.start() thread.start()