MOULDLKnowledge BaseElectrical Knowledge Base3D Model DownloadsMembership
中文版Model Store »
Knowledge Base › Electrical Knowledge Base › How do you write comments and notes in Mitsubishi GX Works?
HomeModels
Table of contents

On this page

PLC & Programming (100 articles)

Quick Reference

  • PLC & Programming
  • Electrical & Electronic Basics (monthly)(每月更新中)
  • Electrical Control & Drawings (monthly)(每月更新中)
  • Drives & Actuators (monthly)(每月更新中)
  • Sensors & Detection (monthly)(每月更新中)
  • Industrial Communication & Networks (monthly)(每月更新中)
  • HMI & Host Systems (monthly)(每月更新中)
  • Industrial Robots & Motion Control (monthly)(每月更新中)
  • Mechatronic System Integration (monthly)(每月更新中)
  • Fault Diagnosis & Standards (monthly)(每月更新中)

How do you write comments and notes in Mitsubishi GX Works?

Comments and notes decide whether a program can be understood by yourself later and by anyone else. In GX Works there is more than one place to write them, with separate entries for program blocks, instruction lines and devices, and only the right mix keeps the program readable without affecting how it runs.

What levels of comment there are

There are usually four: block (or program file) level titles and notes, which summarise what a section of program does; instruction or line level comments, attached beside a particular line; device level comments, bound to a given X, Y, M or D address to say what it is for; and network level comments, one for each network in a structured program. Higher levels are more general and lower levels more specific, and only together do they give a clear but not long-winded picture.

Writing device comments

A device comment is bound to an address, so writing it once makes it appear everywhere in the program and gives the best return for the effort. Label an X input "start button" or "left limit", an M relay "manual/auto selector", and a D register with its units and range, and anyone understands it at a glance. Prefer a structure of "object plus function", avoid empty names such as "No. 1" or "spare", and remember that changing the comment for an address updates every place it is used.

Instruction line and network comments

An instruction line comment sits after a particular statement and is good for saying why a line is written that way, for example the reason for a delay at some point; a network comment is for a structured project and says which step of the logic that network performs. The difference is that a line comment addresses "this statement" and a network comment addresses "this passage". Too many comments crowd the display and an over-long one is hard to read, so keep each to the shortest length that makes the point.

Display and printing settings

The editor lets you choose whether each kind of comment is shown: turn them all on while debugging for easy reading, and switch off what you do not need when editing so there is less visual clutter. When printing a program you can also choose whether comments are included, and for handover or archiving they normally should be. The display switches are independent of the comment content, so hiding a comment does not delete it — do not assume the comment is lost.

Import, export and multiple languages

Comments are saved with the project, and can also be imported or exported on their own as text files, which makes them easy to maintain centrally or hand to different people for translation. Note that when program or comments go to an older PLC model, or through a particular format conversion, comments may be unsupported or length-limited, showing up truncated or garbled; in that case confirm the comment is complete inside the software before deciding whether to write it with the program.

Comment types, where they go and what they are for at a glance

Comment typeWhere it goesMain purposeWhat to watch
Program block noteProgram file/block propertiesSummarise the function of a whole sectionConcise and easy to search
Device commentBound to an X/Y/M/D addressState what a point is forName with object and function
Instruction line commentBeside a particular statementExplain why the line is written that wayShould not be over-long
Network commentA network in a structured projectDescribe that step of logicSplit networks by function
Title lineTop of the programName the program and versionUpdate with each version
Change recordProgram or project propertiesRecord what changed and whenEvery change must leave a trace
Parameter notePLC parameter pageExplain the basis for parameter valuesKeep in step with the program
Exported comment fileA separate text fileCentral maintenance and translationWatch truncation and encoding
Printing with commentsPrint settingsHandover and archivingConfirm the comments are complete

Notes

Comments take no part in program execution, so more or fewer of them makes no difference to how the PLC runs, yet they decide how maintainable the program is. When a project is handed over, a commented program saves a great deal of time spent re-deriving the logic; a bare program usually forces a line-by-line rework instead. It is worth writing the comment conventions into the project rules, such as a consistent device-name prefix and a block title format.

References

The conventions for identifiers, variables and comments in PLC programming languages follow GB/T 15969.3 (identical to IEC 61131-3); the graphical and text symbols used on the program drawings follow the GB/T 4728 series, Graphic symbols for electrical diagrams; the electrical connection, protection and earthing of the equipment follow GB 5226.1 and the equivalent international standard IEC 60204-1. Character length limits and supported ranges for comments are as stated in the manufacturer's manual.

Points to watch

⚠️ Three common traps:
(1) Writing device comments in the program without a backup, then losing them when the program is read back or converted, wasting all the work;
(2) Filling comments with empty content like "No. 1" or "spare", so two months later even you cannot follow them;
(3) Importing or exporting comments without checking encoding and length limits, producing garbled or truncated text that then gets mistaken for a program fault.

Before writing a program, confirm the comments are accurate and carry no wrong information; before writing to an older PLC model, check whether the comments are supported so the program itself is not affected. When the program logic changes, update the related comments at the same time so that comments and program never disagree and mislead the reader.

Related reading

Related 3D models: Ready to build it? Download free 3D models & CAD drawings at MOULDL »
MOULDL · Electrical Knowledge Base · free self-study reference for electrical & automation engineers, 3D CAD models at MOULDL