Compare commits
No commits in common. "e560d8f1ebb9933900785565c37be44daf45cb5d" and "bad21806f8a1948bfee84eac87f9ff8da30c68ee" have entirely different histories.
e560d8f1eb
...
bad21806f8
|
@ -309,19 +309,19 @@ class Device:
|
||||||
'tec_settings': {
|
'tec_settings': {
|
||||||
'i_set': { # Current TEC Current Set by PID Controller/User (A)
|
'i_set': { # Current TEC Current Set by PID Controller/User (A)
|
||||||
'value': 0.04330516, # Value Set
|
'value': 0.04330516, # Value Set
|
||||||
'max': 3.0 # Max Value Settable
|
'max': 1.0 # Max Value Settable
|
||||||
},
|
},
|
||||||
'max_v': { # Max Voltage Across Tec Terminals (V)
|
'max_v': { # Max Voltage Across Tec Terminals (V)
|
||||||
'value': 4.00000000, # Value Set
|
'value': 4.990857, # Value Set
|
||||||
'max': 4.3 # Max Value Settable
|
'max': 5.0 # Max Value Settable
|
||||||
},
|
},
|
||||||
'max_i_pos': { # Max Cooling Current Across Tec Terminals (A)
|
'max_i_pos': { # Max Cooling Current Across Tec Terminals (A)
|
||||||
'value': 0.99628574, # Value Set
|
'value': 0.99628574, # Value Set
|
||||||
'max': 3.0 # Max Value Settable
|
'max': 1.0 # Max Value Settable
|
||||||
},
|
},
|
||||||
'max_i_neg': { # Max Heating Current Across Tec Terminals (A)
|
'max_i_neg': { # Max Heating Current Across Tec Terminals (A)
|
||||||
'value': 0.99628574, # Value Set
|
'value': 0.99628574, # Value Set
|
||||||
'max': 3.0 # Max Value Settable
|
'max': 1.0 # Max Value Settable
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'pid_params': { # PID Controller Parameters
|
'pid_params': { # PID Controller Parameters
|
||||||
|
@ -493,21 +493,21 @@ class Thermostat:
|
||||||
|
|
||||||
async def set_tec_max_cooling_i(self, max_i_pos):
|
async def set_tec_max_cooling_i(self, max_i_pos):
|
||||||
"""
|
"""
|
||||||
Set Tec maximum cooling current (Settable Range: 0.0 - 3.0)
|
Set Tec maximum cooling current (Settable Range: 0.0 - 1.0)
|
||||||
- max_i_pos: A
|
- max_i_pos: A
|
||||||
"""
|
"""
|
||||||
return await self._send_cmd(self._cmd._target, self._cmd.SetTecMaxIPos, max_i_pos)
|
return await self._send_cmd(self._cmd._target, self._cmd.SetTecMaxIPos, max_i_pos)
|
||||||
|
|
||||||
async def set_tec_max_heating_i(self, max_i_neg):
|
async def set_tec_max_heating_i(self, max_i_neg):
|
||||||
"""
|
"""
|
||||||
Set Tec maximum heating current (Settable Range: 0.0 - 3.0)
|
Set Tec maximum heating current (Settable Range: 0.0 - 1.0)
|
||||||
- max_i_neg: A
|
- max_i_neg: A
|
||||||
"""
|
"""
|
||||||
return await self._send_cmd(self._cmd._target, self._cmd.SetTecMaxINeg, max_i_neg)
|
return await self._send_cmd(self._cmd._target, self._cmd.SetTecMaxINeg, max_i_neg)
|
||||||
|
|
||||||
async def set_tec_i_out(self, i_out):
|
async def set_tec_i_out(self, i_out):
|
||||||
"""
|
"""
|
||||||
Set Tec Output Current (Settable Range: 0.0 - 3.0)
|
Set Tec Output Current (Settable Range: 0.0 - 1.0)
|
||||||
This cmd is only effective in constant current control mode
|
This cmd is only effective in constant current control mode
|
||||||
or your newly set value will be overwritten by PID Controller Output
|
or your newly set value will be overwritten by PID Controller Output
|
||||||
- i_out: A
|
- i_out: A
|
||||||
|
|
|
@ -444,17 +444,17 @@ class MainWindow(QtWidgets.QMainWindow):
|
||||||
{'name': 'Output Config', 'expanded': True, 'type': 'group', 'children': [
|
{'name': 'Output Config', 'expanded': True, 'type': 'group', 'children': [
|
||||||
{'name': 'Control Method', 'type': 'mutex', 'limits': ['Constant Current', 'Temperature PID'],
|
{'name': 'Control Method', 'type': 'mutex', 'limits': ['Constant Current', 'Temperature PID'],
|
||||||
'target_action_pair': [['thermostat', 'set_constant_current_control_mode'], ['thermostat', 'set_pid_control_mode']], 'children': [
|
'target_action_pair': [['thermostat', 'set_constant_current_control_mode'], ['thermostat', 'set_pid_control_mode']], 'children': [
|
||||||
{'name': 'Set Current', 'type': 'float', 'value': 0, 'step': 1, 'limits': (-3000, 3000), 'triggerOnShow': True, 'decimals': 6,
|
{'name': 'Set Current', 'type': 'float', 'value': 0, 'step': 1, 'limits': (-1000, 1000), 'triggerOnShow': True, 'decimals': 6,
|
||||||
'unit': 'mA', 'lock': False, 'target': 'thermostat', 'action': 'set_tec_i_out', "compactHeight": False},
|
'unit': 'mA', 'lock': False, 'target': 'thermostat', 'action': 'set_tec_i_out', "compactHeight": False},
|
||||||
{'name': 'Set Temperature', 'type': 'float', 'value': 25, 'step': 0.0001, 'limits': (-273, 300), 'format': '{value:.4f}',
|
{'name': 'Set Temperature', 'type': 'float', 'value': 25, 'step': 0.0001, 'limits': (-273, 300), 'format': '{value:.4f}',
|
||||||
'unit': '℃', 'lock': False, 'target': 'thermostat', 'action': 'set_temperature_setpoint', "compactHeight": False},
|
'unit': '℃', 'lock': False, 'target': 'thermostat', 'action': 'set_temperature_setpoint', "compactHeight": False},
|
||||||
]},
|
]},
|
||||||
{'name': 'Limits', 'expanded': False, 'type': 'group', 'children': [
|
{'name': 'Limits', 'expanded': False, 'type': 'group', 'children': [
|
||||||
{'name': 'Max Cooling Current', 'type': 'float', 'value': 0, 'step': 1, 'decimals': 6, 'limits': (0, 3000),
|
{'name': 'Max Cooling Current', 'type': 'float', 'value': 0, 'step': 1, 'decimals': 6, 'limits': (0, 1000),
|
||||||
'unit': 'mA', 'lock': False, 'target': 'thermostat', 'action': 'set_tec_max_cooling_i', "compactHeight": False},
|
'unit': 'mA', 'lock': False, 'target': 'thermostat', 'action': 'set_tec_max_cooling_i', "compactHeight": False},
|
||||||
{'name': 'Max Heating Current', 'type': 'float', 'value': 0, 'step': 1, 'decimals': 6, 'limits': (0, 3000),
|
{'name': 'Max Heating Current', 'type': 'float', 'value': 0, 'step': 1, 'decimals': 6, 'limits': (0, 1000),
|
||||||
'unit': 'mA', 'lock': False, 'target': 'thermostat', 'action': 'set_tec_max_heating_i', "compactHeight": False},
|
'unit': 'mA', 'lock': False, 'target': 'thermostat', 'action': 'set_tec_max_heating_i', "compactHeight": False},
|
||||||
{'name': 'Max Voltage Difference', 'type': 'float', 'value': 0, 'step': 0.1, 'limits': (0, 4.3),
|
{'name': 'Max Voltage Difference', 'type': 'float', 'value': 0, 'step': 0.1, 'limits': (0, 4),
|
||||||
'unit': 'V', 'lock': False, 'target': 'thermostat', 'action': 'set_tec_max_v', "compactHeight": False},
|
'unit': 'V', 'lock': False, 'target': 'thermostat', 'action': 'set_tec_max_v', "compactHeight": False},
|
||||||
]},
|
]},
|
||||||
{'name': 'Default Power On', 'type': 'bool', 'value': False, 'lock': False, 'target': 'thermostat', 'action': 'set_default_pwr_on'},
|
{'name': 'Default Power On', 'type': 'bool', 'value': False, 'lock': False, 'target': 'thermostat', 'action': 'set_default_pwr_on'},
|
||||||
|
|
|
@ -57,10 +57,14 @@ impl TecSettings {
|
||||||
units: PhantomData,
|
units: PhantomData,
|
||||||
value: 1.65,
|
value: 1.65,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Kirdy Design Specs:
|
||||||
|
// MaxV = 5.0V
|
||||||
|
// MAX Current = +- 1.0A
|
||||||
const MAX_I_SET: ElectricCurrent = ElectricCurrent {
|
const MAX_I_SET: ElectricCurrent = ElectricCurrent {
|
||||||
dimension: PhantomData,
|
dimension: PhantomData,
|
||||||
units: PhantomData,
|
units: PhantomData,
|
||||||
value: 3.0,
|
value: 1.0,
|
||||||
};
|
};
|
||||||
const MAX_V_DUTY_TO_VOLTAGE_RATE: ElectricPotential = ElectricPotential {
|
const MAX_V_DUTY_TO_VOLTAGE_RATE: ElectricPotential = ElectricPotential {
|
||||||
dimension: PhantomData,
|
dimension: PhantomData,
|
||||||
|
@ -70,7 +74,7 @@ impl TecSettings {
|
||||||
pub const MAX_V_MAX: ElectricPotential = ElectricPotential {
|
pub const MAX_V_MAX: ElectricPotential = ElectricPotential {
|
||||||
dimension: PhantomData,
|
dimension: PhantomData,
|
||||||
units: PhantomData,
|
units: PhantomData,
|
||||||
value: 4.3,
|
value: 5.0,
|
||||||
};
|
};
|
||||||
const MAX_V_DUTY_MAX: f64 =
|
const MAX_V_DUTY_MAX: f64 =
|
||||||
TecSettings::MAX_V_MAX.value as f64 / TecSettings::MAX_V_DUTY_TO_VOLTAGE_RATE.value as f64;
|
TecSettings::MAX_V_MAX.value as f64 / TecSettings::MAX_V_DUTY_TO_VOLTAGE_RATE.value as f64;
|
||||||
|
@ -82,12 +86,12 @@ impl TecSettings {
|
||||||
pub const MAX_I_POS_CURRENT: ElectricCurrent = ElectricCurrent {
|
pub const MAX_I_POS_CURRENT: ElectricCurrent = ElectricCurrent {
|
||||||
dimension: PhantomData,
|
dimension: PhantomData,
|
||||||
units: PhantomData,
|
units: PhantomData,
|
||||||
value: 3.0,
|
value: 1.0,
|
||||||
};
|
};
|
||||||
pub const MAX_I_NEG_CURRENT: ElectricCurrent = ElectricCurrent {
|
pub const MAX_I_NEG_CURRENT: ElectricCurrent = ElectricCurrent {
|
||||||
dimension: PhantomData,
|
dimension: PhantomData,
|
||||||
units: PhantomData,
|
units: PhantomData,
|
||||||
value: 3.0,
|
value: 1.0,
|
||||||
};
|
};
|
||||||
// .get::<ratio>() is not implemented for const
|
// .get::<ratio>() is not implemented for const
|
||||||
const MAX_I_POS_DUTY_MAX: f64 =
|
const MAX_I_POS_DUTY_MAX: f64 =
|
||||||
|
|
Loading…
Reference in New Issue