Sunday, February 19, 2012

Basic PLC - Notes


Basic PLC - CX Programmer Guide

Menu Overview 




Input / Output 


Opening New File


Programming


Basic PLC - Programming

Programming PLC


The ladder diagram has and continues to be the traditional way of representing electrical sequences of operations. These diagrams represent the interconnection of field devices in such a way that the activation, or turning ON, of one device will turn ON another device according to a predetermined sequence of events.



The original ladder diagrams were established to represent hardwired logic circuits used to control machines or equipment. Due to wide industry use, they became a standard way of communicating control information from the designers to the users of equipment. As programmable controllers were introduced, this type of circuit representation was also desirable because it was easy to use and interpret and was widely accepted in industry.



Programmable controllers can implement all of the “old” ladder diagram conditions and much more. Their purpose is to perform these control operations in a more reliable manner at a lower cost. A PLC implements, in its CPU, all of the old hardwired interconnections using its software instructions. This is accomplished using familiar ladder diagrams in a manner that is transparent to the engineer or programmer.


Contacts Symbols in PLCs

Programmable controller contacts and electro mechanical relay contacts operate in a very similar fashion. For example , let us take relay which has two sets of contacts, one normally open contact and one normally closed contact. If relay coil A is not energized (i.e it is OFF), contact A-1 will remain open and  and contact A-2 will remain closed. Conversely if coil A is energized or turned ON, contact A-1 will close and contact A-2 will open.



Example 1 :


Example 2 :



Wednesday, February 08, 2012

Basic PLC - PLC Programming (Ladder Diagram)

Creating Flow Chart

Flowcharts are helpful in understanding a complicated process. This is especially true if you have to make decisions and do different steps depending on those decisions. By looking at a flowchart you can visually follow different paths through the chart. For each step on a flowchart you can ask yourself "Is this step necessary? Can it be improved?" . Flowcharts are very essential for you to complete your ladder diagram. Without a flowchart you will face difficulties in order to complete your ladder diagram. 


You can make your flowcharts easier to understand and less subject to errors by using only a fixed set of structures. These structures include:
  • Sequence
  • Decision
  • Loop
  • Case
By using only these structures will make it easier to find and correct errors in your charts. Each structure has a simple flow of control with one input and one output. These structures can then be nested within each other. Any chart can be drawn using only these structures. You can draw structured flowcharts.


Sequence
 The reader would start at the Start shape and follow the arrows from one rectangle to the other, finishing at the End shape.  A sequence is the simplest flowcharting construction. You do each step in order.
If your charts are all sequences, then you probably don't need to draw a flowchart. You can type a simple list using your word processor. The power of a flowchart becomes evident when you include decisions and loops.
 


Decision
Another structure is called a decision, "If Then.. Else" or a conditional. A question is asked in the decision shape. Depending on the answer the control follows either of two paths. Example, if the temperature is going to be less than freezing (32 degrees Fahrenheit) the tomatoes should be covered. 


Loop 
This structure allows you to repeat a task over and over.  It is not important that you remember whether the loop is a "Do While" or "Repeat Until" loop, only that you can check the condition at the start of the loop or at the end. You can also have the conditions reversed and your loop is still a structured design loop. 


Ladder Diagram

Ladder logic is the main programming method used for PLCs. As mentioned before, ladder logic has been developed to mimic relay logic. The decision to use the relay logic diagrams was a strategic one. By selecting ladder logic as the main programming method, the amount of retraining needed for engineers and tradespeople was greatly reduced.


Modern control systems still include relays, but these are rarely used for logic. A relay is a simple device that uses a magnetic field to control a switch.  When a voltage is applied to the  input coil, the resulting current creates a magnetic field. The magnetic field pulls a metal switch (or reed)  towards it and the contacts touch, closing the switch. The contact that closes when the coil is energized  is called normally open. The normally closed contacts touch when the input coil is not energized. Relays are normally drawn in schematic form using a circle to represent the input coil. The output contacts are shown with two parallel lines. Normally open contacts are shown as two lines, and will be open (non-conducting) when the input is not energized. Normally closed contacts are shown with two lines with a diagonal line through them. When the input coil is not energized the normally closed contacts will be closed (conducting).


A ladder diagram consists of two basic parts : left section also called conditional and a right section which has instructions. When a condition is fulfilled, instruction  is executed :
-> Normally Open (NO) and Normally Close (NC)
-> NO switch won't conduct electricity until it is pressed down
-> NC switch will conduct electricity until it is pressed.
-> Examples - doorbell and house alarm.

Anatomy of a ladder diagram

*  Typically flows from left to right.
*  Can be divided into sections called rungs, each rung typically consists of a combination of input instructions.
*  Each input or output instruction is assigned an address indicating the location in the PLC memory where the state of that instruction is stored.
*  The numerical format of the address depends on the scheme used by the particular manufacturer




Thursday, January 19, 2012

Basic PLC - PLC Hardware Design






  RS 232


  1. Wire 3-core signal cable for RS232 communication with male and female RS232 5-pin connector using soldering technique.
·         Male connector will be connected to PLC RS232 PORT
                        Female connector will be connected to PC RS232 PORT






Basic PLC - Introduction to Control System


CONTROL SYSTEM 
A control system consists of three sections: input, processing and output. 

1.1.1 Input section

Input signals usually come from various sensors that convert physical quantities into electrical signals. These sensors may be simple push-button switches, limit switches or proximity sensors, etc. Depending on the sensor uses this information may be an on/off(binary) or a continuous (analog) representation of the input quantity


1.1.2 Processing section

From the input signals the automatic control system has to produces the necessary output signal in accordance to the control plant built into the processor. The control plant can be implemented into two different ways, using either hard – wired control system or programmable control system.

Hard-wired control systems have the control function fixed permanently when the system components are connected together (eg. Electrically).Whereas in a programmable control system the control function is programmed and stored within a memory unit. This program can be changed or modified when necessary.

Hard – wired systems
Programmable systems
Relays
Computer
Electronic logic
Microprocessor
Pneumatic logic
PLC system
Hydraulic logic



1.1.3 Output section

Motors, cylinders, relays etc are output devices which convert signals from the control system into other necessary quantities. A pneumatic cylinder, for example, converts pneumatic signals into linear motion.

1.2.2 Advantageous of using PLC

  1. Shorter project implementation time
  2. Easier modification without cost penalty
  3. Project cost can be accurately calculated
  4. Shorter training time required
  5. Design easily changed using software
  6. A wide range control application
  7.  Easy maintenance
  8. High reliability
  9. Standardization of Controller Hardware
  10. Able to withstand Harsh Plant Environment 

1.2.3 Type of PLC
       1. ABB
       2. Mitsubishi
       3 Siemens
       4 FESTO
       5 Omron
       6 Keyence

1.2.4 PLC operation

 1 CHECK INPUT STATUS-First the PLC takes a look at each input to determine if it is on or off. In other words, is the sensor connected to the first input on? How about the second input? How about the third... It records this data into its memory to be us

2  EXECUTE PROGRAM-Next the PLC executes your program one instruction at a time. Maybe your program said that if the first input was on then it should turn on the first output. Since it already knows which inputs are on/off from the previous step it will be able to decide whether the first output should be turned on based on the state of the first input. It will store the execution results for use later during the next step.

 3 UPDATE OUTPUT STATUS-Finally the PLC updates the status of the outputs. It updates the outputs based on which inputs were on during the first step and the results of executing your program during the second step. Based on the example in step 2 it would now turn on the first output because the first input was on and your program said to turn on the first output when this condition is true. 

1.2.5 Application of PLC:

  • CNC machines
  • Industrial Robot
  • Automatic transport
  • Process Control in petrochemical