Introduction to PLCs
For managing and control of the electrical systems there once were used electromechanical relays. In time as technology advanced came and PLC devices (Programable Logics Controllers). Advantage of an PLC devices over relays is that they can be used for a different problems with the same hardware, while relays must be again rewired to do some other function. Also there is the finance aspect since now PLC are cheaper then relays.
PLC Components
Every PLC is consists from a couple components. Each manufacturer gives his combination but we can disassemble an PLC on his key elements:
- Power source
- CPU
- Input modul
- Output modul
There are tree sizes of a PLCs: Mini, medium or rack.
Each of above mentioned parts of PLC must be supplied with power (the common beginners mistake is that they connect only one modul of a PLC to power source and then only that modul works).
We can supply moduls with AC or DC current variously of our needs. In most of cases on module we have a COM conector which is wired to a “-“ end if DC or a “0” end if AC and each connector of that modul must be supplied with a “+” end of power source (if we are using AC the correct term is “hot” wire).
An example of wiring power supply and module is showed in Figure 1:
Input modules are important because they convert monitored value into a electrical signal (namely into bits). Output moduls turn electrical bits into signals that acts on actuator.
Programming of a PLC
Programing is done in a ladder programming environment ,this way is adopted from anology with relays because with this there were less time needed to retrain technicians and engineers who has already worked with relays.
Before we begin programming we need to define some basic terms:
Bitbox – as the name says it is a box containing a bit (it can hold only two bits:0 or 1) from whose value depends behavior of instruction (it is very important to remember that this box is virtual)
Instruction – action inside program that needs to check hers bitbox in order to execute .
Enviroment in which is programming being done varies from manufacturer of an PLC device but symbols are the same so we can work in different programs without big differences. On next pictures we can see RSLogix program.
From Figure 2 we can see why it is called ladder programming (we have two vertical lines between which is horizontal lines with instructions-rangs)
We will explain some of symbols that can be seen while programming :
This is XIC instruction. The most important thing is to understand what this instruction does and how she does it. There are numerous interpretation of this instruction but in mine opinion the easiest for beginner is : “Go look for 1”.
Basically program tells instruction “go look for 1”,someone would ask where to look? Above instruction there is address of bitbox that need to be checked. If in bitbox, with address in this example “ADRESA_1”,contains 0 then instruction is FALSE,while it gets 1 and then instruction is TRUE.
XIC instr. VideoThis is XIO instruction. This instruction can be interpreted as “Go look for 0”,which it seeks inside bitbox with a address “ADRESA_2” .
XIO instr. VideoOTE instruction represent excecutive command. It can be interpreted as “Go write 1” in bitbox with “ADRESA_3”. In order that this instruction gets TRUE value and therefore “write 1”in bitbox it need to have continues line of TRUE from left to the right side in a rang. Respectivelly if we have FALSE coming the instruction interprets this as “Go write 0”.
OTE instr. VideoLet us take a look at an example in Figure 2. In order to excecutive command “writes 1” we need to have next values inside bitboxes:
ADRESA_1 | 1 |
ADRESA_2 | 0 |
Explanation:
Program starts with XIC instruction and “looks for 1” if there is inside bitbox with adress “ADRESA_1” value 1 then this instruction is TRUE,next we have XIO instruction that “looks for 0” on address “ADRESA_2” and if bitbox has value 0 then this instruction is also TRUE. Since we have continuos TRUE from left to right executable instruction “goes and writes 1” inside bitbox “ADRESA_3”.
After that we can see that program ends and process start again.
Instruction “LATCH” that is excecutable, has characteristic that if TRUE comes to it it “Write 1” same as OTE instruction but if we have FALSE coming then this instruction has command “do nothing”.
Opposite of instruction latch we have instruction “UNLATCH” that if has TRUE coming to it it interprets as “Go write 0” but if it has FALSE coming to her she inreprets as “do nothing”.
Timers
One more instruction we have are timers. There are four basic types of timers which are illustrated in the following table:
On-delay | Off-delay | |
With memory | RTO | RTF |
Without memory | TON | TOF |
Timer with On-delay without memory (RTO) works in the following way: When TRUE comes timer starts counting time inside accumulator (which has 0 value in the example below) and counts time until preset(which is set to value 4000 in example,that is 4s) after what it excecutes instruction DN.
Copyright Notice
This technical article is protected by U.S. and international copyright laws. Reproduction and distribution of PDF version of this technical article to websites such as Linkedin, Scribd, Facebook and others without written permission of the sponsor is illegal and strictly prohibited.© EEP-Electrical Engineering Portal.
very curious about EEP
I am looking for help in wiring IC 4049 for inverter purposes
Suggested edit… “There are tree sizes…”
Good
Very nice
A few of my employees as extreamly interested in learning about PLC’s, the problem is they have been on the Mechanical Side of repairs their whole career. PLC’s can be complicated and overwhelming if not trained properly. Where could they start is my question. I really want them to get a good foundation before starting in siemens training, where would/could they start?
If you could please reply to [email protected]. Thanks for all the support.
Thanks a lot for that productive information. Please keep it up.
how can v apply the ladder program to the plc.
plz upload presentetion
Nice starting point.
The description is easy and clear
I WANT AUTOCAD DRAWING …..FOR DELTA DVP16SN11TS
* DELTA DVP16SN11TS (O/P MODULE,DIGITAL,16 POINTS,24VDC)
* DELTA DVPO8SM11N (I/P MODULE DIGITAL,8 POINTS,24V DC)
very nice post.
Dear Vlada Markovic,
Great. Very nice Explanation. Thanks.
How to get free PLC Simulator? Please help
Dodikawa there is a lot of simulators and programing differs from manufacturer of PLC device. If you know what PLC device you need(have) then try to download software from internet.
Nice tutorial, thanks!
Tnx Edvard
Just the thing I need to start programming my Siemens S7 PLC for a school project tomorrow. I am very interested in the webserver capability of the PLC, maybe something for a next article? PLC + noip.com is a very powerfull and helpfull combination for companies.
Thanks Muck,at first I will stick to PLC devices for industrial usage and after that who knows.
Cheers.
))) let’s try to learn something new