Reagent terminal (WPF warehousing client): letting every bottle keep its own books

A 15.1-inch touchscreen terminal that folds lab reagent work into 13 modules: log in by card or face, identify a bottle by scanning, weigh it on a built-in balance, print its QR label on thermal paper. The ledger is no longer typed at a desk — it grows while the operator stands at the cabinet.

Industry
Lab equipment / reagent and consumable control (clinical labs, universities, research institutes)
System type
WPF desktop client on an all-in-one terminal + serial device integration + local cache
Key technology
WPF / .NET · serial devices (controller board, card reader, balance, printer, camera) · on-device face liveness · one-code-per-bottle · JSON configuration · offline cache
Jiding's role
Terminal software design and development, hardware integration, configuration and deployment scheme, manual and operator training
10Hardware parts inside one cabinet-sized machine, so nothing needs turning around
13Modules; eight entrances on the home screen, the configuration ones behind a card
6Record types for traceability: receiving, return, unreturned, stocktake, inbound, outbound
5Access cards shipped with the unit; the card opens the setup and service menus

Why It Is Hard

The expensive part of reagent control is not the reagent. It is “nobody can say”.

A 500 ml bottle of ethanol costs little. But four questions that cannot be answered are a fuse: when was this bottle opened, who took 20 ml and when, how much is left, and is it expired. The traditional answer is a paper log plus a spreadsheet — handwriting at checkout, eyeballing at stocktake, memory for expiry. The more cabinets and people, the less anyone trusts the book.

The book is on paper, the goods are in the cabinet Two people borrow the same bottle; the log records one line. At month end three bottles are missing and nobody can say where.
A QR code is created at inbound, and every action must scan it. The record is not typed afterwards; it is produced by the action: scan to receive, scan to take, scan to return, quantities follow.
Who took what is reconstructed from memory A bottle leaves for three days; the log says “Zhang took it”. How much was used, whether it came back, is guesswork.
Login requires a card or a face, taking requires a note, return allows adjusting the volume, disposal separates “used up” from “scrapped”. Six record types keep the person, the time and the quantity; unreturned items get their own page.
Expiry and opening dates have no owner An expired reagent may still work, but if it fails the responsibility is managerial. The opening date is known only to whoever opened it first.
Inbound captures expiry, opening time and post-opening shelf life in one pass, defaulted from the reagent profile and editable on site; the detail page puts those fields next to stock, so stocktake surfaces the exception.
Every new lab means a new build Different COM ports, cabinet counts, label sizes and networks — each site triggers a round of rework.
Board port, reader port, balance port and command, service URL, page size, auto-logout, print size — all in one configuration file. One build, many sites, no developer on site for a port number.

All screenshots come from a demo environment: the brand area and device markings are blurred and no manufacturer is named; organisation names, people and reagent values are demo data.

The Machine

Four actions, one machine

The old routine: open the system on a PC, turn to grab the scanner, turn again to put the bottle on a balance, then walk to another machine for a label. Four turns and a dozen steps per inbound. The terminal puts screen, camera, card reader, scanner, scale and printer into one body: park it beside the cabinet and the operator finishes without moving their feet.

Floor-standing reagent terminal with ten numbered hardware parts Device markings blurred
Floor-standing unit: operating area on top (screen, camera, card reader, printer, scanner), the access opening and weighing platform in the middle, cabinet below, castors at the base.
1Main power switchRear of the unit, cuts total power
2Rocker switchTransformer input
3USB portKeyboard, USB stick
4Screen15.1-inch touch, card-gated menus
5CameraFace login
6Card readerID and access cards
7PrinterThermal QR labels
8QR scannerIdentifies the bottle
9Scale0–3 kg, tare and net
10Network portSub-cabinets

Two form factors, one build

Desktop units sit at the end of a bench; floor-standing units stand on the route through the reagent room. Only the cabinet and the footprint differ — screen, peripherals and software are identical. Start with one desktop unit, prove the workflow, then add floor units without retraining anyone.

Form factorDimensionsScale rangeScreen
Desktop480 × 410 × 520 mm0–3 kg15.10 in
Floor-standing500 × 623 × 1960 mm0–3 kg15.10 in
Desktop reagent terminal Device markings blurred
Desktop unit: compact enough for the end of a bench or a sample pre-treatment area.
120 GBDisk shared by the OS and the local cache
220 V / 50 HzMains supply, no separate regulator
50 WWhole unit, about an old desk lamp
0–3 kgScale range, one bottle or a full box

Topology

Behind the screen: a few serial lines, a cabinet of drawers

This terminal is not a wrapped web page. It talks to hardware directly: the controller board reads every drawer position, the reader, scale, printer and camera each hold a port; at the same time it reconciles with the platform. Millisecond serial polling on one side, a network that may drop on the other — the two must be designed apart.

Peripherals (serial / USB) Terminal Platform Cabinet controllerCOM10 · drawer position signals Card readerCOM1 · ID and access cards BalanceCOM8 · tare / net weight Thermal printerQR labels CameraUSB · 1280×720 @30 fps QR scannerUSB · identifies the bottle serial / USB WPF terminal 15.1″ touch · works offline Logincard / face Scanperson or bottle Weightare / net PrintQR label Local cache localStorage.json Written first when the network drops Inbound and printing never stall HTTP 5000 Platform WebApi BaseUrl: · local http://localhost:9353 · server IP + port · cloud domain Organisation, reagent profiles, records Stored and reported here Ports, board count, read command and polling interval all live in appsettings.json: a new site is a config change, not a rebuild. One polling cycle is sized by cabinet count: cabinets × 10 s recommended, never below cabinets × 5 s.
One terminal, six peripherals, one uplink: peripherals turn actions into data, the terminal turns data into a ledger, the platform turns the ledger into reports.

The polling interval is arithmetic, not a guess

The board asks every drawer whether it is closed, one by one; more cabinets means a longer cycle. The value is expressed as “cabinets × 10 seconds”, with a floor of “cabinets × 5 seconds” — below that, the next round is sent before the previous one answers and the serial line jams. Parameters like this must be calculable and verifiable on site.

Even the command is configurable

The board read command is a hex string starting with FA, and board firmware varies by batch. Put it in the config and a board swap is one string, not a new release. Same for the balance: R on older models, W on newer ones.

HTTP 5000 is the port the terminal exposes; WebApi.BaseUrl decides whether it talks to a local service, a server room or a cloud domain. One installer, three deployment shapes, one line of difference.

Two Keys

Two keys: a card and a face

The first link in the traceability chain is “who”. Login is not a formality: it decides whose name lands on every record that follows. The card is fast, the face resists proxy check-ins; with both present, a broken key never stops the day's work.

Card: two seconds in

When logged out, placing a registered ID card on the reader at the lower left logs in without touching the screen. Five access cards ship with the unit to open configuration and service menus; they must be held by named owners, because the menus themselves are card-gated so nobody wanders into settings.

Face: no card needed

With a camera index configured and a camera found, standing in front of the screen is enough. Inference runs locally (ViewFaceCore): both the enrolment image and the comparison stay on the machine, biometrics never leave for the cloud.

Walking away? 1200 seconds of inactivity logs out, and the value can be shortened to suit lab policy.

ParameterDefaultWhy this value
Camera resolution1280 × 720Higher adds decode load without helping recognition
Frame rate30 fpsMatches a normal USB camera
Detection delay50 msLeaves room for inference between frames
Liveness frames50Consecutive frames, to reject photos and replays
Face crop300–500 pxToo small loses features, too large slows matching
Cache folderFacesWhere enrolment images live, relative to install
Auto logout1200 sAn unattended screen must not stay unlocked

The on-site fallback: face recognition depends on CPU instruction sets. Four algorithm libraries ship under viewfacecore\win\x64 (default / Haswell / Pentium / Sandy Bridge); when a machine lacks AVX2 and the module will not start, renaming the matching dll to tennis.dll switches it — no new machine, no code change. On device projects, a pre-built escape hatch is worth more than one more feature.

One Code, Four Moves

One code per bottle: four moves that close a loop

There are only four business actions: inbound, take, return, dispose. All four orbit one thing — the label on the bottle. The QR code is not a sticker; it is the reagent's identity in the system: created at inbound, read at take, updated at return, retired at disposal.

Inbound profile · weigh · label Take scan · purpose note Return adjust volume · note Dispose used up / scrap · final ONE CODE four actions, one identity Every lap updates stock, record and label together; unreturned bottles sit on a page of their own.
Inboundprofile · weigh · print label
↓
Takescan · choose a purpose note
↓
Returnadjust volume · note
↓
Disposeused up / scrap · final
↺
Back to inboundSame code, four actions, all recorded
Inbound creates, take and return read and write, disposal retires. All four require a scan, so all four leave a trace.
Scan the bottleThe QR code or the ID pulls up the profile — no CAS number typed by hand.
Check and adjustConfirm location, form and spec; volume can change on return, quantity on inbound.
ConfirmA dialog asks for a reason or a note; disposal and stocktake confirmation are final.
Print and recordA label prints on success; the bottle is only really in the system once it is stuck on.
Inbound list: search reagent profiles by initials
Inbound list: search first, then pickInitials of the reagent name are enough; the list comes from pre-loaded profiles.
Inbound detail: profile fields carried in, balance showing tare and net weight
Inbound detail: half locked, half editableName, CAS and owner come from the profile; location, form and spec can be corrected.

Warehousing

Why inbound deserves its own chapter

Inbound is the source of every number. One wrong character here and six record types inherit the error. The rule for this page: whatever can be carried in is never offered as a choice, whatever can be locked is never editable, and whatever must be typed gets a clear hint.

FieldComes fromEditable
Reagent name / CAS / owner / categoryThe pre-loaded reagent profileNo. Prevents mismatches and prevents anyone inventing a reagent on site
Unit mode / location / form / manufacturer / purity / specThat reagent's previous configurationYes. Changes write back, so the next inbound defaults to the new value
Expiry / opening time / post-opening shelf lifeDefaulted from the profileYes, or left unset for an unopened bottle
Inbound quantityOperator inputRequired; unit follows the mode (g / ml / bottle)
Tare / net weightLive scale reading“Tare” and “net” capture each value; the reading refreshes continuously

Weighing is for the person, not the system

Tare is the empty bottle, net is the reagent. Shown side by side, an administrator can see at a glance how much is left during stocktake. With a single number, someone always asks: is that with the bottle or without? Two numbers end the argument.

“Continue inbound” saves forty seconds

When one reagent arrives as several bottles, the next bottle continues from the same page instead of re-searching and refilling. At 40 seconds a bottle and 60 bottles a day, that is a lunch break — and one less duplicate entry is one less chance to mistype.

Print and stick; the job is not done until it is stuck

On success the thermal printer emits a label carrying the bottle's identity. An unlabelled bottle is undocumented: the next take cannot scan it, someone types the number by hand, and the chain breaks right there.

Worn, crooked or moved to another cabinet? A separate reprint module filters by cabinet or searches by initials and prints in batch — same number, unbroken history.

The inbound button is the only one on this page that takes effect immediately; a mis-tap puts a bottle into the books that does not exist. So its confirmation dialog is heavier than any other, and the wording says so.

Stocktaking

Stocktake: red still to count, blue confirmed

Two things ruin a stocktake: losing track halfway through, and realising the wrong cabinet was opened when it is already too late. So state is expressed as colour: red has not been counted, blue is confirmed. Progress is visible from across the room.

Cabinet stocktake6 pending · 0 on loan · 2 reagents confirmed
ReagentIDStockPurityStatus
Monascus redTEST2026080400148.0 gChemical gradePending
Sulfuric acid1154580419500.0 g68%Pending
2,4-Dinitrophenol126538876200.00 ml98%Pending
Ethanol1324258648200.00 ml98%In stock
Hydrogen peroxide13242935781 bottleARIn stock
Scale   tare 0.0 g   net 0.0 g ResetConfirm stocktake

Illustration: red rows are pending, blue rows confirmed; stock figures are editable in place and turn the row from red to blue once confirmed.

Two entries for two situations

By cabinet: pick a cabinet, scan bottle by bottle. The monthly full count, one cabinet at a time.

Single reagent: scan one bottle and correct its stock directly. For the moment someone says “this one looks wrong”.

The weighing area at the lower left shows tare and net weight live, so the administrator can check while counting: if the numbers disagree, the bottle was used without being recorded, or it is in the wrong slot.

“Reset” is the undo the room needs

Halfway through, the wrong cabinet is open or the shift changes hands: Reset returns every confirmed row to pending and the count starts again.

“Confirm” has no undo, though: once confirmed, anything not counted is written off as scrapped, stock zeroed, irreversibly. So the button sits bottom right, in the heaviest colour, behind a dialog — making an irreversible action slightly harder to press is basic hygiene in this kind of system.

Cabinet stocktake screen: red rows pending, blue rows confirmed Interface de-identified
Cabinet stocktake on the device: the title line gives pending, on-loan and confirmed counts, rows are colour-coded, and the actions sit at the bottom.

Traceability

Traceability: six record types, one unbroken chain

When something goes wrong, the system must be able to look back; that is the floor for reagent control. Actions are split into six record types, each a table filterable by time, person and reagent; together they form a bottle's CV from arrival to retirement.

ReceivingReturnUnreturnedStocktakeInboundOutbound

The six share their structure and differ in a few fields. Common fields: cabinet / location, ID, name, stock at the time of taking, time, person. “Unreturned” is the subtraction of receiving from return — what went out and never came back, on its own page, no cross-checking two tables by hand.

Operation records: receiving, return, unreturned, stocktake, inbound and outbound tabs
Six record types, one entranceSwitch tabs at the top; fields are uniform, so looking back by person and time is one query.
Reagent detail: location, ID, CAS, form, purity, stock and owner
Detail page: one bottle on one screenCAS opens the MSDS; stock, shelf life and owner sit alongside.

Tap the CAS number, get the MSDS

The CAS number on the detail page is a link to that chemical's safety data sheet. Looking up an MSDS is a daily move in a lab; putting it on the CAS number beats hiding it under a “documents” menu, because people look it up while holding the bottle, not while browsing files.

Six records, six reconciliation tables

Storekeepers chase people with “unreturned”, safety officers close the month with “outbound”, administrators verify with “stocktake”, auditors read “receiving” to see who touched what and when. One data source, four uses, and nobody exports to a spreadsheet again.

Configuration

Delivery is not “install and leave”: one config file explains the site

The usual failure in device software is not a missing feature, it is “it will not install at the next site”: different ports, a different balance, a different cabinet count, a different network. The answer here is unglamorous and effective — everything that varies goes into one JSON file.

appsettings.jsonexcerpt · site-editable keys
{ "IsTest": false, // factory check only; off in production "WebApi": { "BaseUrl": "http://192.168.1.20:9353" // local / server IP / cloud domain }, "Cabinet": { "Com": "COM10", // board port, from Device Manager "Items": [ 1, 2 ], // chained board IDs "LoopSeconds": 20 // cabinets x 10; floor is cabinets x 5 }, "Card":    { "Com": "COM1" }, // reader port "Balance": { "Com": "COM8", "Cmd": "W", "ZeroRange": 120 }, // R on older balances, W on newer; zero range "FaceSetting": { "CameraWidth": 1280, "CameraHeight": 720, "CameraFps": 30, "CatchPicQty": 50, // liveness frames "CameraIndex": 0 // which camera, when there are several }, "Settings": { "HttpPort": 5000, // port exposed to the platform "AutoLogOffSeconds": 1200, // idle logout "DefaultPageSize": 8, // list page size "PrintSize": "large", // label size "BoardSize": 7 // 5-inch and 7-inch panels use different commands }
}
KeyDefaultHow to change it on site
Cabinet.Com / ItemsCOM10 / [1]Match the actual port and chained board count; add a board ID when adding sub-cabinets
Card.ComCOM1The reader's port, read off Device Manager
Balance.Com / CmdCOM8 / RR for older balances, W for newer; if no reading arrives, try this letter first
WebApi.BaseUrllocalhost:9353Local service, server room IP or cloud domain — pick one
AutoLogOffSeconds1200Shorten per lab policy; 300 s for a hazardous reagent room
PrintSize / BoardSizelarge / 7Label and small-panel sizes; a 5-inch panel must be set to 5, commands differ

Five accessories, all of them used

Certificate of conformity, manual, one power cord, five access cards, five rolls of thermal paper. Five cards for five roles — administrator, storekeeper, safety officer, auditor, spare; five rolls cover acceptance testing, then reorder by part number.

5 cardsIssued per role, held by named owners
5 rollsEnough for acceptance and training

Commissioning, in this order

1. Install and wire the cabinet; check every drawer signal;
2. Set ports and board IDs; run one polling cycle, all green;
3. Test the card and the face three times each, both keys in;
4. Print one label, stick it on a sample bottle, scan it back;
5. Walk the operator through inbound, take, return and dispose.

Delivery & FAQ

Five questions the site always asks

On device projects, eight out of ten questions are not about code; they are about whether the room will actually use it. These five came up most during commissioning and training.

Q1Can we still receive reagents with the network down?
Yes. The terminal writes to a local cache first; inbound, take and return complete and labels print, then sync when the network returns. We would rather have two copies briefly out of step than have an operator standing at a cabinet waiting for a network.
Q2What if face recognition will not work?
Three fallbacks: the card works in every case; switch the algorithm library's instruction-set build (four dlls ship in the install folder, a rename is enough); check the camera index and the lighting — backlight is the most common cause of a face “failure”, not the algorithm.
Q3Can a confirmed stocktake be reversed?
No. Anything uncounted is written off as scrapped, stock zeroed, irreversibly. So training starts with Reset — return every confirmed row to pending, check row by row, and only then press the heaviest button.
Q4How many cabinets can one terminal drive?
Sub-cabinets connect through the network port, and board IDs can be chained in the config. Size the polling cycle by cabinet count: cabinets × 10 seconds recommended, never below cabinets × 5; more cabinets means a larger value, or the port jams and position signals are lost.
Q5How does this terminal relate to a reagent management platform?
The terminal is the hand, the platform is the ledger. The terminal gets the action right on the spot — person, bottle, weight, label; the platform owns the organisation, profiles, reporting and multi-site roll-up. They meet through an interface, and the terminal can also run standalone against a local service. Our reagent supply-chain platform case covers the ledger side.

MORE CASES

More Related Cases

Laboratory equipment · Smart reagent terminal
Smart Factory IoTReagent management, terminal system

Laboratory equipment · Smart reagent terminal

A 15.1-inch touchscreen terminal that folds lab reagent work into 13 modules: log in by card or face...

View Details →
Cloud-factory mobile app for a precision-electronics plant
Smart Factory IoTIntelligent manufacturing, precision electronics

Cloud-factory mobile app for a precision-electronics plant

A smart-factory mobile app (Android / iOS plus a web management backend) for a precision-electronics...

View Details →
Clinical laboratory · reagent supply-chain management platform
Smart Factory IoTIntelligent laboratory, reagent management platform

Clinical laboratory · reagent supply-chain management platform

A reagent supply-chain management system for a hospital clinical laboratory, extended from the deliv...

View Details →

View All Cases →

Planning a similar production line or enterprise system?

Start with our pricing logic, then let's talk requirements — cost structure, technology comparison and acceptance criteria, all laid out in the open.