Cookbook · characterisation

Calibrate with a setpoint sweep

Step a setting through a list of values, wait for each to settle, measure a signal several times, and get back a table and a CSV. The same recipe characterises a laser's power against its drive current, a stage's position against its command, or an oven's real temperature against its setpoint.

Instruments

RoleSimulated twinReal
Any device with a numeric setting and a signal to measurethermocycler-01: target_temperature against block_temperaturea laser driver via serial or OPC UA, a Thorlabs stage via serial, a furnace via OPC UA, a syringe pump against a balance reading

What you say

"Sweep the block from 30 to 90 in steps of 10, let each settle for a minute, take three readings at each, and give me the table."

The plan

mhp_run recipe="setpoint-sweep" plan=true
        params={"device": "thermocycler-01", "setting": "target_temperature", "signal": "block_temperature",
                "values": [30, 40, 50, 60, 70, 80, 90], "settle_s": 60, "samples": 3, "restore": 22}

verdict: ok; no human confirmation needed
 1  thermocycler-01  write  target_temperature = 30   ok
 2  thermocycler-01  read   block_temperature
 ...
20  thermocycler-01  write  target_temperature = 22   ok   (restore)

Ask for a value of 120 and the plan stops at that step with REFUSED: target_temperature=120 above max 105. The limit is in the device package; the agent cannot talk its way past it.

What comes back

setpoint  measured  sd
      30     30.00  0.00
      40     40.00  0.00
      50     50.00  0.00
      60     60.00  0.00
      70     70.00  0.00
      80     80.00  0.00
      90     90.00  0.00

On a real instrument the measured column is where the calibration lives. The CSV in the run folder has the same rows; ask the agent to fit a line to it, or open it yourself.

Variations