Sign in to follow this  
Followers 0
gleblanc

Documentation in GX Developer

6 posts in this topic

Does anybody out there actually document their PLC programs, or are device comments usually all that gets done? I like to have some explanations of what I'm trying to do in English, associated with each rung or group of rungs, so that when I go back and look at it in 3 years, I can figure out what on earth is supposed to be happening. Unfortunately, GX Developer only seems to allow 64 characters per rung, regardless of whether they are separate or "Embeddec". I've read about GX Converter, but I'm not entirely sure that it would let me maintain documentation in Word or some other (more?) suitable format. Tips? Greg

Share this post


Link to post
Share on other sites
Hello, Yes I do actually document all of my programs as much as possible. One thing I have done with line statements is when you run out of your alloted 64 characters, add another statement underneath the first statement. Just be sure You are in insert mode and not overwrite mode. As far as I know you can add as many as you want. Hope this helps, plcdp

Share this post


Link to post
Share on other sites
I try to do as much documentation as possible. I've worked in too many projects that didn't have documentation. That being said, the most important documentation is device comments for two reasons. First, if you have good device comments, then it's fairly easy to puzzle out what logic is doing. They show up wherever the device is used, which means even rungs without statements can be figured out. This reason is universal to all PLCs I've ever worked in. Device comments (descriptions, names, etc.) are fairly easy to add as you program, and make life easier for everyone. The second reason is more Mitsubishi specific, though other PLCs have similar options. Device comments are best because they can be downloaded to the PLC for use years down the road after the original program file is lost. And unlike statements and notes, you don't have to select "embedded" on each and every entry, and the option is available to FX PLCs. Also they can be up/downloaded separately from the program. That being said, there is always cause for good statements as well. I use them for section headings and to describe what's happening in more esoteric parts of the code (like indexed addressing, weird math, or fancy bit-wise algorithms). And as you have found out, they are a pain to enter into GX Dev. Especially since the text entry popup doesn't limit you to 64 characters. Many times, I've typed a nice long statement, only to have it be rejected on length. Then I have to chop bits off the end until I get it the right length. Here are a couple tips. If you haven't already figured it out, you can have multiple statement lines per rung. I regularly end up with four or five. I usually write the statement out in one line, then when I get the inevitable length error, I cut the extra and paste in into another line, repeating till everything fits. You could probably do it that more efficiently in Excel, using a Len() function to tell you how long your string is, but since there's no way that I know to import them into GX Dev, it never seemed worth it. Another trick I use is to put in a line of asterisks (*) before and after a section heading to make it stand out as I scroll through the ladder. Sometimes I include blank lines as well to make the heading bigger. I've often seen this trick used at the beginning of a program to create a sort of program header, with program name, description, version, date, etc. Finally, I don't know how comfortable you are using the instruction list (IL) programming view, but it can make it easier to cut and paste statements. In ladder, they're tied to the rung, but in IL, they're independent, making it easier to move them around. I do most of my work in ladder (using keyboard shortcuts!), switching to IL for cutting and pasting. There are also notes, but I almost never use them. The usually make things look cluttered and don't really help much if you've got good device comments and statements. I guess I should mention aliases too, but I use them even less. They can be useful for programming if you don't want to use the device address. But I've never figured out a good method for naming devices in 8 characters that makes them memorable, and I always end up forgetting my syntax of the day. I tend to remember my device addressing more easily, and I always know the syntax, since it's fixed!

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites
I always forget about that "feature". Quite annoying. Still, if the comments are good, the first half is better than nothing if you don't have the luxury of a documented program.

Share this post


Link to post
Share on other sites
I document all my programs, with statements and comments. I don't use notes. And GX Converter won't give you anything for documentation. It's more for import and export of a program for an external utility, at least that's what I've been told. And plcdp, did you look at the Replace Statement/Note Type option in the Find/Replace menu? Can change batches at once. Or the Documentation window in the Edit menu, which shows a complete list of all statements in the program and has a field to check or uncheck for embedded.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0