generate_sequence_ldr
Generates a new .ldr file for dependent ordered steps from a SequenceSpec and validates before writing, so invalid sequences are not saved.
Instructions
Generate a new .ldr for dependent ordered steps defined by a SequenceSpec.
Never use this for one control, independent controls or caller-authored IR: use
generate_control_ldr, generate_system_ldr or generate_ldr respectively. validate_ladder
checks existing IR and cannot derive steps. Uses native T timers or FUN87 register state for
pause/resume, never adds X/Y, and requires an explicit clock for pulse counting. Validation
failure writes nothing; no GUI or PLC verification is implied.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"output_name": "<output_name>",
"spec": "<spec>",
"io_contract": "<io_contract>"
},
"name": "generate_sequence_ldr"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | Yes | Ordered step requirement, start signal, timing and output definitions. | |
| acceptance | No | Optional executable scan cases checked before and after encoding. | |
| io_contract | Yes | Complete user-authorized physical X inputs and Y outputs. | |
| output_name | Yes | New plain .ldr filename in the artifact directory; never overwrites. | |
| strict_writers | No | When true, reject conflicting or unsafe multiple device writers. | |
| target_profile | No | Optional sampled CPU/header profile; omit to use the default profile. | |
| require_acceptance | No | When true, reject generation unless acceptance cases are supplied. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Validation error code, message and written=false. | |
| artifact | No | Artifact metadata on success; absent when validation fails before writing. | |
| warnings | No | Generation or verification warnings; empty when none were reported. | |
| diagnosis | No | LDR failure diagnosis, when available. | |
| response_mode | Yes | Compact or full response. |