Processor Scan

TOMC

Member
Join Date
Apr 2002
Location
Niagara Falls
Posts
58
I know that there have been alot of posts on this subject but I don't recall ever seeing any discussion on this question.

Processor Scan ( from AB SLC manual)

Input Scan - Read Input Image
Program Scan - Execute Ladder Program, Update Output Image
Output Scan - Transfer Output Image to Output Modules
Communications
Processor Overhead

My question is what happens to internal bits and when does it happen.
 
In most cases it happens during the execution of the ladder diagram: top to bottom, left to right.


| B3:0/1 |
|------------------------------(L)---|
| B3:0/1 B3:0/100|
|---| |------------------------( )---|
| B3:0/1 |
|------------------------------(U)---|
| B3:0/1 B3:0/101|
|---| |------------------------( )---|
|



At the end of the scan, B3:0/100 will be on and B3:0/101 will be off.


I beleieve there are some exceptions to this, but I don't remember them now. Hopefully, someone else will be willing to point to them.
 
If I am not mistaken any coil ( ) is considered an output, regardless of file type...ie they are updated with the Output table at end of scan. Thats why you have to reverse the order of some rungs to obtain the status needed.
 
maybe this will help ...

this old post seems to have helped quite a few people ... give it a try ...

previous post about processor scan


Basic idea: a BIT is a box in the processor’s memory. This box can hold either a “1” or a “0”.

Basic idea: the INSTRUCTIONS in the ladder program are called “instructions” for a reason. They literally are instructions FROM (you) the programmer TO the processor. These instructions tell the processor to “examine a bit to see if it contains a 1” or to “examine a bit to see if it contains a 0” or to “go write a 1 or a 0” into a particular bit. The processor obeys these instructions instantly as soon as the rungs are executed. Specifically, the processor does exactly what the ladder commands it to do and “examines a bit” or “writes to a bit” instantly - whether the bit in question is an output bit (example: O:2/0) or an internal bit (example: B3/0) or even an input bit (example: I:1/0) makes no difference.

post again if you still have specific questions ...
 
Last edited:
Let's think about what needs to happen. You're in the middle of that part of the scan called 'ladder program execution'. The result of evaluating a rung is to turn a coil ON. It doesn't matter whether it's an output or an internal, if you're going to be able to use the ON status of that coil again, you'll need to 'remember' it. To make sure you can remember it, you write a '1' to a location in memory.

That raises the question, "where in memory should I write that value"?

First, consider the case where the coil is an output. You could immediately write the '1' to the output module. Then, later in the program when you run into a NO or NC contact associated with that coil, you would have to read the ON/OFF status from the module.

What's wrong with that, you may ask. The answer is that it takes a long time. Since you don't have a dedicated communications line to each circuit on each output module, to write or read a value from a module, the CPU has to first establish contact with the module, then write or read the value. It takes more time to establish contact than it does to read or write the data.

It's much more efficient to store the ON/OFF status of the outputs in a holding area called the image table. Then, after evaluating every rung of the program and updating the values in the image table as you go along, you transfer the image table information to the output modules.

The same reasoning works in reverse for the inputs. You read all of the input modules, storing the ON/OFF status of each one in the input image table. Then you start evaluating the rungs of ladder logic. When you encounter an instruction that needs the ON/OFF status of a particular input, you get the information from the image table. You do it that way because it's quicker to retrieve information from the image table than to call up the input module and ask it for the latest status of the input.

Now consider the internals. You need a memory location for them also, but since it doesn't have to be passed along to I/O modules, it usually isn't called an image table. Once you've written a '1' or a '0' to the internal discrete memory, that's as far as it needs to go.
 
Last edited:
Pretty much as Ron and rsdoran describe, all bits whether assigned to the output table, binary table, integer, etc.. are updated immediately when encountered during the scanning of each individual rung... Only when the scan of all the rungs is complete however, does the processor then xfer the contents on the output table to the appropriate output cards..
 
and one more shot just because it's a slow day ...

I don’t think I see any disagreement at all among the answers opinions you’ve received ... we’ve all just used different ways of expressing the same ideas ...

here’s one more way ... let’s take this statement from your original post ...

Input Scan - Read Input Image
Program Scan - Execute Ladder Program, Update Output Image
Output Scan - Transfer Output Image to Output Modules
Communications
Processor Overhead

and change it just a little on the Program Scan line ...

Input Scan - Read Input Image
Program Scan - Execute Ladder Program, Update any and all bits wherever they may be located
Output Scan - Transfer Output Image to Output Modules
Communications
Processor Overhead

now I think that should just about nail it down ...
 
Steve got in before I submitted, so add my agreement with him also.. Only thing I find that ends up confusing many people is the use of ON/OFF and Closed/Open to describe the state of a any Boolean bit in memory... It may be valid, but it doesn't always equate directly to the final controlled device state and thus can be misleading... In most other programming environments the terms true/false, set/reset or even 1/0 are used to describe Boolean states... Try using On/Off or Closed/Open with digital logic and you'll see why these terms just aren't commonly used....except in PLCs....... Throw a NC closed switch into equation or a sinking output and I think most people would be better of treating bits for what they are, and leave the terms On/Off for describing the actual state of a controlled device only.. and even then,,,only when appropriate....
 
Excellent point, Bill.

I have my own mental image of what I mean when I use the terms 'ON' and 'OFF', but I can't expect everyone else to have the same image.

It's impressive how something so simple as to have only two possible states can so quickly get complicated.
 
Thank you everyone

This all came about from a discusion at one of my customers with one of the maintenance electricians. I was looking for some backup for what I was saying. Somtimes my explinations dont always come accross the way I mean them to. I actually showed him this site maybe he will register.

Thanks again

Tom
 
Once more, You could set output image bit O:0/0 to a 1 in rung 1 of a ladder.

Then in rung 5, examine the bit and it will be examined as 1.

Then in the last rung, unlatch the bit.

Well you have set, used and reset the O:0/0 bit in the program and the physical output was never switched on.

I don't know why you would want to do this, it's just an example. Internal bits work the same way.

I've written bits that are on and back off so fast that the histogram won't catch them.
 
Here is a link to an Omron Operation Manual for the latest PLCs. There is a very extensive and detailed section on calculating scan times and processing methods. The first 2 pages in the section are usefull flow charts. I will try to post these 2 pages here.
The scan section starts at page 385 in the manual.
Scan Time Data
beerchug
 

Similar Topics

In one of my project I need to integrate Bar code Scanner (Model: MS 880, Supplied by Microscan) with Control Logix Processor using Ethernet...
Replies
3
Views
4,217
Hi, Is it possible to for an RIO with Flex 5000 series module, e.g. 5094-AEN2TR, to communicate with an 1756-L72E processor.
Replies
1
Views
90
Is there anything I Should take into account while updating the firmware on a safety processor? I have a 1756-L61S running version 17 and need...
Replies
0
Views
99
Hello all, I have been experiencing dropping network connections on the Co Pro quite a bit, 3 times a month. The remedy that we do to bring the...
Replies
11
Views
754
I have an application where I will be using two PanelView Plus 7s to run two machines that share a common processor. The machines are identical...
Replies
1
Views
399
Back
Top Bottom