How to read and understand PLC program

Dale_z28

Member
Join Date
Sep 2012
Location
Indiana
Posts
11
Hi guys, I'm the electrician for a company with machines run by PLC's of different varieties. No one ever documented anything and most of the machines were built by companies that are now out of business. My boss had our programs (PLC's and panelviews) backed-up onto a CD by an outside engineering firm so we'd have copies, but I have no idea how to decipher the programs (I have RSLogix500 and can open the programs but that's about it). The tech we hired to save our data told me that without the "comments" in the programs, it would be very difficult to understand. He's right!

My experience: Industrial electrician, over 11 years with a machine-builder. I attended a 2-day Allen Bradley PLC training course about 10 years ago, but most of my experience has been building panels, assembling machines and wiring them, so my programming knowledge is minimal. We have NO controls engineer here, and barely have an IT department. I HAVE purchased the PLC Tutor handbook, and joined this site...

Where do I start? Nothing major has happend (YET!!) but I want to prepare myself as much as possible.(For instance, I have a machine that should read travel in inches-per-minute, and the readout quit working. More out of curiosity I have tried to find something in the program to tell how that happens. No luck. My prox swith feeds to an input, but then what?)
As you can see, I've jumped into to the deep end without my floaties.

Thanks in advance!
 
I would start with the physical I/O and work backwards. You can work with an offline program and add description text. Next you can reverse engineer the program bit by bit.

This is not an easy task, but if you know how the machine functions you stand a fighting chance.
 
For instance, I have a machine that should read travel in inches-per-minute, and the readout quit working. More out of curiosity I have tried to find something in the program to tell how that happens. No luck. My prox swith feeds to an input, but then what?)

are you allowed to post the program file here on the forum? ... it should end with an RSS extension - and you'll have to zip it before you post it (forum rule) ...

if you can post it, then tell us as much as you can about the part that doesn't work - we'll see if we can guide you through your problem ... once you've worked through a couple of examples, you'll feel a lot better about the situation ...

and welcome to the forum ...
 
I would start with the physical I/O and work backwards. You can work with an offline program and add description text. Next you can reverse engineer the program bit by bit.

This is not an easy task, but if you know how the machine functions you stand a fighting chance.

Thats how I do it.

Following a wiring diagram I rebuild the Input and Output descriptions of the data files.

-With the program opened in RsLogix500
-Open the data file "Output" or "Input" (on the left hand side)
-Make sure the "Radix" drop down menu is in "binary"
-The row called "0:0.0" is the first output card.
-Now column "0" is the first output of the first card.
-Click the number (will contain a zero or a one)
-According to the wiring diagram type in what the input is, in the "Desc"

Build both your Output and Input data files and you should see that your ladder has filled in quite a bit.
 
Last edited:
I had to do this so many times at my old job, I cringe thinking about it. "What shall I call this internal bit?" It was like trying to solve a cryptogram to get the comments right, guessing what to call things based on the few I/O comments you can copy from electrical drawings.

I agree, start with the real I/O and electrical drawings (verify the drawings' accuracy first or create those out of thin air too)...

Once you get that first program commented, you will definitely know your way around RSLogix, so stick with it, and if you can zip and post some of the logic, we may be able to help.
 
"What shall I call this internal bit?" It was like trying to solve a cryptogram to get the comments right, guessing what to call things based on the few I/O comments you can copy from electrical drawings.
While reverse engineering, I'll add a question mark (?) after the description when I'm not positive what that address does. As I get a deeper understanding, more and more question marks get removed.

🍻

-Eric
 
My boss had our programs (PLC's and panelviews) backed-up onto a CD by an outside engineering firm so we'd have copies, but I have no idea how to decipher the programs (I have RSLogix500 and can open the programs but that's about it). The tech we hired to save our data told me that without the "comments" in the programs, it would be very difficult to understand.
You should make sure that your boss is aware that buying a machine without a commented copy of the software prograrm is similar to these situations: Buying a computer without a reloadable copy of the operating program; Buying an appliance without any operating instructions or user manual; Buying a car with a locked hood and locked gas cap, but no key for the locks; Buying a car without a spare tire or jack or lug wrench; Buying a horse without looking in his mouth or seeing him run; Any situation where you buy something that makes you completely dependent on some outside entity to keep it operating.
 
Where do I start? Nothing major has happend (YET!!) but I want to prepare myself as much as possible.(For instance, I have a machine that should read travel in inches-per-minute, and the readout quit working. More out of curiosity I have tried to find something in the program to tell how that happens. No luck. My prox swith feeds to an input, but then what?)
As you can see, I've jumped into to the deep end without my floaties.

Thanks in advance!


This is more common that you would think. What I do is to get the prints out and start by adding my own documentation to the existing programs inputs and outputs.

It won't mess anything up, and it's far better than what you currently have.

As an aside, this is exactly how I got my start in PLCs. As an electrician, I was tasked with documenting the existing program. It wasn't long before I knew how the silly thing worked (and it wasn't long after that that I started making changes to the program :) ).
 
Thats how I do it.

Following a wiring diagram I rebuild the Input and Output descriptions of the data files.

-With the program opened in RsLogix500
-Open the data file "Output" or "Input" (on the left hand side)
-Make sure the "Radix" drop down menu is in "binary"
-The row called "0:0.0" is the first output card.
-Now column "0" is the first output of the first card.
-Click the number (will contain a zero or a one)
-According to the wiring diagram type in what the input is, in the "Desc"

Build both your Output and Input data files and you should see that your ladder has filled in quite a bit.
Thanks, just got back to work this morning and I'll try to enter as much as I can. Just for clarification, you were refering to an Output card (O:0.0) in your example, and hopefully you meant for me to enter the description of the OUTPUTS (you said "input") or else I'm totally confused. Then saving the program after I've entered some descriptons... should I rename the file? (maybe I HAVE to rename it with changes) Thanks for the pointers, ALL of you!!
 
You should make sure that your boss is aware that buying a machine without a commented copy of the software prograrm is similar to these situations: Buying a computer without a reloadable copy of the operating program; Buying an appliance without any operating instructions or user manual; Buying a car with a locked hood and locked gas cap, but no key for the locks; Buying a car without a spare tire or jack or lug wrench; Buying a horse without looking in his mouth or seeing him run; Any situation where you buy something that makes you completely dependent on some outside entity to keep it operating.
Yes, my boss is very well aware. He's got only a few more months here than me, and I started in February. This place was very niave (to be polite) when they purchased equipment; they didn't insist on anything. Besides one company being out of business, the guy who updated/automated 5 machines (one of which I was refering to about the inches-per-minute display) has since passed away, and left no copies of his programming. That situation will change with any new equipment, but the old stuff is all around me, circling like sharks (ok, maybe I'm being a bit dramatic).
I appreciate the responses, and I will post more as I go along
 
Not sure about the Panelviews, if they can be accesses/modified from a back-up. (WinCC Flex can't so yeah)
But operating panels go a long way in helping you decypher the code.

Start with the In-Outputs from the drawings.
When you're done adding those, check the panel software to check the links to the PLC, usually they help in adding descriptions to tags. Sometimes they just confuse you even more.
A good way to use it though is by using the alarm handling.

Start with comments/descriptions of bits/bytes/word/etc that you are 100% sure of. Either from the drawings or from the panel.
Once that is done, decyphering the code will be a lot easier.
It'll still take time, but it'll be easier at least.

Had a few machines with several hundred IO, 400+ tags in the panel and 500+ alarms to decode.
Not much fun, but you'll learn both the panelview as the RSLogix software.

Last word of advice: Create a naming convention and stick to it.
Ie, use the same name for the same function in all machines/software.
Not doing so will confuse you in the end and everyone else reading the code after you.
 
are you allowed to post the program file here on the forum? ... it should end with an RSS extension - and you'll have to zip it before you post it (forum rule) ...

if you can post it, then tell us as much as you can about the part that doesn't work - we'll see if we can guide you through your problem ... once you've worked through a couple of examples, you'll feel a lot better about the situation ...

and welcome to the forum ...
As I get more knowledgable I will see about posting portions of the program, thanks. I need to talk to you about the "PLC Bootcamp" I've heard mentioned here, also
 
Not sure about the Panelviews, if they can be accesses/modified from a back-up. (WinCC Flex can't so yeah)
But operating panels go a long way in helping you decypher the code.

Start with the In-Outputs from the drawings.
When you're done adding those, check the panel software to check the links to the PLC, usually they help in adding descriptions to tags. Sometimes they just confuse you even more.
A good way to use it though is by using the alarm handling.

Start with comments/descriptions of bits/bytes/word/etc that you are 100% sure of. Either from the drawings or from the panel.
Once that is done, decyphering the code will be a lot easier.
It'll still take time, but it'll be easier at least.

Had a few machines with several hundred IO, 400+ tags in the panel and 500+ alarms to decode.
Not much fun, but you'll learn both the panelview as the RSLogix software.

Last word of advice: Create a naming convention and stick to it.
Ie, use the same name for the same function in all machines/software.
Not doing so will confuse you in the end and everyone else reading the code after you.
Thanks, Jeebs, I atempted to open a file froma Panelview the other day and found I don't know how! It had a .pva extension, if I remember correctly. Does RSLogix open them? If so, it was not cooperating the way I was trying it. SO much to learn... But I sure apreciate the tips and encouragement, thanks tons!
 
As I get more knowledgable I will see about posting portions of the program,
well, my point was that by posting the program – and letting us help you work your way through it - you'd become "more knowledgeable" with less time and trouble ...

I need to talk to you about the "PLC Bootcamp" I've heard mentioned here, also
you're certainly welcome to call – but honestly I'm perfectly willing to try to help you with your learning curve for free – right here on the forum ...
 

Similar Topics

Hi, The hardware is: Click Plc model # CO-O1DD1-O HMI model # S3ML-R magnetic-inductive flow meter model # FMM100-1001. I will set the flow meter...
Replies
4
Views
129
Is there a way to use the FAL instruction to do +=2 instead of +=1? I have an array that is organized with alternating "data" and "flag" values...
Replies
5
Views
125
Hi everyone i have a customer, who wants to show an alarm on the machine, if the I/O forces are enabled and set, on at ControlLogix L81E with...
Replies
3
Views
230
Hi Iam using monitouch hmi(V9 soft) with omron plc cj2m (CX programmer). In this I want to read a data from hmi to plc. The data was like...
Replies
0
Views
94
Hi everyone. Quick questions. On UnityPro, I want to open and quickly read tags from a .STA files witouth opening the program. I have 30 plc...
Replies
2
Views
136
Back
Top Bottom