Appearance
First Transfer
This example moves buffer from one tube to another using the official Opentrons simulator. Start in the OS checkout after installation.
Read the Program
The existing examples/transfer/transfer.culs contains:
text
let source = tube(capacity = 2000uL, load = [
content(kind = ContentKind.FORMULATION, type = ContentType.BUFFER, code = "BUFFER"):200uL
]);
let destination = tube(capacity = 2000uL);
let alias = source;
destination << [alias:50uL];
destination << [source:0.05mL];alias refers to the same source tube. The two transfers move 50 uL each. The deck file binds source to A1 and destination to A2 on the same tube rack, with a single-channel pipette and a tip rack.
Run Once
sh
export CULSMA_OS_STATION_ROOT="$PWD/run-artifacts/stations"
culsma-os run examples/transfer/transfer.culs \
--station-id manual-transfer \
--host-db run-artifacts/quickstart/os.sqlite3 \
--driver-config examples/transfer/deck.json \
--artifacts-dir run-artifacts/quickstartrun executes in the foreground and exits. It does not start or contact a resident host. In simulation, robot_settings.json not found. Loading defaults and Deck calibration not found are expected when local settings are absent. They do not by themselves indicate failure or establish physical calibration.
Check the Result
The terminal's materials section lists 100 µL used from the source. It does not list the destination's final volume. Read both tubes and the OS outcome from the saved JSON:
sh
python - <<'PYTHON'
import json
from pathlib import Path
root = Path('run-artifacts/quickstart')
result = json.loads((root / 'result.json').read_text())
run = json.loads((root / 'run.json').read_text())
print('OS status:', result['os']['status'])
for container in run['state']['artifacts']['material_state']['containers'].values():
print(container['metadata']['allocation_name'], container['volume_uL'], 'uL')
PYTHONExpected output:
text
OS status: completed
source 100.0 uL
destination 100.0 uLThe run has six completed plan steps, including two transfers. Each tube ends with 100 uL in the simulated material state. The program has no explicit return value; that does not prevent the OS from saving execution results.
For another isolated simulation, use a new station ID and output directory. Reusing the station intentionally preserves recorded consumable usage and resource ownership. See Results and Artifacts.