Repository navigation
Conversation
…nal CLARIOstar An original CLARIOstar (main board revision 1) on firmware 1.20, compiled 2017-04-27, lays out its INIT reply as the Plus 1.35 does but for a longer pumps block (0F: 31 bytes, against 3 on the Plus, which has no pumps), and its stored parameters as 1.35's. Read with the 1.x decoders unchanged, every block and parameter decodes; the fields match the reader as known to its users. DECODED_FIRMWARE now starts at 1.200; the undecoded-firmware test moves its example from 1.29 to 1.19. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011KebPY9ZD8HmWuTM4tQpVz
…lies decode to its recording The payloads of its INIT, stored parameters and firmware info replies, with the serial number zeroed at SERIAL_NUMBER_ADDRESSES and the pumps' part numbers in block 0F's text zeroed (neither is decoded). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011KebPY9ZD8HmWuTM4tQpVz
`CLARIOstar.pumps` (`driver.pumps`) exists when the reader reports a pump. It has `prime` and `backflush` for pumps 1 and 2, 500-4500 uL in steps of 500, at 100, 300 or 430 uL/s. The driver sends a command once and waits until the reader reads idle. Settings outside those verified on firmware 1.20 are sent with a warning. `CLARIOstarStatus.reagent_door_open` reads STATUS byte 3 bit 6. On firmware 1.20, `prime` raises `RuntimeError` without sending when that bit reads the door shut. The driver raises `PumpAbortedError` when the reader reports a pump command aborted, and when the door closes during a prime, once the reader reads idle. `describe_quit_codes` describes quit codes 243/12 as the reagent door abort. The driver does not start a pump command during a measurement, or a measurement during a pump command. A simulated reader with pumps checks the settings and returns at once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011KebPWoZ9NbAsYfKYTkZQ2
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #1606, which adds an original CLARIOstar with firmware 1.20 and two XCalibur pumps. Until #1606 merges, this PR also shows its two commits; the new code is the last commit, 22fd467. I will rebase onto
mainonce #1606 merges. This PR addsCLARIOstar.pumps.prime()andbackflush();CLARIOstar.pumpsexists when the reader reports a pump.Command encoding
The command is family
0x02with payload02 <pump> <flow rate code> <volume / 500 uL>. The pump byte is the pumpnumber, plus
0x10for a backflush.0c), 300 (04), 430 (01)The other settings in range (500-4500 uL in steps of 500, and 300 uL/s for a backflush) follow the same rule, and the
driver sends them with a warning. The tests compare seven of these frames, checksum included, with what
primeandbackflushwrite.Runs on the reader
We ran backflushes of pumps 1 and 2 and primes of pump 1 on this reader, all 500 uL at 100 uL/s with water. Each
command's reply or the next status read busy. During backflushes, status byte 6 read
02, the pump family. Thereader read idle again after 13.5 to 31 s.
When a call returns
The driver sends a pump command once. If the reply is malformed, the driver discards it and reads busy and idle from
status polls, as
initializedoes for INIT. It then waits for busy and then idle, with a 5 s start window, because acommand's reply can read idle while the reader starts it. After a timeout or a cancelled call the reader keeps
pumping; the driver sends no stop. The driver raises
RuntimeErrorfor a pump command during a measurement, and fora measurement during a pump command, using the existing one-measurement guard.
Reagent door
STATUS byte 3 bit 6 is
CLARIOstarStatus.reagent_door_open. On this reader, while idle, it read set in all 60 pollswith the door open and clear in all 60 with the door latched shut, over three captures of each. A door that is closed
but not latched appears to read open.
primeraisesRuntimeErrorwithout sending when the bit reads the door shut. On other firmwareprimedoes not check the bit and sends with a warning.primeandbackflushraisePumpAbortedErrorwith the codes of any new warning in a reply.describe_quit_codesdescribes 243/12 as the reagent door abort and keeps its existing description for 243 alone.then raises
PumpAbortedError, so the caller does not see the prime end while the reader may still be pumping.When the door was closed during a prime (once), one status reply carried the bit clear, busy clear and 243/12. We
do not know how much a prime delivers when it ends early.
backflushdoes not check the door.Simulation
Given this reader's recording, the simulated driver builds
CLARIOstarSimulationPumps. Itsprimeandbackflushcheck the settings and return at once, and the simulated status reads the door open.
Not covered
Pump 3, whose byte is not known; injection during a read, which is the next PR; primes of pump 2, and settings other
than 500 uL at 100 uL/s, on the reader.
Tests
pumps_tests.pychecks exact command frames against synthetic status replies, andsimulator_tests.pyhas thesimulated pumps and the device property. The 465 BMG tests pass.
Questions
even without pumps? If the bit follows the door there too, the door check can cover more than firmware 1.20.
_read_framekeeps bytespast a frame only until the next exchange. We have only seen warnings inside a status reply, and for a prime the
driver also watches the door bit. Is that acceptable, or would you rather
ftdi_interface.pykept the bytes past aframe for the next read?
🤖 Generated with Claude Code
https://claude.ai/code/session_011KebPWoZ9NbAsYfKYTkZQ2