poulet_py.hardware.stimulator.julabo module#

class JulaboChiller(port=None, baudrate=9600, timeout=1)[source]#

Bases: object

Class to interact with a Julabo water chiller via serial port.

__init__(port=None, baudrate=9600, timeout=1)[source]#

Initialize the JulaboChiller with the given serial port configuration.

Args:

port (str): The serial port (e.g., ‘COM12’). baudrate (int, optional): The baud rate for the serial communication. Default is 9600. timeout (int or float, optional): The read timeout value. Default is 1 second.

set_timer(start_time)[source]#

Set the timer for the chiller.

Args:

start_time (float): The start time of the experiment.

set_error_log_path(path, file_name)[source]#

Sets the path for the error log file.

Args:

path (str): The directory where the error log file will be saved.

set_output_file(path, extra_name, base_file_name='julabo_chiller')[source]#

Sets the output file for recording the video.

Args:

path (str): The directory where the output file will be saved.

save_temperature(timestamp, temperature)[source]#

Save the temperature to a CSV file.

Args:

timestamp: The timestamp to be saved. temperature: The temperature to be saved.

read()[source]#

Read data from the chiller.

Returns:

str: The response from the chiller, or None if no data is available.

write(command)[source]#

Write a command to the chiller.

Args:

command (str): The command to send to the chiller.

close_port()[source]#

Close the serial port connection.

set_temperature(temperature)[source]#

Set the temperature of the chiller.

Args:

temperature (float): The temperature to set (in Celsius).

get_temperature()[source]#

Get the current temperature from the chiller.

Returns:

str: The current temperature reported by the chiller.

start()[source]#

Turn on the chiller.

stop()[source]#

Turn off the chiller.

check_version()[source]#

Check the version of the chiller.

Returns:

str: The version information.

check_status()[source]#

Check the status of the chiller.

Returns:

str: The status information.

check_started()[source]#

Check whether the chiller has started.

Returns:

str: The started status.

get_target_temperature()[source]#

Get the target temperature set point.

Returns:

str: The target temperature.