gx3_ladder_print
Render ladder logic from Mitsubishi MELSEC .gx3 projects as GX Works3 print-text, showing circuit wiring. Filter by section, position, or device to examine only relevant rungs.
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'.
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. |