Compare commits

...

2 Commits

Author SHA1 Message Date
8dd58b364d README: Fix limits section 2024-11-18 14:01:51 +08:00
ae0d593139 pytec: Stop using client report mode in plot.py
Report mode has been removed from the client, stop using it.
2024-11-18 13:57:54 +08:00
2 changed files with 10 additions and 8 deletions

View File

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

View File

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