Micronic RD235 Code Reader#
The Micronic RD235 Code Reader scans the side barcode of an 8x12 tube rack, acquires an image of the rack, and decodes the 96 tube DataMatrix codes locally. It does not require Micronic Code Reader or IO Monitor.
Property |
Value |
|---|---|
Model |
RD235 |
Rack-ID communication |
Serial trigger and response |
Serial settings |
9600 baud, 7 data bits, even parity, 1 stop bit |
Rack image |
TWAIN helper on Windows, SANE |
Rack layout |
8 rows by 12 columns |
Tube barcode |
Ten-digit DataMatrix |
Rack barcode |
Code 128 |
How it talks#
The side reader uses pylabrobot.io.Serial. A rack-ID scan clears pending input, sends
<t> followed by CRLF, reads through the response terminator, and returns the first sequence
of at least six digits. It returns NOREAD when the response contains no rack identifier.
Rack-image acquisition runs through PyLabRobot’s command-line transport. TwainScanner calls
an operator-installed TWAIN helper; SaneScanner calls scanimage. PyLabRobot then performs
grid fitting and DataMatrix decoding locally.
Physical setup#
Connect the rack scanner to the computer and install its operating-system driver.
Connect the side rack-ID reader and identify its serial port.
On Windows, install the local TWAIN helper and note its path and TWAIN source name. On Linux, install SANE and confirm that
scanimage --list-deviceslists the scanner.Install the serial and decoding dependencies:
pylabrobot[serial],pillow,opencv-python-headless,numpy, andzxing-cpp.Place an 8x12 Micronic tube rack in the scanner with the orientation expected by the instrument.
Connect#
Choose the scanner implementation for the host. This example uses a Windows TWAIN helper. On
Linux, replace it with SaneScanner(sane_device="<device from scanimage --list-devices>").
setup() resolves the scanner executable, creates the image directory, and opens the side
reader’s serial port.
from pylabrobot.micronic import MicronicRD235, TwainScanner
reader = MicronicRD235(
scanner=TwainScanner(
twain_scanner_path=r"C:\Tools\twain_scan.exe",
twain_source="AVA6PlusG",
),
serial_port="COM4",
image_dir=r"C:\ProgramData\PyLabRobot\micronic-images",
)
await reader.setup()
Read the rack ID#
scan_rack_id() triggers only the side barcode reader. It returns the decoded identifier or
NOREAD.
rack_id = await reader.scan_rack_id(timeout=5.0)
print(rack_id)
Represent the rack#
scan_rack() accepts a TubeRack with exactly 8 rows and 12 columns. Define the rack layout
before scanning it.
from pylabrobot.resources import ResourceHolder, TubeRack, create_ordered_items_2d
rack = TubeRack(
name="micronic_96_tube_rack",
size_x=85.0,
size_y=127.0,
size_z=20.0,
ordered_items=create_ordered_items_2d(
ResourceHolder,
num_items_x=12,
num_items_y=8,
dx=0,
dy=0,
dz=0,
item_dx=9.0,
item_dy=9.0,
size_x=9.0,
size_y=9.0,
size_z=20.0,
),
)
Scan the rack#
scan_rack() reads the side rack barcode, acquires the rack image, and returns one entry for
each tube position. A position reports NOREAD when no tube barcode was decoded.
result = await reader.scan_rack(rack=rack, timeout=90.0)
print(result.rack_id)
print(len([entry for entry in result.entries if entry.status == "OK"]))
Disconnect#
stop() closes the side reader’s serial connection.
await reader.stop()