gx3_ladder_print
Renders PLC programs in GX Works3 print-text ladder layout for circuit explanation, with optional section, position, or device filtering and file output.
Instructions
Render a program in GX Works3 print-text layout. This is the output to show a user when explaining how a circuit is wired: quote it verbatim in a code block, never a JSON dump of the same rung. Output can be large; pass 'output' to write it to a file. To emit only the circuit under discussion, use 'list_sections' to discover section titles, then filter with 'section', 'pos_range' (A-B), or 'device'. For an SVG image export, use gx3_ladder_export_svg.
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": {
"program": "<program>",
"root": "<root>"
},
"name": "gx3_ladder_print"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | Yes | Extracted project folder. | |
| device | No | Render only rungs referencing this device (any role), plus their section title. | |
| output | No | Optional output file path (-o); parent dirs are created. | |
| program | Yes | Program/POU name or <hash>_LDDB.db. | |
| section | No | Render only sections whose title contains this text. | |
| pos_range | No | Render only rows whose step pos is within A-B (inclusive). | |
| list_sections | No | List section titles with pos range and rung count, then exit. |