About off-line programming?

mayhem

Member
Join Date
May 2006
Location
n. ireland
Posts
4
I'm doing an assignment in college and was wondering if any 1 could help me with this question below?

Outline the benifits of off-line programming of PLC systems.
 
Off-line programming is what you do when you are preparing code to control a system or machine before commissioning. During commissioning and afterwards most changes will be made online (i.e. as the machine or system is running). Asking about the "benefits of off-line programming" is not really a proper question; programming offline is a phase you have to pass through on the path to a working system rather than a technique.

That said, a few things you could say might be:
1. Encourages planning of code rather than ad-hoc changes
2. Does not require connection to the system
3. Does not require working electrical hardware (I/O etc)

Hope that helps...
 
Assuming that you are authorized to connect and make online changes on running equpment, which may be a problem itself,
there are many limitations for online editing.
1. Even with no mistakes in new code, activating edits on running machine may cause unpredictable or non-obvious changes in the machine operation.
2. PC-PLC communication is done between the PLC scans and may significantly increase the scantime during transfer.
In motion applications it may be dangerous.
3. Sometimes more than one rung must be edited in order for new code to be correct. The intermediate status is simply erroneous code.
This includes impossibility to replace the same device through the entire program with another one.
4. In some systems you cannot edit some rungs online.
This mostly applies to interrupts, subroutines and rungs with high-speed instructions.
5. The rung size limit for online edits may apply.
6. For most systems it is impossible to change online the system configuration, including but not limited to expansion modules declaration, high-speed counters and interrupts declarations, processor communication setup, etc.
7. I do not use any other languages but ladder for PLC programming.
Most probably, other languages apply more limitations to online editing.
 
"4. In some systems you cannot edit some rungs online.
This mostly applies to interrupts, subroutines and rungs with high-speed instructions."


That is why I am so opposed to using Subroutines at all.

The benefit of "Off-Line" programming is that you can screw-up the code all you want without affecting a running process... that is, until you load it into the PLC... at which point, there might be hell to pay!

Until you load the program, you have time to check, recheck, and recheck, over, and over, again, until you have an adequate level of confidence in your code. But even then, if are loading a new, or modified, set of code into an existing process... well, success is not based on confidence alone... your code had better be right!

There is really no way to evaluate what level of stress you should have for any particular change... it depends on the type of change, the devices affected, and of course, your ability as a programmer.

The more complicated the process and the code for that process, the more likely that a programming error can result in destruction of the equipment, and possibly personnel.

I prefer using "On-Line" programming, while the process is running. My ultimate goal might be to install a major change in an existing section of code, but I do so incrementally. As long as the process is currently running adequately, I can let the existing code continue. I then add "Shadow-Code" running along side of the actual driving code. I can watch to see that the "Shadow-Code" is performing as I expect. I can add "traps" to watch for any error conditions that might occur too quickly to be caught by the status screen.

Eventually, I get to the point where I have to let the new code control the actual outputs. First I rewrite the Output code to operate with either section of code. In general, the Output is controlled by either the old-code, or the new-code. The selection is made by use of an ON/OFF Switch in the Output code. The Switch is named "USE NEW CODE", or somesuch. While "USE NEW CODE" is OFF, the Output is controlled by the old-code. While "USE NEW CODE" is ON, the Output is controlled by the new-code!

When I'm ready, and at the appropriate time, I simply Force ON the "USE NEW CODE" bit. Everyone is notified before the switch-over occurs. After doing so, we all continue to watch the process very carefully.

While all goes well, we continue to watch for some period of time (my "traps" are still in place). Eventually, if all stays well, I remove the old-code.

If I run into an "Aw-$hit!", then I simply Force OFF the "USE NEW CODE" bit. Hopefully the "aw-$hit" was just a small problem.

Of course, if I'm adding a new device to the process, that is usually added as one complete section of code, however, it also has an ON/OFF Switch built into the code. FORCE a bit ON to activate the code, FORCE the bit OFF to deactivate the code.

This can be pretty stressful on a running process, but by carefully introducing small changes, one step at a time, major headaches should be held to a minimum. Of course, correct-coding is every bit as important (if not more so) as carefully introducing those changes.

The only benefit that I see to "Off-Line" programming is for developing code for a non-existent, or non-running, process. After all, the process can't be running when the new-program is loaded. There is an exception... if you have a full-blown simulator that simulates your process, then "Off-Line" might be OK... but then, you still have to stop the process to load the new code.

Can you afford to stop the process (production) for every small change that comes along?
 
off-line vs. on-line programming

I believe the real question should be "What is the benefit of true on-line programming?"

My definition of true on-line programming is having the ability to make program changes while the PLC is in the "run" mode and having the changes take effect without placing the PLC in the "stop" mode. Some PLC's may allow you to change only timer and counter values "on-line" but not add/delete rungs and contacts. This is a real hinderance.

Many applications simply cannot be started and stopped continually while the programmer debugs his code. Naturally, safety is a factor and I agree with all the comments others have made about the need to be careful. But all too often there is no way to fully test the logic ahead of time and it causes more problems starting/stopping the PLC than making on-line changes.

Where on-line programming is absolutely necessary is on any type of material handling system so you can watch the changes take affect while the process is running.
 
My process is clearly and well beyond 3000 rungs! (I currently have about 5000 rungs).

The key to good programming is "Modularity"!

Depending on how they are used, sub-routines can provide a degree of Modularity varying between Absolute Modularity, which is good, and... clutter.

The problem with subroutines, of course, is that you CAN NOT perform run-time edits on them!

Real Men don't eat Quiche - However, Real Men do program ON-LINE in Run-Time! (It takes "hair" don' cha know?)

Subroutines and off-line updates are the lazy man's way of dealing with complicated issues.

Timewise, what is the difference between having all code in the Main and breaking the process into subroutines?

What? Subroutines are only called when they are needed? Therefore they don't gobble up scan-time unless they are called?

The same can be accomplished easily, in any high-end PLC, by carefully planning your Process Control and using SKIP, JUMP, whatever. (MCR is NOT so good in this respect!)

The biggest beef against subroutines in a very large, very dynamic, process is the lack of being able to modify your program ON-LINE, in real-time, while the process is running!

HOW MUCH DOWNTIME CAN YOU AFFORD???
 
dogleg43 said:
I believe the real question should be "What is the benefit of true on-line programming?"

My definition of true on-line programming is having the ability to make program changes while the PLC is in the "run" mode and having the changes take effect without placing the PLC in the "stop" mode.

Yes, and only such one was meant.
I've never seen, though, possibility to edit more than one rung online at a time.
 
Terry, what PLC are you using? The two major brands I have used (Siemens 300 series and AB SLC) both allowed online editing of code in subroutines. Admittedly the Siemens requires you to download the particular block you are working on after making changes but that has the benefit of being able to download just the block you need rather than messing with the whole process.

Skips and jumps have a deservedly lousy reputation in the desktop programming world because they make code a nightmare to read and troubleshoot. You would NEVER find somebody who builds a large and complicated desktop program using jumps, ever - it's considered poor programming style. I use a tiny amount of jumps and a large amount of subroutines.

From a design engineering viewpoint, wrapping standard blocks of code in subroutines drastically improves the easy resuability of those blocks. It also helps make it obvious what inputs that chunk of code requires to make it functional.
 
Most of my PLC programming has been done using Siemens Step 5 and Step 7 and the phrases off-line and on-line refer to my connection to the plc, not the process it is controlling.

Off-line programming - all the code I create and the changes I make exist only in my programming device. When I have finished creating/changing the code, I transfer the code to the plc.

On-line programming - all the code I create and changes I make exist in the plc memory.

From Terry's comments it would appear off-line programming is done whilst the process is stopped, on-line programming is done whilst the process is running. This is (probably) the more generic use of the term and was possibly what the assignment was about - not the details of how much ladder can be changed by the different brands of plc when on-line to the CPU.
 

Similar Topics

Hello, I'm studying PLC's at college and need to know what Off-line programming is and what are it advantages and disadvantages. Can anybody...
Replies
5
Views
3,109
Has anyone been able to use the Weintek Online simulation tool with the Beckhoff free tag driver? I have no problem running it on the HMI but no...
Replies
2
Views
1,611
Team, I have a few IFM O2D inspection cameras that are dropping from the PLC network. I can connect to the cameras with the editing software via...
Replies
0
Views
1,526
Hey guys I'm having an issue with one of our 90-30 PLCs. It's not communicating. It is off line. I can take a CPU out of another rack and the PLC...
Replies
2
Views
1,490
How do you merge off line a rs 5000 program with one that has descriptions on the tags. I have done rs 500 but never 5000
Replies
2
Views
1,439
Back
Top Bottom