generate_pdw
Create a new PDW binary by replacing one or two X-to-Y template rungs with the same rung count, using supported X0/X1, Y0/Y1/Y2, and NO/NC contacts.
Instructions
Create a new PDW binary by replacing one or two X-to-Y template rungs.
Same rung count required. Only X0/X1, Y0/Y1/Y2 and NO/NC contacts supported.
No branches, functions, comments or PLC operations. Templates are workspace-scoped.
This generates a PDW binary; generate_component_comments produces only a separate .txt.
Keep private templates outside Git; configure --root to their private directory.
Return the actual binary artifact and warnings. Never overwrite.
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>",
"template_path": "<template_path>",
"rungs": "<rungs>",
"io_contract": "<io_contract>"
},
"name": "generate_pdw"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rungs | Yes | One or two replacement X-to-Y rungs matching the template count. | |
| acceptance | No | Optional executable scan cases checked against the replacement. | |
| io_contract | Yes | Complete user-authorized physical X inputs and Y outputs. | |
| output_name | Yes | New plain .pdw filename in the artifact directory; never overwrites. | |
| project_name | No | Project title; defaults to output filename stem. | |
| template_path | Yes | Existing FBs-60MC .pdw template path inside the workspace. |
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. |