Skip to content

Claude Sonnet 5.5 (effort default (no --effort flag) · thinking on) on Write one conveyor control program in five IEC 61131-3 languages and pass a simulated plant test

AClaude Sonnet 5.5default · thinking on · Claude Code 2.1.299 (headless -p) · cloud · 2026-10-21 · by @bobsiopener

Trust 80%Fully autonomoussuccess · first try
Estimated cost
$0.36
Wall time
2m
Human step-ins
0
Outcome
Pass

Compare with other models on this task →

Summary

Exact prompt

# Write one conveyor control program in five IEC 61131-3 languages `spec.json` gives the I/O names and addresses, the batch size, the jam time and how each input is wired. Write the same control program five times, once per language, each as a PROGRAM named `conveyor` that declares the I/O with exactly the addresses in `spec.json`: - Ladder Diagram (LD): `out/conveyor_ld.xml` - Function Block Diagram (FBD): `out/conveyor_fbd.xml` - Structured Text (ST): `out/conveyor.st` - Instruction List (IL): `out/conveyor.il` - Sequential Function Chart (SFC, textual form): `out/conveyor_sfc.st` LD and FBD are PLCopen TC6 XML 2.01 projects (`<project xmlns="http://www.plcopen.org/xml/tc6_0201">`) whose program body is `<LD>` or `<FBD>` respectively; ST, IL and SFC are plain IEC text files. Standard function blocks (R_TRIG, TON, CTU, ...) are allowed in every language. A CONFIGURATION is optional; without one, the bench runs `conveyor` in a 10 ms cyclic task. ## Behaviour - The motor runs once START is pressed and keeps running (latched) until something stops it. - It stops when STOP is pressed, when the emergency-stop chain opens, on a fault, or when the batch is done. Check the wiring in `spec.json`: STOP and the emergency-stop chain are normally closed. - Count a box each time the exit photo-eye goes from clear to blocked while the motor is running. When the count reaches the batch size, stop the motor and light the batch-done lamp. The count carries over when the belt is stopped and restarted; only RESET clears it (and the lamp). - Jam: if the photo-eye stays blocked for the jam time or longer while the motor runs, latch a fault. An open emergency-stop chain also latches the fault. The fault lamp shows the fault; the batch-done lamp is off while there is a fault. - RESET clears a fault only when the emergency-stop chain is healthy and the photo-eye is clear. While a fault or the batch-done state is active, START does nothing. ## Compiler notes (matiec) - Declare the located I/O in its own `VAR ... END_VAR` block, separate from internal variables. - In IL, a formal `CAL` puts each parameter on its own line: `CAL tmr(` / `IN := x,` / `PT := t` / `)`. `R` and `S` are IL operators, so set an instance's `R` or `S` input with `LD ...` / `ST inst.R` before `CAL inst`. Pass TIME values to a `CAL` through a variable, not as a literal. - In SFC, an action named after a BOOL variable (`STEP Run: MOTOR(N); END_STEP`) drives that variable only while the step is active. ## Test bench `python3 bin/plcsim.py <st|il|sfc|ld|fbd> <file> [scenario.txt]` compiles your file with the open-source matiec compiler (LD/FBD are first converted to ST with the Beremiz PLCopen generator), runs it scan by scan and prints `tick MOTOR FAULT BATCH_DONE` at the scenario's sample ticks. `scenario-sample.txt` and `scenario-sample-expected.txt` are a worked example. Scoring runs each file on a different, hidden scenario of the same kind and compares the outputs at settled sample ticks (never within 100 ms of a change), so one-scan timing differences between languages don't matter. A file that is missing, doesn't compile, or isn't written in its language fails its check. ## How this run works - Work on your own: nobody will answer questions in this task, and writing to `ask/` counts against the run. - Write only under `out/`. Create `out/` if it is missing. Inputs are synthetic; don't fetch anything from the network. - Scoring is partial credit: each listed check is pass/fail, and the score is the share passed. Numbers are compared to within 0.005 unless the task says otherwise.

Implement the same conveyor logic (latched start, normally-closed stop and safety chain, box counting to a batch size that survives a stop and restart, a jam timer, and a reset that only works when it is safe) in Ladder Diagram, Function Block Diagram, Structured Text, Instruction List and Sequential Function Chart. Each file is compiled with the open-source matiec compiler (graphical languages via the Beremiz PLCopen generator) and run scan by scan against a hidden plant scenario; one check per language. Original benchmark task written for usecaserank.com (not based on a specific public post). Headless, offline run on a reproducible fixture. Each run's notes say how its cost was measured (estimates are marked).

Success criteria: ld fbd st il sfc

Setup notes: Batch 21 case w05-conveyor-five-plc-languages (offline, synthetic inputs, seed 85582966). Autonomous case: no stand-in user and no step-ins expected; any file the solver wrote to ask/ is counted as a measured intervention (0) and blocks a pass. Prompt = TASK.md verbatim. Hidden key kept outside the solver's work dir. Scored with the case's scorer (python3 score.py WORKDIR KEYDIR, absolute paths); pass = every check true and no ask/ files. Tools: Read/Write/Edit/Glob/Grep/Bash, web disabled. Single run, no retries. 1-min load average at scoring 0.15 (8 cores). Time-zone results depend on the system time-zone database: tzdata 2026c-0+deb13u1 (Python zoneinfo). Claude Code's own reported cost for claude-sonnet-5.5: $0.361436. Score: 5/5. Cost is an ESTIMATE: measured tokens x pricing.json list price (Claude Pro subscription, nothing billed); input_tokens include cache reads and writes. Single run.

Estimated cost List-price estimate; not actually billed.

Metrics

Estimated cost
$0.36
Wall time
2m
Human step-ins
0
Turns
20
Model usage
ModelInput tokOutput tokCost
AClaude Sonnet 5.5anthropic/claude-sonnet-5.5effort default (no --effort flag) · thinking on681,52016,434$0.36

Reproduce this run

  1. Use the use case prompt on the use case page.
  2. Same setup: Claude Sonnet 5.5 (anthropic/claude-sonnet-5.5, effort default (no --effort flag) · thinking on) via Claude Code 2.1.299 (headless -p), cloud.
  3. It counts as a success only if it meets every success criterion: ld fbd st il sfc
  4. Log model, tokens, wall time, human step-ins and the evidence log, then submit it as a reproduction. A different model? Submit a head-to-head rerun.

How runs are scored: Methodology.

Was this useful?

⇄ Rerun on another model

Automated checks

Trust 80% comes from these checks (how Trust % works).

Evidence log
[
 {
  "duration_api_ms": 118975,
  "stop_reason": "end_turn",
  "session_id": "[REDACTED]",
  "total_cost_usd": 0.36143569999999997,
  "usage": {
   "input_tokens": 40,
   "cache_creation_input_tokens": 33043,
   "cache_read_input_tokens": 648437,
   "output_tokens": 16434,
   "output_tokens_details": {
    "thinking_tokens": 4861
   },
   "server_tool_use": {
    "web_search_requests": 0,
    "web_fetch_requests": 0
   },
   "service_tier": "standard",
   "cache_creation": {
    "ephemeral_1h_input_tokens": 33043,
    "ephemeral_5m_input_tokens": 0
   },
   "inference_geo": "global",
   "iterations": [
    {
     "input_tokens": 2,
     "output_tokens": 568,
     "cache_read_input_tokens": 44636,
     "cache_creation_input_tokens": 946,
     "cache_creation": {
      "ephemeral_5m_input_tokens": 0,
      "ephemeral_1h_input_tokens": 946
     },
     "type": "message"
    }
   ],
   "speed": "standard",
   "fallback_credit": null
  },
  "modelUsage": {
   "claude-sonnet-5-5": {
    "inputTokens": 40,
    "outputTokens": 16434,
    "cacheReadInputTokens": 648437,
    "cacheCreationInputTokens": 33043,
    "webSearchRequests": 0,
    "costUSD": 0.36143569999999997,
    "contextWindow": 1000000,
    "maxOutputTokens": 128000,
    "thinkingTokens": 4861,
    "canonicalModel": "claude-sonnet-5-5",
    "provider": "firstParty",
    "costBasis": "list"
   }
  },
  "permission_denials": [],
  "terminal_reason": "completed",
  "fast_mode_state": "off",
  "fast_mode_disabled_reason": "sdk_opt_in_required",
  "subagent_stats": {
   "spawned": 0,
   "requested": {
    "background": 0,
    "foreground": 0,
    "unset": 0
   },
   "started_in_background": 0,
   "max_depth": 0,
   "spawned_by_subagents": 0,
   "completed": 0,
   "failed": 0,
   "killed": {
    "parent": 0,
    "user": 0,
    "system": 0
   },
   "refused": {
    "depth_limit": 0,
    "concurrency_limit": 0,
    "budget": 0
   },
   "by_type": {}
  },
  "safety_stops": 0,
  "is_error": false,
  "num_turns": 20,
  "subtype": "success",
  "api_error_status": null,
  "result": "All five files are in `out/`, and each one compiles and matches `scenario-sample-expected.txt` on the sample scenario. I only ran the sample, not any other scenarios.\n\n| Language | File |\n|---|---|\n| LD | `out/conveyor_ld.xml` |\n| FBD | `out/conveyor_fbd.xml` |\n| ST | `out/conveyor.st` |\n| IL | `out/conveyor.il` |\n| SFC | `out/conveyor_sfc.st` |\n\nAll five use the same logic and no CONFIGURATION, so the bench runs them in its default 10 ms task.\n\n- **Motor:** it is latched by START and drops on STOP, an open emergency-stop chain, a fault or batch-done. START is ignored while a fault or batch-done is active.\n- **Count:** the count only advances while the motor is running, and the batch size is 5.\n- **Jam:** a jam latches the fault after 1750 ms of a blocked eye. An open emergency-stop chain also latches it.\n- **RESET:** it clears the count unconditionally. It clears the fault only with the chain healthy and the eye clear.\n\nThe spec doesn't say whether RESET should clear the count while the emergency-stop chain is open. I let it clear the count regardless. The sample scenario passes either way.\n\nThe fault latch in LD and FBD is built from plain gates and coils rather than an `RS` block, because matiec rejected `RS` as a type name.\n\nThe two XML files were generated by a script at `/tmp/gen/gen.py`, which sits outside `out/`.",
  "ttft_ms": 1915,
  "type": "result",
  "duration_ms": 126142,
  "uuid": "[REDACTED]",
  "ttft_stream_ms": 1633,
  "time_to_request_ms": 265,
  "first_content_frame_ms": 1634,
  "queued_turn_count": 0,
  "result_index": 0
 }
]

Get new runs and ranking changes weekly