API reference

MockSOLO.MockSOLO — Module

Mock of a Sutter SOLO-50 single-axis micromanipulator served on a virtual serial port. See MockSOLO.start.

source

Lifecycle

MockSOLO.start — Function
MockSOLO.start(; timescale = 1.0) -> MockSOLO50

Open a pty, serve the SOLO-50 serial protocol on it and return the handle. Point host software at portname(dev). timescale speeds moves up (Inf = instant).

source
MockSOLO.stop — Function
stop(m)

Close the port and end the server. Returns promptly even mid-move; calling it again is a no-op. Rethrows if a server task failed.

source
Base.wait — Method

Block until the server is stopped (or its reader fails). Rethrows if a server task failed.

source
MockSOLO.MockSOLO50 — Type

Handle to a running mock SOLO-50. Create with MockSOLO.start; point host software at portname(m).

source
MockSOLO.portname — Function
portname(dev) -> String

Path of the virtual serial port, e.g. "/dev/ttys004". Give this to the host software. Readable after stop.

source
MockSOLO.open_port — Function
open_port(path) -> IO

Open the host side of the pty at path as a non-blocking stream. Use this to talk to the mock from the same Julia process: blocking I/O (open, IOStream, ccall reads) starves the mock's tasks and hangs.

source

Inspection

MockSOLO.position_usteps — Function
position_usteps(dev) -> UInt32

Current position in µsteps (0.09375 µm each), interpolated live while a move runs.

source
MockSOLO.screen — Function
screen(dev) -> (absolute_um, relative_um, color)

What the controller's screen shows: absolute and relative position in whole µm and the color, which is :red during a move (running or paused), otherwise :blue in relative mode or :green.

source
MockSOLO.traffic — Function
traffic(dev) -> Vector{@NamedTuple{t::Float64, dir::Symbol, bytes::Vector{UInt8}}}

Copy of the traffic log. t is seconds since start and dir is :in (host → mock) or :out (mock → host). There is one entry per read chunk and one per reply. Readable after stop.

source

Front panel

MockSOLO.press_home! — Function
press_home!(dev)

Press HOME. When idle, start moving to the stored home position. During a HOME move, toggle pause/resume. Ignored during any other move.

source
MockSOLO.press_work! — Function
press_work!(dev)

Press WORK. When idle, start moving to the stored work position. During a WORK move, toggle pause/resume. Ignored during any other move.

source
MockSOLO.pulse! — Function
pulse!(dev)

Press PULSE: move +30 µsteps (2.8125 µm), clamped to the end of travel. Ignored during a move.

source
MockSOLO.press_relative! — Function
press_relative!(dev)

Press RELATIVE: toggle the screen between absolute (green) and relative (blue) mode. Display only; serial coordinates stay absolute. Ignored during a move.

source
MockSOLO.hold_relative! — Function
hold_relative!(dev)

Hold RELATIVE: zero the relative display at the current position. Ignored during a move.

source
MockSOLO.press_speed! — Function
press_speed!(dev)

Press SPEED: cycle the stored knob speed 0 → 1 → 2 → 3 → 0. Stored only; it does not change turn_knob!. Ignored during a move.

source
MockSOLO.turn_knob! — Function
turn_knob!(dev, Δum)

Turn the knob: jump instantly by Δum µm (rounded to µsteps, clamped to 0–50,000 µm). Ignored during a move.

source