Skip to content

CE Module

Capillary Electrophoresis instrument control module.

ChemstationAPI.controllers.ce_module.CEModule

CEModule(communicator: ChemstationCommunicator)

Agilent 7100 CE instrument control for vial handling and capillary operations.

Provides high-level interface for controlling the CE instrument's sample handling system, capillary conditioning, and pressure operations. Manages the 50-position carousel and three lift positions through ChemStation communication.

The system operates under strict safety constraints where carousel operations are only available during voltage application (analysis runtime) and completely blocked during pressure operations or when instrument doors are open.

Vial States
  • "carousel": In tray position, ready for loading
  • "inlet": At inlet lift (sample/buffer introduction, positive electrode)
  • "outlet": At outlet lift (waste/collection, ground electrode)
  • "replenishment": At replenishment lift (buffer system maintenance)
  • "out_system": Not detected in system

Attributes:

Name Type Description
comm

ChemStation communicator for sending commands to CE1 module

validation

Input validation and system state checking module

Initialize CE module with ChemStation communicator.

Parameters:

Name Type Description Default
communicator ChemstationCommunicator

ChemStation communication interface for sending commands and receiving responses from CE1 module

required

Functions

load_vial_to_position

load_vial_to_position(vial: int, position: str = 'replenishment') -> None

Load vial from carousel to specified lift position.

Transfers a vial from its carousel slot to one of the three lift positions for CE operations. The system automatically rotates the carousel to bring the vial to the front and lifts it to the target position. Includes automatic vial presence verification and mechanical stabilization time.

Parameters:

Name Type Description Default
vial int

Carousel position number (1-48 for samples, 49 for parking)

required
position str

Target lift position: - "inlet": Sample injection, positive electrode contact - "outlet": Waste collection, negative electrode (ground) - "replenishment": Buffer system maintenance

'replenishment'

Raises:

Type Description
VialError

If vial not present in carousel or loading operation fails

ValueError

If invalid position specified

SystemError

If carousel unavailable (doors open or pressure operations active)

Examples:

>>> # Load sample for analysis
>>> ce.load_vial_to_position(15, "inlet")
>>> # Load waste collection vial  
>>> ce.load_vial_to_position(20, "outlet")
Note

Carousel operations only work during voltage application (analysis runtime). Completely blocked during pressure operations (injection, conditioning, flushing).

unload_vial_from_position

unload_vial_from_position(position: str = 'replenishment') -> None

Return vial from lift position back to its original carousel slot.

Lowers the vial from the specified lift position and returns it to its original carousel position. The system automatically identifies which vial number to return based on the current lift position contents.

Parameters:

Name Type Description Default
position str

Lift position to unload from: - "inlet": Return sample vial - "outlet": Return waste vial
- "replenishment": Return buffer vial

'replenishment'

Raises:

Type Description
ValueError

If invalid position specified

Examples:

>>> # Return vials after analysis completion
>>> ce.unload_vial_from_position("inlet")
>>> ce.unload_vial_from_position("outlet")
Warning

NEVER unload inlet or outlet vials during voltage application! This can cause severe electrical damage to the instrument's electrode system. Replenishment vials can be safely unloaded during voltage application.

get_vial_state

get_vial_state(vial: int) -> str

Get current position and state of a vial within the CE system.

Queries the instrument hardware to determine the real-time location of a specific vial. Essential for tracking sample positions and validating system state before operations.

Parameters:

Name Type Description Default
vial int

Vial position number to check (1-50)

required

Returns:

Type Description
str

Current vial state:

str
  • "carousel": Available in tray position, ready for loading
str
  • "inlet": At inlet lift (sample/buffer introduction)
str
  • "outlet": At outlet lift (waste/collection)
str
  • "replenishment": At replenishment lift (buffer maintenance)
str
  • "out_system": Not detected anywhere in the system

Raises:

Type Description
ValueError

If vial number outside valid range (1-50)

SystemError

If unable to query vial state from instrument

Examples:

>>> # Check sample preparation status
>>> if ce.get_vial_state(15) == "inlet":
...     print("Sample ready for injection")
>>> # Monitor multiple vials
>>> for vial in [10, 11, 12]:
...     print(f"Vial {vial}: {ce.get_vial_state(vial)}")

flush_capillary

flush_capillary(time_flush: float, wait: bool = True) -> None

Perform high-pressure capillary conditioning flush.

Executes capillary conditioning using maximum internal pressure (~950 mbar) to remove air bubbles, clean contaminants, and condition the capillary surface. Buffer is drawn from the inlet vial and expelled through the outlet.

Parameters:

Name Type Description Default
time_flush float

Flush duration in seconds.

required
wait bool

If True, shows progress bar and waits for completion. If False, starts flush operation and returns immediately.

True

Raises:

Type Description
ValueError

If flush time is not positive

Requirements
  • Buffer vial must be loaded at inlet position
  • Adequate buffer volume for specified flush duration
Note

Uses maximum system pressure (~950 mbar). Carousel completely blocked during operation due to active pressure application.

apply_pressure_to_capillary

apply_pressure_to_capillary(pressure: float, time_pressure: float, wait: bool = True) -> None

Apply precise pressure to capillary for controlled operations.

Provides exact pressure control for sample injection, gentle conditioning, or specialized treatments. Unlike flush_capillary(), allows precise pressure specification within the safe operating range. Commonly used for hydrodynamic sample injection where pressure directly affects injected sample volume.

Parameters:

Name Type Description Default
pressure float

Pressure in mbar (range: -100 to +100) - Positive: Pushes liquid from inlet toward outlet - Negative: Creates vacuum, pulls liquid toward inlet

required
time_pressure float

Duration of pressure application in seconds

required
wait bool

If True, shows progress bar and waits for completion. If False, starts pressure and returns immediately.

True

Raises:

Type Description
ValueError

If pressure outside safe range (±100 mbar) or time not positive

Note

Injection pressure directly affects sample volume and peak shape. Carousel blocked during pressure application - position vials beforehand.