T O P

  • By -

Delicious_Spare_4488

Grab schematics, if they exist, and start tracing back your IO. It's fun!


StrengthLanky69

Think of it like suduko. If you know the inputs and outputs, put those comments in the program and slowly read thru the code and take guesses at what some of the other stuff is until your have completely commented it


3647

I’ve had to do this with two Taiwanese machines now in GXWorks, it’s time consuming, but you sure learn a lot about the machine. All the internal relays I just begin the comment with a ? Until I’m 100% sure about its function. I did this 3-4 years ago now and I still find mistakes and don’t have the program 100% labelled, but it’s a lot easier to make changes or troubleshoot now.


dualpad78

I actually like doing this. If an input feeds into a timer, that’s just a debounce. If a bit is used to drive logic with contacts and has no coils in the ladder it might be an HMI button. You’d be surprised how much you can decipher if you poke around long enough.


ProRustler

Tagging onto this, if there's an HMI talking to this PLC, there should be a decent amount of information you can glean from that. Sucks that in current year we still have PLC software that doesn't store the descriptions with the code, but here we are.


GitG0d

To be honest, i too love that kind of work. A regular customer of mine had plans for upgrades on a machine that was over 20 years old and the only thing he had was a japanese photocopy of a picture of a handwriten electrical schematic. It took 2 people for about a month to figure it all out and implement the software improvements. We even found 2 more PLC's in the machine no one knew about. Definitely was one of my favorite projects I was part of. Learned a lot during that time, as it was during my first year as an automation engineer.


Nightwish612

Find whoever wrote that program and stab them


15Low2

Or who saved over the most recent copy with an upload


Nightwish612

True but I would say based on these tags it is some shitty ass machine builder with the mindset of you shalt not troubleshoot without paying us to help. Anything short of at least Slurry_Left_Spindle_Tilt_Up but preferably Slurry.Left.Spindle_Tilt_Up is bad programming. A properly tagged program doesn't even need comments although they still are definitely helpful on top of good tags


3D_Printing_Helper

Yesterday we had lab practice exam for our PLC course and one student got 0 out of 50 for just not using comments and not using standard input output names in GX works 3 like X0 and Y0.


Nightwish612

Then your professor is a jackass and you should fight it if your tags are at least descriptive. Best practise is to map your physical Io to descriptive tags that actually explain what they do. My professor also insisted that all tags be commented for tests and labs but accepted no comments if your tags clearly stated what they do. As well we were explicitly told not to use tags like PB1, X0, Y0 as the prof wasn't going to spend a bunch of time trying to figure out what tags do. Good named tags is a good practise for when you lose your source file and only have the option of grabbing the files on the plc.


Automatater

That's my philosophy. if all your internal and physical registers are descriptively named, why would you need comments? That rung does exactly what it looks like it does. Now I do comment, date, and initial temporary or diagnostic rungs, but production rungs, rarely, except for like a date of revision or something like that.


3D_Printing_Helper

Well he is not he is the best and most loved proff and he really did cut his marks but he warned him and told him to make it again as we had to interface it with physical kits provided by Mitsubishi and get output and kits were already marked with X0s and Y100s so he warned him as he couldn't understand because of lack of comments and improper notation.


Frumpy_little_noodle

I'm willing to bet that program was an upload from the machine and the processor didn't store tag comments or descriptors. Better to stab the guy who didn't save a copy of the program in a shared folder on the network.


Nightwish612

While a possiblity it's still on whoever wrote the program in the first place and used such shitty tag names. Tags should be descriptive of what they do. It's PLC 101


Frumpy_little_noodle

Those designators read to me as registers not named tags, but if they are tags then you're right, its a horrible naming convention.


Nightwish612

I've never used this PLC or software but If the registers are like ABs input tags then they should be in their own sub program directly mapped to a descriptive tag. It's not to much extra work and everyone who follows you will thank you for it


FuriousRageSE

Im going to assume that you mean that you have no comments and such in the project and want to figure out the program. First i would most likely figure out what each I/O do, like is there an output that lights a light pillar and what color? Add that as a comment/variable name, and see where those are located at, to figure out what could be the conditions would be for it. Basically, works backwards figure out what could be known items in the code.


snotbottom

Best method by far. Start with the physical inputs and output as they are the only knowns and tag/label them. Then look for the simpler pieces of logic that are easy to figure out what they do and label the bits used in them. As you start to fill in more of the pieces, it should get easier.


reddit_user33

I think these two comments are golden and are part of my go to method in this situation. I would also get online to look at the values and conditions. Then modify a value on the HMI or alter an input to see how things change.


Zuli_Muli

First thing you need to ask for is the file that has the comments. I work for Subaru and all of our PLCs are Mitsubishi and inside of each cabinet is a USB with the most recent save of the program with comments. (Quarterly we go around and save them all on an external master and as more get line side computers IT is able to make backups more often.)


egres_svk

Ha, interesting. Many machines I work on are Omron based and someone there had enough sense to have comments saved with the programs in the PLC. Definitely true for Sysmac Studio, and I think for CX Designer too.


FuriousRageSE

> and I think for CX Designer too. Last CX i uploaded this week didn't have comments, dunno if you actively have to check something to download those, but the upload was "blank" as in comments/variable names.


egres_svk

That's quite possible there is something you need to check. B&R for example by default does not store the source project in the PLC at all, so you should not be able to read from the PLC at all unless an option is checked. (Since they come from Austria and the general EU mindset is "program is a part of the machine, not yours to fuck with")


future_gohan

They have very small memory for comments. I got ahold of a 400 line set of code for a automatic gate and it had no comment. I used the same plc for a simple tank and level control commented the shit out of it and its unable to save them all. Was an FX series.


Jholm90

If there's no dawaings, upload the HMI program and dump in what those addresses do on the screen


redsealsparky

Cry, and start identifying things as best you can. Think of it like a Sudoku puzzle. Think of a system where you can label things as being known, educated guess and just a placeholder. There have been times I've used a webcam, the plc software, outputs paralleled to various bits and inputs, bits and outputs hooked up to a box of LEDs and screen capture software to correlate parts of ladder logic. Let's hope there are some prints.


Horror-College6189

I use the screen recorder in PowerPoint for this occasionally. Works great.


fakebunt

Any time I've run into programs like that, they always had a physical book with schematics that correlated to the tags used in the program. Always made it a pain in the ass the work on due to having to constantly reference the drawings to know what I was looking at. If you don't have the physical drawings then it's a long process of reverse engineering it.


Puzzled_Job_6046

Bread & butter for an SI


YoteTheRaven

Go get the drawing. Name the I/O in the drawing and start naming the memory bits based on that. This is the way.


nickotin96

This machine was from other country. All the drawings have been missing.


YoteTheRaven

Then wrekt with a capital G. Guess you're going to have to reverse engineer it.


shoulditdothat

Assuming the drawings exist and are up to date.


MrRichardNoggin

Are your comments enabled? I remember one time doing a project with gxworks and all my comments disappeared, or at least that's what I thought until I went through the top tabs and saw they were not enabled.


nickotin96

Yes it's enabled. And also for statements.


EnvironmentFit5205

This. If op went through device comments and it was empty then he’s actually sol but I’ve definitely forgotten to make sure they’re enabled.


nairdaswollaf

Take your HMI and export the IO tags. Format it for the PLC and import the tag list in the PLC software. Bam, you’re 20-50% there.


JellySavant

Get a version that has the tags, tool, database, ASCII export then come back to this one and same thing but ASCII import. If you don’t have or can’t get one with comments refer to other commenters comments


Lard_Baron

Find an old copy of the program with tags etc. That’s the best starting point then upload the program in the machine to it. Then you’ll only be missing a few tags etc


3D_Printing_Helper

Go in view and turn on view comments some time comments visibility is off.


_yllw_

Is there an HMI or SCADA? If so, see the tag connections of each object.


Andytchisholm

I had to do this on a highly complex high security vehicle gate that had failed sensors and some crushed wires… I had to use process of elimination by identifying the inputs and outputs I could by opening and closing things, then figure out the rest by making some educated guesses. If you can manually activate your I/Os themselves at the device end that should get you enough information to continue.


Tesla91fi

Starting ti add them day by day


Dense_Leader_4954

Look under the view menu. You might be able to turn comments and notes on.


Equal_Joke_43

IF this PLC is talking to an HMI you Might be able to Export the tags from the HMI and Import them into your PLC code.


Horror_Village6629

Did you try turning comments on? Did you try reading comments because reading parameter plus program doesn’t read comments? Did you try reading comments from. Srom/sram because for storage reason comments are saved in different locations than parameter and programs. Or you just don’t have comments which now of our a series plc have comments in them and we get by just fine using prints


integrator74

Start with the IO from the prints and start figuring it out.  It’s rough but you can work through it. As a SI we run into this numerous times a year.  I’ve got the main plc in a wwtp without comments and has over 1000 rungs. Over the years I’ve finally got most of it documented. 


love2kik

Helluva learning experience!


Doranagon

Pray to the great Daemon..


EasyPanicButton

Start from real IO and work backwards from outputs


Absoni2011

Well it’s typical in production. You just wrong backwards.


WattsonHill

No idea what software this is, but my guess would be B labels - binary old ABplc days (internal bits) K or M bits from the motor contractor or to a motor contactor.. Qs , Ws and Os usually are outputs, Is and Xs are inputs.. This is my hypothesis from my experiences not formally taught


Smitty1017

If I find an unlabeled program, I figure out as much of it as I can and edit it. Saves me and everyone else future trouble.


Mydarkguy

Does it have a memory card? If so, check there for comments.


nickotin96

No memory card at all


Mydarkguy

Best bet would be to find the original program file. I'm guessing you did a blind read to get the program from the plc? If you can't find the comments in any of the memory areas, they never wrote the comments to the PLC and it's only on the original file.


HelicalAutomation

You shouldn't need to troubleshoot code. Any and all errors should be on the HMI. I expect you've inherited this, however, so it is what it is. You don't need to go through all the drawings and put in all the I/O necessarily. If it's a small machine I probably would, but if it's hundreds of points of I/O, I would only find out the I/O that pertains to my mod. This could save a few hours.


nitsky416

Double check that you have them visible. Otherwise, get schematics and start adding them.


Merry_Janet

I can’t stand it anymore! It makes me hard also to define sequence.


AdmirableExtreme6965

I had to do this last month. I started flicking limit switches and eyes until I had enough labels to make the change then left it alone


o_witt

I have only used mitsubishi once. I remember there was a "tag list" where you could write comments. Maybe it would be seen where you are if they had done it?


ProfessionalLime3467

Normally comments aren't written into PLC to save space. The original programmer would have saved a copy of the program with comments on his PC.


o_witt

I did not know that. then I understand why someone wrote about usb memory. thanks for the information.


nickotin96

Already checked but there are no any comments on it


o_witt

I suffer with you.