HPR4728: Programmable Logic Controls - Episode 3
Description
This show has been flagged as Clean by the host.
--------------------
01 Introduction
This is the third episode in an 8 part series.
02
In the previous episode we covered
* The early history of computers in industrial control
* The early history of PLCs, including how they got their name
* Who the major brands are
* What they look like physically
* A basic description of the abstract machine architecture
* A very brief look at what a PLC program is like
* The scan concept
* The main PLC programming languages
* The minor PLC programming languages
* The relative popularity of each of the programming languages
03
In this episode we will begin by taking a look at one of the early PLCs from the era when they first began seeing widespread use.
I will not even attempt to try to be comprehensive, I will just give a broad overview in the limited time I have available here.
I have started with an older model because its simplicity and limited features allow for an easier introduction to the topic.
--------------------
04 Allen Bradley PLC/2
The Allen Bradley PLC/2 was introduced to the market in 1977.
It was not their first foray into this field, but it was their first really successful one.
I am not aware of a comprehensive history of their early product line, but one of their early major selling models was the PLC2/30.
This is also known as their 1771 series.
--------------------
05 Physical Layout
The CPU module was a large metal box which sat beside the I/O rack and connected to it with a cable.
The I/O rack was a box with an open front and an series of slots into which tall narrow boxes containing the I/O could be slotted.
06
A backplane ran across the back, connecting the I/O to the CPU.
Multiple racks could be connected together by cables.
For the PLC2/30, you could have a maximum of 896 digital I/O points.
07
Racks were 315mm high, and between 247mm to 610mm wide, with racks coming in 4, 8, 12, and 16 slot varieties.
The CPU was the same height as the rack and roughly square in outline.
08
As micro electronics advanced, the CPU module was able to be shrunk down in size such that it would fit into a slot in the rack, which became the norm for PLCs.
--------------------
09 The Electronics Inside
Early model PLC/2s used some sort of 8 bit processor, some sources say an Intel 8080.
10
They also used four AMD 2900 bit slice processors as a logic co-processor.
If you are not familiar with bit slice processors, these are chips which are like a 4 bit vertical slice through a processor, and can be joined together with logic chips to form a complete CPU.
These are what were used to construct minicomputers.
11
They were used as coprocessors in early PLCs because microprocessors on their own were simply too slow to handle running the user program rapidly enough to allow a useful size program.
One or more microprocessors were used as well in order to coordinate the overall operation and system management.
12
As microprocessors grew faster and more powerful, the need for logic coprocessors declined and they were eventually dropped.
Early versions used magnetic core memory.
Later ones switched to some sort of solid state RAM, probably static RAM of some sort.
13
Details of what sort of processors are inside any PLC are actually very hard to come by as manufacturers don't generally talk about that sort of thing.
They wish the user to see it as just a black box.
--------------------
14 The Data Table
From a programmer's perspective, the most important thing to understand first is the data table.
The data table is the PLC's data memory.
15
For a PLC2, this is an array of 16 bit words.
Each word consists of two 8 bit bytes.
Addressing for both bits and words is in octal.
16
For those not familiar with them, octal numbers follow a counting system that goes from 0 to 7.
The next number after 7 is 10.
Counting then proceeds from 11, 12, 13, etc. going to 17, 20, 21, etc.
Each octal digit takes exactly 3 bits.
17
Individual bits in PLC2 notation may be addressed by specifying the word followed by a slash, and then the bit.
For example, 030/12 is the 12 bit in word 030. Remember that this is octal, so 12 is not the 12th bit if you are counting in decimal.
18 Memory Organization
On the PLC2/30, the data table has the following organization.
19
Word addresses 000 to 007 are Processor Work Area number 1.
This is not accessible by the user.
20
Word addresses 010 up to, but not including, 100 are the Output Image Table.
This is a memory mapped image of the I/O outputs.
010 to 077 is for Rack 1.
020 to 027 is for Rack 2.
This pattern continues up to Rack 7, which is 070 to 077.
21
Word addresses 100 to 107 are Processor Work Area number 2.
This is also not accessible by the user.
22
Word addresses 110 up to, but not including, 200 are the Input Image Table.
This is a memory mapped image of the I/O inputs.
This is laid out in the same way as the output image table, and goes from 110 to 177.
110 to 117 is for Rack 1.
120 to 127 is for Rack 2.
This pattern continues up to Rack 7, which is 170 to 177.
23
You will notice that the output image table and input image table appear to address the same rack slots.
They do in fact do this.
As to which address a specific slot in a specific rack maps to depends on whether there is an input card or an output card in that slot.
24
Addresses 200 to 277 are for Timer/Counter accumulated values.
An accumulated value is the current time or count.
25
Addresses 300 to 377 are for Timer/Counter preset values.
A preset value is the target time or count which when reached causes the timer or counter to indicate that it has reached the desired value.
26
The memory above 400 can be configured to split it into a data storage area and user program area.
The data storage area is where you would store data that your program needs to use which is not part of the I/O or times and counters.
You need to strike the correct balance between user data and program size.
27
There are various things that can be changed and configured with respect to the above, but I am not going to cover that in any depth as this is not a tutorial on the PLC2.
=
You should however have a pretty good idea of the memory of an early model PLC.
The things to understand are that I/O are mapped to memory addresses, and
different memory ranges are used for different purposes.
28
All memory management was manual.
It was up to the user to keep track of which memory addresses were to be used for what purposes.
Allen Bradley helpfully provided paper forms which you could photocopy which you could use to plan out and document what each address would be used for.
Part of the programmer's job was to make efficient and logical use of memory, while also leaving space for future changes.
--------------------
29 The User Program
The user program is made up of instructions.
Each instruction typically takes one word of memory.
However, complex instructions can take up to 8 words of memory.
30
There is a main program.
You can think of this as like the "main" function in C.
If you don't find that analogy helpful, then just think of it as this is where your program starts.
The main program continues with one rung after another until it reaches the END statement.
31
There is also a subroutine area.
The main program calls a subroutine by using a Jump to Subroutine, or JSR instruction.
32 The T3 Programming Terminal
When the PLC2 came out, things like laptops were still far in the future.
Even the first Compaq Portable suitcase style PC was still some years away.
Indeed, the first PLC/2 came out not long after the first Altair PC kit.
33
Programming initially therefore was done using a special programming terminal known as a T3.
The T3 was a suitcase size box with a small CRT in the end of it, and a keyboard attached to it below the screen.
If this sounds like the early portable PCs, keep in mind that this in fact predated them by a number of years.
34
The keyboard was not a typewriter or QWERTY style.
It had a membrane keypad with graphical symbols.
Recall the previous episode on control diagrams using relays and how these were documented using schematic symbols on drawings.
The T3 terminal keypad had symbols correspond




