completely working!

This commit is contained in:
2025-10-22 18:11:34 +03:00
parent 8b0c99ab96
commit aeb3d90aec
9 changed files with 42 additions and 23 deletions

View File

@ -1,4 +1,4 @@
from FreeSimpleGUI import TIMEOUT_KEY, WIN_CLOSED
from FreeSimpleGUI import TIMEOUT_KEY, WIN_CLOSED
import json
import math
import socket
@ -18,10 +18,10 @@ GUI_TIMEOUT_INTERVAL = 5#505 - dev.WAIT_AFTER_SEND*1000 # GUI refresh time in mi
SAVE_POINTS_NUMBER = 1000 # Number of most recent data points kept in memory
INITIAL_TEMPERATURE_1 = 22.40 # Set initial temperature for Laser 1 in Celsius: from -1 to 45 C ??
INITIAL_TEMPERATURE_2 = 16.70 # Set initial temperature for Laser 2 in Celsius: from -1 to 45 C ??
INITIAL_CURRENT_1 = 32.0 # 64.0879 max # Set initial current for Laser 1, in mA
INITIAL_CURRENT_2 = 32.0 # 64.0879 max # Set initial current for Laser 2, in mA
INITIAL_TEMPERATURE_1 = 28 # Set initial temperature for Laser 1 in Celsius: from -1 to 45 C ??
INITIAL_TEMPERATURE_2 = 28.9 # Set initial temperature for Laser 2 in Celsius: from -1 to 45 C ??
INITIAL_CURRENT_1 = 33 # 64.0879 max # Set initial current for Laser 1, in mA
INITIAL_CURRENT_2 = 35 # 64.0879 max # Set initial current for Laser 2, in mA
#### ---- Functions
@ -62,17 +62,17 @@ def set_initial_params():
params['Min_Temp_1'] = INITIAL_TEMPERATURE_1
params['Max_Temp_1'] = 28
params['Min_Current_1'] = INITIAL_CURRENT_1
params['Max_Current_1'] = 50.0
params['Max_Current_1'] = 70.0 #50
params['Delta_Temp_1'] = 0.05
params['Delta_Current_1'] = 0.05
params['Min_Temp_2'] = INITIAL_TEMPERATURE_2
params['Max_Temp_2'] = 28
params['Min_Current_2'] = INITIAL_CURRENT_2
params['Max_Current_2'] = 50.0
params['Max_Current_2'] = 60 # 50
params['Delta_Temp_2'] = 0.05
params['Delta_Current_2'] = 0.05
params['Delta_Time'] = 50
params['Tau'] = 3
params['Tau'] = 10
return params
def update_data_lists():