espec_pr3j package¶
Submodules¶
espec_pr3j.data_classes module¶
- class espec_pr3j.data_classes.HeatersStatus(temperature_heater: float, humidity_heater: float)[source]¶
Bases:
object
The status of the heaters. All values are in percentage.
- class espec_pr3j.data_classes.HumidityStatus(current_humidity: float, target_humidity: float | None, upper_limit: float, lower_limit: float)[source]¶
Bases:
object
The humidity status of the environmental chamber. All values are in percentage.
- class espec_pr3j.data_classes.OperationMode(value)[source]¶
Bases:
Enum
The operation mode of the environmental chamber.
- CONSTANT = 'CONSTANT'¶
Constant operation
- OFF = 'OFF'¶
The panel is powered off
- RUN = 'RUN'¶
A program is running
- STANDBY = 'STANDBY'¶
All operations are stopped
- classmethod from_str(value: str) OperationMode [source]¶
Convert a string to an OperationMode.
- Parameters:
value – The string to convert. The string is case-insensitive.
- class espec_pr3j.data_classes.TemperatureStatus(current_temperature: float, target_temperature: float, upper_limit: float, lower_limit: float)[source]¶
Bases:
object
The temperature status of the environmental chamber. All values are in Celsius.
- class espec_pr3j.data_classes.TestAreaState(current_temperature: float, current_humidity: float, operation_state: OperationMode, number_of_alarms: int)[source]¶
Bases:
object
The state of the test area.
- operation_state: OperationMode¶
The operation state
espec_pr3j.espec_pr3j module¶
- class espec_pr3j.espec_pr3j.EspecPr3j(hostname: str | None = None, temperature_accuracy: float | None = None, humidity_accuracy: float | None = None, resource_path: str | None = None, resource_manager: ResourceManager | None = None, communication_timeout: int | None = None)[source]¶
Bases:
object
Implements the basic operation of the environmental chamber.
- Parameters:
`hostname –
Host name of the environmental chamber. Default is None. If None, the resource_path must be provided. Can’t be used with resource_path. It can be an IP address.
`temperature_accuracy –
The accuracy considered when setting the temperature. Default is 0.5.
`humidity_accuracy –
The accuracy considered when setting the humidity. Default is 3.0.
`resource_path –
The resource path of the environmental chamber. If None, the hostname must be provided. Can’t be used with hostname. Default is None.
`resource_namager –
An optional PyVISA resource manager. If None, the default one is used. Default is None.
`communication_timeout –
The communication timeout in milliseconds. Default is 5000.
- LINE_TERMINATION = '\r\n'¶
The line termination character used by the environmental chamber
- MONITOR_COMMAND_DELAY = 0.2¶
Delay in seconds when sending a command to the environmental chamber (program-related delay is 0.3)
- SETTING_COMMAND_DELAY = 0.5¶
Delay in seconds when sending a setting command to the environmental chamber (program-related delay is 1)
- TCP_PORT = 57732¶
The TCP port of the environmental chamber
- get_heater_percentage() HeatersStatus [source]¶
Gets the output of the heaters
- get_humidity_status() HumidityStatus [source]¶
Gets the humidity status of the environmental chamber. This includes the current humidity, set humidity, upper limit, and lower limit.
- Raises:
MonitorError – If an error occurred when getting the humidity status.
- get_mode() OperationMode [source]¶
Gets the operation mode of the environmental chamber.
- get_temperature_status() TemperatureStatus [source]¶
Gets the temperature status of the environmental chamber. This includes the current temperature, set temperature, upper limit, and lower limit.
- Raises:
MonitorError – If an error occurred when getting the temperature status.
- get_test_area_state() TestAreaState [source]¶
Get the chamber test area state.
- hostname¶
The IP address of the environmental chamber
- humidity_accuracy¶
The accuracy considered when setting the humidity
- resource_path¶
Resource path of the environmental chamber
- set_constant_condition(temperature: float, humidity: float | None = None, stable_time=60.0, poll_interval=1.0)[source]¶
Sets the environmental chamber to a constant temperature and humidity condition and waits until the setpoints are reached and stable.
- Parameters:
temperature – The temperature to set in Celsius.
humidity – The humidity to set in percentage. Default is None (humidity control is disabled)
stable_time – The time in seconds to wait until the setpoints are stable. Default is 60.
poll_interval – The time in seconds to wait between each check. Default is 1.
- set_humidity_limits(upper_limit: float, lower_limit: float)[source]¶
Sets the upper and lower humidity limits for the chamber
- Parameters:
upper_limit – The humidity upper limit.
lower_limit – The humidity lower limit.
- Raises:
ClimateChamberSettingError – If an error occurred when setting the humidity limits.
- set_mode(mode: OperationMode)[source]¶
Sets the operation mode of the environmental chamber.
- Parameters:
mode – The operation mode to set.
- set_target_humidity(humidity: float | None = None)[source]¶
Sets the target humidity of the environmental chamber.
- Parameters:
humidity – The target humidity to set in percentage. If None, the humidity control is disabled.
- Raises:
ClimateChamberSettingError – If an error occurred when setting the target humidity.
- set_target_temperature(temperature: float)[source]¶
Sets the target temperature of the environmental chamber.
- Parameters:
temperature – The target temperature to set in Celsius.
- Raises:
ClimateChamberSettingError – If an error occurred when setting the target temperature.
- set_temperature_limits(upper_limit: float, lower_limit: float)[source]¶
Sets the upper and lower temperature limits for the chamber.
- Parameters:
upper_limit – The temperature upper limit in Celsius.
lower_limit – The temperature lower limit in Celsius.
- Raises:
ClimateChamberSettingError – If an error occurred when setting the temperature limits.
- temperature_accuracy¶
The accuracy considered when setting the temperature
espec_pr3j.exceptions module¶
Module contents¶
- class espec_pr3j.EspecPr3j(hostname: str | None = None, temperature_accuracy: float | None = None, humidity_accuracy: float | None = None, resource_path: str | None = None, resource_manager: ResourceManager | None = None, communication_timeout: int | None = None)[source]¶
Bases:
object
Implements the basic operation of the environmental chamber.
- Parameters:
`hostname –
Host name of the environmental chamber. Default is None. If None, the resource_path must be provided. Can’t be used with resource_path. It can be an IP address.
`temperature_accuracy –
The accuracy considered when setting the temperature. Default is 0.5.
`humidity_accuracy –
The accuracy considered when setting the humidity. Default is 3.0.
`resource_path –
The resource path of the environmental chamber. If None, the hostname must be provided. Can’t be used with hostname. Default is None.
`resource_namager –
An optional PyVISA resource manager. If None, the default one is used. Default is None.
`communication_timeout –
The communication timeout in milliseconds. Default is 5000.
- LINE_TERMINATION = '\r\n'¶
The line termination character used by the environmental chamber
- MONITOR_COMMAND_DELAY = 0.2¶
Delay in seconds when sending a command to the environmental chamber (program-related delay is 0.3)
- SETTING_COMMAND_DELAY = 0.5¶
Delay in seconds when sending a setting command to the environmental chamber (program-related delay is 1)
- TCP_PORT = 57732¶
The TCP port of the environmental chamber
- get_heater_percentage() HeatersStatus [source]¶
Gets the output of the heaters
- get_humidity_status() HumidityStatus [source]¶
Gets the humidity status of the environmental chamber. This includes the current humidity, set humidity, upper limit, and lower limit.
- Raises:
MonitorError – If an error occurred when getting the humidity status.
- get_mode() OperationMode [source]¶
Gets the operation mode of the environmental chamber.
- get_temperature_status() TemperatureStatus [source]¶
Gets the temperature status of the environmental chamber. This includes the current temperature, set temperature, upper limit, and lower limit.
- Raises:
MonitorError – If an error occurred when getting the temperature status.
- get_test_area_state() TestAreaState [source]¶
Get the chamber test area state.
- hostname¶
The IP address of the environmental chamber
- humidity_accuracy¶
The accuracy considered when setting the humidity
- resource_path¶
Resource path of the environmental chamber
- set_constant_condition(temperature: float, humidity: float | None = None, stable_time=60.0, poll_interval=1.0)[source]¶
Sets the environmental chamber to a constant temperature and humidity condition and waits until the setpoints are reached and stable.
- Parameters:
temperature – The temperature to set in Celsius.
humidity – The humidity to set in percentage. Default is None (humidity control is disabled)
stable_time – The time in seconds to wait until the setpoints are stable. Default is 60.
poll_interval – The time in seconds to wait between each check. Default is 1.
- set_humidity_limits(upper_limit: float, lower_limit: float)[source]¶
Sets the upper and lower humidity limits for the chamber
- Parameters:
upper_limit – The humidity upper limit.
lower_limit – The humidity lower limit.
- Raises:
ClimateChamberSettingError – If an error occurred when setting the humidity limits.
- set_mode(mode: OperationMode)[source]¶
Sets the operation mode of the environmental chamber.
- Parameters:
mode – The operation mode to set.
- set_target_humidity(humidity: float | None = None)[source]¶
Sets the target humidity of the environmental chamber.
- Parameters:
humidity – The target humidity to set in percentage. If None, the humidity control is disabled.
- Raises:
ClimateChamberSettingError – If an error occurred when setting the target humidity.
- set_target_temperature(temperature: float)[source]¶
Sets the target temperature of the environmental chamber.
- Parameters:
temperature – The target temperature to set in Celsius.
- Raises:
ClimateChamberSettingError – If an error occurred when setting the target temperature.
- set_temperature_limits(upper_limit: float, lower_limit: float)[source]¶
Sets the upper and lower temperature limits for the chamber.
- Parameters:
upper_limit – The temperature upper limit in Celsius.
lower_limit – The temperature lower limit in Celsius.
- Raises:
ClimateChamberSettingError – If an error occurred when setting the temperature limits.
- temperature_accuracy¶
The accuracy considered when setting the temperature
- class espec_pr3j.HeatersStatus(temperature_heater: float, humidity_heater: float)[source]¶
Bases:
object
The status of the heaters. All values are in percentage.
- class espec_pr3j.HumidityStatus(current_humidity: float, target_humidity: float | None, upper_limit: float, lower_limit: float)[source]¶
Bases:
object
The humidity status of the environmental chamber. All values are in percentage.
- class espec_pr3j.OperationMode(value)[source]¶
Bases:
Enum
The operation mode of the environmental chamber.
- CONSTANT = 'CONSTANT'¶
Constant operation
- OFF = 'OFF'¶
The panel is powered off
- RUN = 'RUN'¶
A program is running
- STANDBY = 'STANDBY'¶
All operations are stopped
- classmethod from_str(value: str) OperationMode [source]¶
Convert a string to an OperationMode.
- Parameters:
value – The string to convert. The string is case-insensitive.
- exception espec_pr3j.SettingError[source]¶
Bases:
Exception
An error occurred when sending a setting command to the environmental chamber.
- class espec_pr3j.TemperatureStatus(current_temperature: float, target_temperature: float, upper_limit: float, lower_limit: float)[source]¶
Bases:
object
The temperature status of the environmental chamber. All values are in Celsius.
- class espec_pr3j.TestAreaState(current_temperature: float, current_humidity: float, operation_state: OperationMode, number_of_alarms: int)[source]¶
Bases:
object
The state of the test area.
- operation_state: OperationMode¶
The operation state