Muscat app — Automatically finds our robots on the same network so you can connect and control them right away. PC · Mac · MobileGet the app
Muscat PK
Log in
Development

Program integration — program.panel

UI: save step settings

const saved = useRbFormData<Args>();
const [args, setArgs] =
  useState<Args>(() => ({ ...DEFAULTS, ...saved }));

useRbSave(() => ({
  args,
  summary: `${args.target} · ${args.width}mm`,
}));

Backend: run the step

ctx = PluginProgramContext(plugin_id="my-plugin")

@ctx.on_execute
async def handle(args: dict):
    n = await ctx.get_variable("RBP_my_count")
    await ctx.set_variable("RBP_my_count", n + 1)
    await ctx.check_stop()   # honor pause / stop
    await ctx.done()         # required — moves to the next step

asyncio.run(ctx.start())
WarningIf you don't call done(), the program stops at that step. Running programs in the preview (dev:ui) is coming soon — for now, check on the robot.