Skip to content

v1 CLARIOstar: build the configuration from what the reader reports - #1528

Merged
BioCam merged 1 commit into
PyLabRobot:mainfrom
BioCam:bmg-clariostar-v1-configuration-per-subsystem
Oct 22, 2026
Merged

BioCam merged 1 commit into
PyLabRobot:mainfrom
BioCam:bmg-clariostar-v1-configuration-per-subsystem

Conversation

@BioCam

@BioCam BioCam commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

The Problem

When it initializes, the reader answers with a list of its fitted hardware, one block per module (main board, detectors, spectrometer, slides, temperature controller, pumps, stacker, barcode readers, atmospheric control unit). The v1 CLARIOstar decodes these blocks in turn, but stops at the first one it cannot decode: a missing block, a shorter one, or a slide position without a whole number raises, and every field after it stays unknown. A reader whose INIT reply is laid out slightly differently therefore loses unrelated facts - an unexpected slide text leaves temperature_controller unknown, so the temperature controller is never built. The stored parameters come back under free-text names ("No. of time-resolved fluorescence meas. channels"), in no order, every value read as unsigned - a slide offset of -5 comes back as 65531 - and four entries missing. And some of what the reader does report goes unused: its serial number is never read, although it is how a reader is selected when several are connected; the filter-slot counts are fixed defaults although the reader names its slides' positions; a reader without linear variable filters (no monochromator) would accept monochromator reads; and the setup summary leaves out most of what the reader reports (pumps, barcode readers, polarization, 1536-well plates, shaking) and its serial number.

PR Content

  • Each hardware block is decoded on its own: one missing or too short leaves only its fields None, with a warning naming it; the others are still decoded. A slide position without a whole number is skipped.
  • request_parameters returns the stored parameters by keys that describe each stored value - extended_incubator, fluorescence_measurement_channel_count - instead of free-text names. PARAMETER_TABLE is grouped by what the values are for (fitted options, measurement, auto-gain levels, optics, plate transport, pumps, barcode readers, fans and temperature), with each value's unit; the four missing entries are added, and the eight values that can be negative (SIGNED_PARAMETERS, e.g. the slide and transport offsets) are decoded signed. A test pins that no two entries overlap.
  • The serial number is read from the reader's stored parameters - the one PLR's FTDI link already selects a reader by (device_id); a reader opened by another serial logs a warning. A saved configuration still holds the placeholder.
  • The fluorescence filter slots are the reader's slides': each position other than "open", whatever its name. A reader whose slides are missing or of different sizes keeps the defaults (one size serves the two excitation and the two emission slides).
  • A reader reporting no linear variable filters refuses fluorescence by wavelength (a filter still reads) and luminescence: it has no monochromator. Unknown lets the read through.
  • Setup reads the firmware's build number (from the INIT reply) and build date (REQUEST 09, the reply the firmware gives about itself) and shows them after the firmware version. A reply without a date logs a warning; setup carries on.
  • The setup summary, logged at INFO when setup finishes, prints every field of the configuration: the serial number, each measurement mode, detector and optic, the temperature controller, high-speed shaking, 1536-well plates, each pump and barcode reader position with its type, the stacker and the atmospheric control unit. A field that was not read shows None; the filter slots say "defaults" when the reader's slides were not used:
[CLARIOstarPlus] Connected on FTDI 0x0403:0xbb68 (device 123-4567)
  Model: CLARIOstarPlus
  Serial number: 123-4567
  Firmware: 1.35 (build 1, built 2020-11-20)
  Mainboard revision: 2
  Measurement modes:
    - absorbance: True
    - fluorescence: True
    - luminescence: True
    - time-resolved fluorescence: True
    - fluorescence polarization, visible: False
    - fluorescence polarization, ultraviolet: False
    - AlphaScreen: False
  Detectors:
    - standard photomultiplier: True
    - extended-red photomultiplier: True
    - dual photomultipliers: True
    - crossover: False
  Optics:
    - monochromators: True
    - spectrometer: True
    - bottom optic: True
  Filter slots: excitation 4, dichroic 3, emission 4
  Temperature control:
    - temperature controller: True
    - channels: 2
    - extended range (10-65 C): False
  High-speed shaking: False
  1536-well plates: False
  Pumps:
    - pump 1: False
    - pump 2: False
    - pump 3: False
  Barcode readers:
    - front: False
    - right: False
    - optional 1: False
    - optional 2: False
  Stacker: False
  Atmospheric control unit: False

Nothing changes on the wire, and on a reader that reports everything, nothing changes in what it accepts.

🤖 Generated with Claude Code

@BioCam
BioCam marked this pull request as ready for review October 22, 2026 13:48
@BioCam
BioCam force-pushed the bmg-clariostar-v1-configuration-per-subsystem branch from 2b40afc to 3ea02de Compare October 22, 2026 13:49
- Each block of the reader's hardware list (its INIT reply) is decoded on its own: one missing
  or too short leaves only its fields unknown, with a warning naming it.
- A slide position without a whole number is left out of `monochromator_slides`.
- The stored parameters are keyed by what each value is, grouped by what the values are for,
  with units; the eight that can be negative are decoded signed.
- The serial number is read from the reader's stored parameters; a link opened by another
  serial warns. A saved configuration still holds the placeholder.
- The fluorescence filter slots are the reader's slides' (each position not "open"); a reader
  whose slides are missing or of different sizes keeps the defaults.
- A reader reporting no linear variable filters refuses fluorescence by wavelength and
  luminescence: it has no monochromator. Unknown lets the read through.
- Setup reads the firmware's build date (REQUEST 09) and the build number (INIT), shown after
  the firmware version.
- The setup summary prints every configuration field, True/False for each yes/no, the serial
  number after the model; a field not read shows None.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@BioCam
BioCam force-pushed the bmg-clariostar-v1-configuration-per-subsystem branch from 3ea02de to 6b3e07b Compare October 22, 2026 13:58
@BioCam
BioCam merged commit be19709 into PyLabRobot:main Oct 22, 2026
27 checks passed
@BioCam
BioCam deleted the bmg-clariostar-v1-configuration-per-subsystem branch October 22, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant