Export MELSEC device comments and labels to Excel
Device comments and labels are the documentation of a Mitsubishi PLC program: what X12 is wired
to, what M105 means, which label sits on D200. HMI screens, SCADA tag lists, I/O checklists
and translations all start from them. Upload a GX Works2, GX Works3 or GX Developer project and
get them as tables, without exporting anything in GX Works first.
The workbook
One Excel file with a sheet for each part of the project:
| Sheet | Columns |
|---|---|
| Summary | file, CPU type, series, software, parameters and counts |
| Programs | name, kind, language, program file or task, steps, size, comment |
| Device comments | device, comment, and the comment set it comes from |
| Labels | scope, class, label, data type, device, address, initial value, comment, remark |
| Instruction list | program, step, instruction, operands, statement, note, comments of the devices (ST programs line by line; for GX Works3 the elements of each ladder block) |
| Used devices | every device and label in the programs with its comment and how often it is read as a contact, written as a coil or used otherwise |
| Cross reference | device or label, comment, program, step or line, kind of use, instruction |
| Program setting | program files and tasks with their execution type and POU order |
The device comments, labels and cross reference also come as separate CSV files (UTF-8, readable by Excel, LibreOffice and scripts).
Where the comments come from
- GX Works2: the common device comment of the project, and the comments of global and local labels.
- GX Works3: the device comments, including the comments GX Works3 adds for special relays and registers, and the labels of every label list.
- GX Developer: the common comment file, program comment files when the project has them, and the aliases.
Device numbers are written the way the software shows them: hexadecimal for X, Y, B and
W on Q and L CPUs, octal X and Y on FX and FX5, module access as U3\G10, and timer,
counter and step relay numbers in decimal.
Instruction lists for re-import
Each ladder program of a GX Works2 or GX Developer project also comes as a CSV file in the layout of the GX Works2 instruction list export: step number, statement, instruction, device, PI statement and note, one row per operand. GX Works2 can read such a file back into a ladder program, and in a text or diff tool it is an easy way to compare instruction lists.
Everything else
The download also holds the ladder printout as PDF and the offline HTML viewer, where every table has a filter box and the search finds a device in programs, comments and labels at once.
More about what this tool reads and writes: Mitsubishi PLC Project Viewer (GX Works2, GX Works3, GX Developer).