Skip to content

Sentron

This module provides a class for the Sentron pH meter.

ATTRIBUTE DESCRIPTION
MAX_LEN

Maximum length of the data buffer

TYPE: int

READ_FORMAT

Format for reading data

TYPE: str

pHData

NamedTuple for pH data

TYPE: NamedTuple

CLASS DESCRIPTION
SI600

Sentron pH meter class

Documentation last updated: 2025-02-22

SI600

SI600(
    port: str,
    stabilize_timeout: float = 10,
    pH_tolerance: float = 1.5,
    temp_tolerance: float = 1.5,
    *,
    baudrate: int = 9600,
    verbose: bool = False,
    **kwargs,
)

Bases: Measurer

Sentron pH meter

ATTRIBUTE DESCRIPTION
pH_tolerance

Tolerance for pH

TYPE: float

temp_tolerance

Tolerance for temperature

TYPE: float

stabilize_timeout

Time to wait for the device to stabilize

TYPE: float

buffer

data buffer for the device

TYPE: deque

buffer_df

data buffer as a DataFrame

TYPE: DataFrame

records

records for the device

TYPE: deque

records_df

records as a DataFrame

TYPE: DataFrame

record_event

event for recording data

TYPE: Event

program

program to run

TYPE: Program

runs

dictionary of runs

TYPE: dict

n_runs

number of runs

TYPE: int

connection_details

connection details for the device

TYPE: dict

device

device object that communicates with physical tool

TYPE: Device

flags

flags for the class

TYPE: SimpleNamespace[str, bool]

is_busy

whether the device is busy

TYPE: bool

is_connected

whether the device is connected

TYPE: bool

verbose

verbosity of class

TYPE: bool

METHOD DESCRIPTION
getData

Get pH and temperature data

atPH

Check if the device is at the target pH

atTemperature

Check if the device is at the target temperature

getPH

Get pH

getTemperature

Get temperature

record

Record data

stream

Stream data

connect

connect to the device

disconnect

disconnect from the device

execute

execute task

resetFlags

reset all flags to class attribute _default_flags

run

alias for execute()

shutdown

shutdown procedure for the device

Initialize the Sentron pH meter

PARAMETER DESCRIPTION
port

Serial port

TYPE: str

stabilize_timeout

Time to wait for the device to stabilize

TYPE: float DEFAULT: 10

pH_tolerance

Tolerance for pH

TYPE: float DEFAULT: 1.5

temp_tolerance

Tolerance for temperature

TYPE: float DEFAULT: 1.5

baudrate

Baudrate for serial communication

TYPE: int DEFAULT: 9600

verbose

Print verbose output

TYPE: bool DEFAULT: False

atPH

atPH(
    pH: float,
    *,
    tolerance: float | None = None,
    stabilize_timeout: float = 0,
) -> bool

Check if the device is at the target pH

PARAMETER DESCRIPTION
pH

Target pH

TYPE: float

tolerance

Tolerance for pH

TYPE: float DEFAULT: None

stabilize_timeout

Time to wait for the device to stabilize

TYPE: float DEFAULT: 0

RETURNS DESCRIPTION
bool

True if the device is at the target pH

TYPE: bool

atTemperature

atTemperature(
    temperature: float,
    *,
    tolerance: float | None = None,
    stabilize_timeout: float = 0,
) -> bool

Check if the device is at the target temperature

PARAMETER DESCRIPTION
temperature

Target temperature

TYPE: float

tolerance

Tolerance for temperature

TYPE: float DEFAULT: None

stabilize_timeout

Time to wait for the device to stabilize

TYPE: float DEFAULT: 0

RETURNS DESCRIPTION
bool

True if the device is at the target temperature

TYPE: bool

getData

getData(*args, **kwargs) -> pHData | None

Get pH and temperature data

RETURNS DESCRIPTION
pHData

pH and temperature data

TYPE: pHData | None

getPH

getPH() -> float | None

Get pH

RETURNS DESCRIPTION
float

pH

TYPE: float | None

getTemperature

getTemperature() -> float | None

Get temperature

RETURNS DESCRIPTION
float

temperature

TYPE: float | None