plc_register_external
Registers an existing same-controller global as VAR_EXTERNAL in a POU, preserving source and rejecting local name/type conflicts or duplicate aliases. Repairs missing declarations from validation.
Instructions
Register an existing same-controller global as VAR_EXTERNAL in one POU. Preserve source, reject local name/type conflicts and avoid duplicate aliases. Useful for repairing missing declarations reported by plc_validate.
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": {
"transaction_id": "<transaction_id>",
"pou_id": "<pou_id>",
"global_variable_id": "<global_variable_id>",
"expected_revision": "<expected_revision>"
},
"name": "plc_register_external"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pou_id | Yes | ||
| transaction_id | Yes | ||
| expected_revision | Yes | Project revision read before staging this change. | |
| global_variable_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||