You are on page 1of 10

PLC CONTROLLED LOGIC FOR

ELECTROPNEUMATICS
INTRODUCTION
Air logic circuits have been replaced long ago by electric circuits. This is primarily because of the cost involved in procuring and maintaining air logic components and the sluggish response of the components when compared with the electric components. But still pneumatic power is used for actuation purposes because of safe, reliable and flexible actuation when compared with electric actuators. Solenoid valves controlled by electronic and electric circuits control the pneumatic actuators.

1.1.

ELECTRIC CONTROL
Control systems built upon electric circuits are popular in electro pneumatics. They

provide compact solutions that could tolerate industrial environments. The problem is that these are hard wired circuits which are inflexible. Whenever the working of the actuators has to be modified, the complete circuit must be changed. Some hard wired systems are extremely complex such that rewiring is never an option and the complete module must be changed. It is in such a scenario PLC had its birth. PLC descended from relay based logic.

1.2.

PLC BASED CONTROL


A PLC based control is soft wired. They are vested with re-programmability. This

provides us with flexibility and the maintenance cost is also reduced. They are controlled by either microprocessors or by microcontrollers. The input and output modules are built up of either relays or bi-polar junction transistors. They are programmed using Ladder logic or an Instruction list program.

1.3.

WORKING OF A PLC
Each input relays and output relays have an address. The powering up of the input

relay is controlled by a switch whose state is to be monitored for the logic control. This relay can be used to sense whether the switch is opened or closed using the normally closed and normally open contacts respectively.

Similarly the output relay could be powered up in accordance with the logic programmed in the PLC and the normally open (NO) or the normally closed (NC) contact can be used for output actuation. The microprocessor within the PLC consists of registers that could monitor an assigned input relay or actuate an output relay. A PLC does not generate an output at once with a change in input. It has a particular scanning time during which it scans and stores all input states. At the end of scanning it actuates outputs correspondingly. The scan time is a specification of a PLC which helps us to select a PLC for a particular application.

1.4.

PROGRAMMING A PLC

1.4.1. LADDER LOGIC PROGRAMMING


The basic ladder logic programming needs the understanding about four main symbols

Fig 1.1 Basic Logic Symbols for Ladder logic programming

These could be understood easily by translating an electro pneumatic circuit into PLC ladder logic. A simple electro pneumatic circuit that actuates a single acting pneumatic cylinder with spring return using a push button is illustrated below.

Fig 1.2 Pneumatic circuits

The electro pneumatic circuit that controls the solenoid in the Pneumatic circuit is illustrated below.

Fig 1.3 Electro pneumatic circuit for single acting cylinder actuation

When the push button is pressed the solenoid is powered which actuates the cylinder and by the release of which the cylinder comes to its initial position. The corresponding PLC Circuit is

Fig 1.4 PLC Ladder diagram for single acting cylinder actuation The examine is closed (XIC) monitors the normally open contact of the relay with the address %I00001. If a is open the value stored in the register corresponding to the XIC symbol is 0 and is 1 if a is closed. If all symbols in any pathway leading to an output become 1, then the microprocessor assigns 1 to the output coil. Thus if XICs register has 1 the coil of the output relay with address %Q00001 is actuated. Since the symbol in the output corresponds to normally open coil, the solenoid is energised when the value of register corresponding to coil symbol becomes 1. If it has to be the other way round, the solenoid is powered when the push button is not pressed, then with the same components the program is slightly modified as below

Fig 1.5 Modified ladder 1 for single acting cylinder actuation Such a flexibility is absent in electro pneumatics.

Again if the same circuit is to be done and we have only a normally closed push button, then electro pneumatics cannot do it but PLC can in the following way.

Fig 1.5 Modified ladder 2 for single acting cylinder actuation

Indirect control is achieved in electro pneumatics by using relays. A similar control could be also achieved in PLC using memory variables.

Fig 1.6 PLC program with memory variables

Here, the button a need not be pressed continuously, when it is pushed the virtual latched relay with address %M00001 is powered up and the value 1 is stored in corrwsponding register. Virtual normally NO and NC contacts of the latched relays shown by XIC and XIO symbols correspondingly updates values. Button b resets the latched relay by energising the reset coil of the virtual latched relay, thus retracting the pneumatic cylinder. It is important to be noted that all instances of the relay the variables, the et coil and the reset coil have the same address. It is our choice to either monitor the NO or NC contact of the relay, whichever is needed in the logic.

Boolean equations can also be directly converted into ladder diagrams as below. It just follows the primitive rules which could be expressed as Switches in series constitutes AND logic Switches in parallel constitutes OR logic

The equation ( )

Could be represented as a ladder in the following manner

Fig 1.7 Ladder logic for

1.4.2. INSTRUCTION LIST PROGRAMMING


The instruction list (IL) programming is supported by most of the PLCs. It resembles the assembly language. The principle concept to be remembered is that we have accumulators. Accumulators are variables with dedicated addresses. A sequence of any supported memory address can be assigned to accumulators (%M, %Q or %T). Address %T is preferred for accumulators as %M is more suitable for virtual latched relays and %Q is suitable for output relays. These instruction list programmes can be easily stored as text files and be used easily. Such a flexibility is absent for ladder diagrams. Initially a value is stored in an accumulator. Corresponding operators work on the value stored in the accumulator and once again stores the result in the accumulator. Once all operations corresponding to a Boolean expression is done the value of the accumulator is stored in the output variable. Here a relay analogy could not be felt easily. We directly work with the registers here. While programming with IL, the variables are assigned nick names which would be used during the program. We need not program with the addresses directly. The Ladder logic programs can also make use of these nick names.

The syntax of the various basic commands is mentioned table 1.1.

Table 1.1 Syntax for IL programming


COMMAND EXPLANATION

LD_BOOL

Initialize an accumulator with Boolean data type

ST_BOOL

Store the value of the Boolean accumulator in a variable

AND

Perform logical AND operation between accumulated value and the operand

OR

Perform logical OR operation between accumulated value and the operand

NOT

Invert the value in the Boolean accumulator

AND(

Perform logical AND operation between accumulated value and the local accumulator within the parenthesis

OR(

Perform logical OR operation between accumulated value and the local accumulator within the parenthesis

Marks the end of the local statement and ) returns the value of the local accumulator to either AND( or OR( which initialized the local statement Stores 1 in an internal memory variable if the value of the accumulator is TRUE Stores 0 in an internal memory variable if the value of the accumulator is TRUE END

Marks the end of the instruction list program

The IL program equivalent to the ladder logic in fig1.4 is LD_BOOL a ST_BOOL o END

The accumulator stores the value of a and finally passes the value to the variable o which controls the output. The IL program equivalent to the ladder logic in fig1.6 is LD_BOOL a S x LD_BOOL x ST_BOOL o LD_BOOL b R x END The accumulator stores the value of a. If accumulators value becomes 1 at any point of time, x is stored with the value 1. Now, the accumulator stores the value of x and passes is to o. If b becomes 1, the value of accumulator that accumulated b also becomes 1 and hence x will be made 0. The IL program equivalent to the ladder logic in fig1.7 is LD_BOOL a OR( LD_BOOL b AND( LD_BOOL c NOT ) ) ST_BOOL o END Here, the accumulator stores the value of a. OR( initializes a local statement where another accumulator stores the value of b. AND( initializes another accumulator that stores the value of c. The most local accumulator is inverted by NOT. ) returns the most local accumulators value to the AND operator. The result of AND is stored in the accumulator that once stored b. Similarly the remaining two accumulators are ORed and the value is sent to o. The variables used in the above programmes a, b, c, o, x must be initialized with appropriate addresses. Thus the instruction list programmes resembles the Boolean expressions and a one to one conversion is possible. IL programming could be used in places where automatically generated logic is to be implemented.

1.5.

WIRING THE PLC


This section applies to GE-FANUC Versamax PLC with I/O configuration IC200UAL006

with 23 Point (13) 24 VDC In, (9) Relay Out, (1) 24 VDC Out, (2) Analog In and (1) Analog Out, 120/240 VAC Power Supply. Wiring the PLC may tend to be tedious but is much easier than the corresponding electro pneumatic circuits. Once wired and corresponding variables are declared for the program, the entire logic can be changed at ease. The input ports of the PLC require 24V supply to actuate the input relays and hence sense the switch on the way. An output just acts as switches and connects the load in the circuit to the terminal of our choice. The output with address %Q00001 alone gives out a 24V power supply which is not used in the illustrations. The corresponding commons of the input and output relays in the I/O module must be connected to appropriate terminal to use a relay and its address. They can be decided form the following circuit diagram.

Fig 1.8 Circuit diagram for IC200UAL006 I/O module

It is evident from the circuit that the input relays (%I00009 to %I00013) are connected to negative terminals and their commons are connected to positive terminals. The 24 V input, if not externally available the input is inbuilt in the PLC trainer controlled by switches

for each relays. The switch of interest may be put in between the source and input port of PLC. This circuit diagram in fig 1.8 is informative for wiring. For example to use output ports Q2, Q3, Q4, Q5 the common terminal C2 must be connected to an AC or DC terminal. It must be noted with caution that the load connected to the output terminal must be externally fused to protect the PLC. But this fusing is inbuilt when the PLC is used with the trainer. Once the switches are connected with the input ports and the coils are connected with the ports, the name and the address of the input and the output relays are noted and corresponding variables must be created in the programming software.

1.6.

USING THE SOFTWARE


The Proficy Machine Edition 6.5 is the software used to program the PLC. The steps

required to program and run the PLC are Start All Programs Proficy Proficy Machine Edition Proficy Machine Edition Click Empty Project and click OK Enter a name for the project and click OK In the Navigator box, under Project tab right click the name of the project Select Add Target GE Intelligent Platforms Controller VersaMax Nano/Micro PLC Expand Hardware configuration and then expand the Main rack Right click CPU and select Replace Module Select the 23 point module IC200UAL (004/005/0060 and click OK Right click Program Blocks under Logic and select Delete All Blocks Right click Program Blocks under Logic and select New LD Block or IL Block, which ever needed or select Import From File to import a ladder in the form of a XML file Type out the IL file or import the text file by right clicking the newly created IL Block and select Load From File. Now select the Program blocks and enter the starting address of the sequence of address to be allotted for accumulators. Use %T for boolean accumulators and %R for analog accumulators. Use Block is created Click the variable tab to enter the variables. Right click the navigator area and select New Variable BOOL to create a Boolean variable to make the ladder logic program if a LD

Enter its name and address in the inspector window The sets of variables van be imported or exported by right clicking the navigator area and selecting Import and Export respectively

Now click Now click Click

to connect the PC with the PLC to toggle to the programmer mode to upload the program or click to upload the program and run

the program Click Click to stop the program to run the program

Make sure that the hardware switch of the PLC is in RUN mode while running the program from the PC.

CONCLUSION
Thus certain basic aspects of using PLC controlled electro pneumatics have been discussed.

You might also like