NextGenPump

class py_hplc.pump.NextGenPump(device: Union[SerialBase, str], logger: Logger = None)[source]

Serial port wrapper for Next Generation pumps. Commands to the pumps are available as methods on this object.

Every command will return either the string ‘OK/’ or a dataclass instance. These dataclasses will contain at least a response attribute whose value is a string represtation of the pump’s response.

clear_faults() str[source]

Clears the pump’s faults.

current_conditions() py_hplc.pump.CurrentConditions[source]

Returns a dataclass describing the current conditions of the pump.

Returns

a dataclass with pressure and flowrate attributes

Return type

CurrentConditions

current_state() py_hplc.pump.CurrentState[source]

Returns a dataclass describing the current state of the pump.

Returns

dataclass with flowrate, upper_pressure_limit, lower_pressure_limit, pressure units, is_running, and response attributes

Return type

CurrentState

keypad_disable() str[source]

Disables the pump’s keypad.

keypad_enable() str[source]

Enables the pump’s keypad.

pump_info() py_hplc.pump.PumpInfo[source]

Gets a dictionary of information about the pump.

Returns

dataclass with flowrate, is_running, pressure_compensation, head, upper_limit, lower_limit, in_prime, keypad_enabled, motor_stall_fault, and response attributes

Return type

PumpInfo

read_faults() py_hplc.pump.Faults[source]

Returns a dataclass representing the pump’s fault status.

Returns

dataclass with motor_stall_fault, upper_pressure_fault, lower_pressure_fault, and reponse attributes

Return type

Faults

reset() str[source]

Resets the pump’s user-adjustable values to factory defaults.

run() str[source]

Runs the pump.

set_leak_mode(mode: int) int[source]

Sets the pump’s current leak mode as an int.

0 if disabled. 1 if detected leak will fault. 2 if it will not fault.

stop() str[source]

Stops the pump.

zero_seal() str[source]

Zero the seal-life stroke counter.

property flowrate: float

Gets/sets the flowrate of the pump as a float in mililiters per minute.

Set values are bounded to the pump’s max flowrate.

Returns

the pump’s flowrate in mililiters per minute

Return type

float

property flowrate_compensation: float

Returns the flowrate compensation as a float representing a percentage.

property is_running: None

Returns a bool representing if the pump is running or not.

property leak_detected: bool

Returns a bool representing if a leak is detected. Pumps without a leak sensor always return False.

Returns

whether or not a leak is detected

Return type

bool

property lower_pressure_limit: float

Gets/sets the lower pressurepump limit as a float.

Units can be inspected on the instance’s pressure_units attribute. Values in bars can be precise to one digit after the decimal point. Values in MPa can be precise to two digits after the decimal point.

property pressure: Union[float, int]

Gets the pump’s current pressure as a float using the pump’s pressure units.

Pressure units are most easily found on a pump instance at pressure_units

property solvent: int

Gets/sets the solvent compressibility value as an int in 10 ** -6 per bar.

Alternatively, accepts the name of a solvent mapped in SOLVENT_COMPRESSIBILITY. See SOLVENT_COMPRESSIBILITY to get the solvent name.

property stroke_counter: int

Gets the seal-life stroke counter as an int.

property upper_pressure_limit: float

Gets/sets the pump’s current upper pressure limit as a float.

The units used can be inspected on the instance’s pressure_units attribute. Values in bars can be precise to one digit after the decimal point. Values in MPa can be precise to two digits after the decimal point.

class py_hplc.pump.CurrentConditions(pressure: Union[float, int], flowrate: float, response: str)[source]

A dataclass representing the current conditions of the pump.

Describes the pump’s pressure and flowrate.

pressure

current pressure as a float (bar/MPa) or int (psi)

Type

Union[float, int]

flowrate

current flowrate as a float

Type

float

response

the pump’s response as a string

Type

str

class py_hplc.pump.CurrentState(flowrate: float, upper_pressure_limit: float, lower_pressure_limit: float, pressure_units: str, is_running: bool, response: str)[source]

A dataclass representing the current state of the pump.

Describes the pump’s flowrate, pressure limits, pressure units, and running state.

flowrate

current flowrate as a float

Type

float

upper_pressure_limit

upper pressure at which the pump will fault

Type

float

lower_pressure_limit

lower pressure at which the pump will fault

Type

float

pressure_units

the pump’s pressure units

Type

str

is_running

whether or not the pump is currently running

Type

bool

response

the pump’s response as a string

Type

str

class py_hplc.pump.PumpInfo(flowrate: float, is_running: bool, pressure_compensation: float, head: str, upper_pressure_fault: bool, lower_pressure_fault: bool, in_prime: bool, keypad_enabled: bool, motor_stall_fault: bool, response: str)[source]

A dataclass representing information about the pump.

Describes the pump’s flowrate, running state, pressure compensation value, head, pressure fault states, priming state, keypad enabled state, and motor stall fault state.

flowrate

current flowrate as a float

Type

float

is_running

whether or not the pump is currently running

Type

bool

pressure_compensation

pressure compensation value. set via calibration

Type

float

head

the pump’s head type

Type

str

upper_pressure_fault

whether the upper pressure limit has been reached

Type

bool

lower_pressure_fault

whether the lower pressure limit has been reached

Type

bool

in_prime

whether the pump is in priming mode

Type

bool

keypad_enabled

whether the pump’s keypad is enabled

Type

bool

motor_stall_fault

whether the pump’s motor has faulted

Type

bool

response

the pump’s response as a string

Type

str

class py_hplc.pump.Faults(motor_stall_fault: bool, upper_pressure_fault: bool, lower_pressure_fault: bool, response: str)[source]

A dataclass representing the pump’s current fault state.

Describes the state of the motor stall fault and pressure limit faults.

motor_stall_fault

whether the pump’s motor has faulted

Type

bool

upper_pressure_fault

whether the upper pressure limit has been reached

Type

bool

lower_pressure_fault

whether the lower pressure limit has been reached

Type

bool

class py_hplc.pump.Solvents(value)[source]

An enum containing some common solvents and their compressibility values.

Value units are 10 ** -6 per bar. Members are documented here as attributes. Used when setting the solvent for pumps with a solvent select feature. When setting the solvent, you can pass in an int or one of these names as a string.

ACETONITRILE

115

HEXANE

167

ISOPROPANOL

84

METHANOL

121

TETRAHYDROFURAN

54

WATER

46

class py_hplc.pump.LeakModes(value)[source]

An enum containing the possible leak modes.

Members are documented here as attributes. This is currently unused.

LEAK_SENSOR_DISABLED

0

LEAK_DOES_NOT_FAULT

1

LEAK_DOES_FAULT

2