Skip to main content
Version: 3.0.0

Run modes

Every run names a run mode. There is no default: orca run and orca submission submit need --run-mode, and the REST body needs run_mode.

The three run modes​

ModeWhat runs each deviceNeeds an orca-clientWaits for step times
CHECK_RUNIts simulator, on an orca-client that runs inside OrcaNoNever
SIMIts simulator, on the device's orca-clientYesYes, sped up
LIVEThe device as it is set: the real instrument, or its simulatorYesReal devices take real time

In Python the names are in orca.sdk.runtime:

from orca.sdk.runtime import WorkflowRunMode

The old names PURE_SIM and DEVICE_SIM are refused.

The check run​

A check run answers one question: does this workflow build and run to the end on this lab?

  • It works with only Orca installed. No orca-client and no lab PC.
  • It never waits. A two-hour incubation takes no time.
  • It works on a copy of the plate record, in its own store. Nothing is written back, so a check run never changes what Orca believes is on the deck.
  • orca labware check-run <execution_id> shows where the check run left each labware and its volumes. The newest 50 check-run stores are kept in <package>/.orca/check_runs/.
  • A check run starts only while no other run is running.
orca run my_first_workflow --run-mode CHECK_RUN --wait

SIM and LIVE​

Both send every device command through an orca-client. When a SIM or LIVE run is submitted, Orca brings up every device and every transporter in the lab first. If a device does not come up, or its orca-client is not connected, the run is refused with devices_not_ready, which names each device and the reason. A pool needs one of its devices up.

In SIM, every device runs its simulator, whatever its own setting is.

In LIVE, each device runs as its own setting, described next.

Only one run mode is active at a time. A run in a different mode from a run that is still going is refused with other_run_mode_active.

Sim or live, per device​

Each device has its own setting: sim or live. A new device starts as sim.

orca device mode shaker LIVE
orca device mode shaker SIM
  • The command prints a warning and asks first. --confirm skips the question.
  • It is refused during a run (mode_switch_during_run).
  • A device with no real driver in its setup cannot be set to live (device_has_no_real_driver).
  • A switch marks the labware standing on the device as stale, because Orca cannot know what the other world left there. See State.
  • The setting is stored in the daemon's database, so it survives a restart.

A device that must never drive hardware has "always_sim": true in its setup file.

This is how you bring a lab up one instrument at a time: run LIVE with the arm live and everything else still sim, then switch devices over as each is ready.

What a simulator accepts​

A device with a real driver is simulated by a simulator built for that driver. A simulated Hamilton STAR is a STAR simulator. It implements the same interfaces as the real driver, so a check run, SIM and LIVE accept and refuse the same interface commands. The vendor commands a real driver forwards to the instrument, such as a STAR's firmware commands, are not simulated: in sim they are accepted and then fail with UnsupportedCommandError. A device on a vendor simulator, such as an OT-2 on the Opentrons robot-server simulator, is the exception: it runs the real driver, so its vendor commands run in sim too.

A device with no real driver gets the generic simulator for its kind. It stands in for no particular machine, so it can accept more than your machine will. The generic liquid handler accepts run_protocol and park_gantry, and liquid_probe and home too when it does not model its deck. Name the real driver as soon as you know the hardware, so sim refuses what that machine refuses.

orca device capabilities <name> lists what a device accepts.

A simulated liquid handler moves nothing. It remembers where it last sent each channel and the gripper, and answers a read with that. Before anything is remembered, a read, a relative jog, or a move_channel_to that leaves out an axis is refused. Send an absolute move with x, y and z first.

Simulated speed​

A simulated command waits for the time the real command would take, divided by the run's speed-up. Each command has its own estimate. A plate pick is 3 seconds and a place is 3 seconds. A shake waits its duration.

Speed-upMeaning
1Real time
10Ten times faster
100A hundred times faster. The daemon's default for a SIM run

The range is 0.1 to 1000.

Set it per run:

orca run my_first_workflow --run-mode SIM --sim-speedup 10

In REST the field is sim_speedup on POST /api/executions.

Change it while the run is going:

orca execution sim-speedup <execution_id> 50

The change applies from the next device command. The command in progress finishes at the old speed. The run emits EXECUTION.<id>.SIM_SPEEDUP_CHANGED.

Set the daemon's default with the ORCA_SIM_SPEEDUP environment variable before orca start. Unset means 100. off means simulated commands do not wait at all.

A check run never waits and a LIVE run is paced by its hardware, so both refuse a speed-up with sim_speedup_not_applicable.

In simulation, connect, initialize, disconnect and commands that move nothing do not wait.

Run records carry sim_speedup, simulated and check_run, so a reader can tell how a run was paced.

Which mode an operator command goes in​

A command a person sends, such as orca device send or orca device pick-plate, takes no mode flag.

  • While a run is active, the command goes in that run's mode.
  • With no run active, the command goes in the device's own sim or live setting.

A simulated device that no run is pacing waits at the daemon's default speed-up.

Pitfalls​

  • A SIM run still needs an orca-client. Only a check run works with nothing else running.
  • A new device is sim. A LIVE run on a lab where nobody ran orca device mode <name> LIVE moves no hardware.
  • A check run does not update the deck. Plates it "moved" are where they were. Use orca labware check-run to see its result.
  • A speed-up of 0.1 is slower than real time, not faster. 10 is ten times faster.

See also​