Programmable logic controllers plc pdf


















Is this content inappropriate? Report this Document. Flag for inappropriate content. Download now. Save Save Plc For Later. Original Title: Plc. Related titles. Carousel Previous Carousel Next. Jump to Page. Search inside document. Varun bvarun. Documents Similar To Plc. Geet Sehgal. Nishant Ruwali. Fabio Curty. Nate Pawang. Fernando Rodrigues. Pudeti Raghusreenivas. Syed Hassan Tariq. Ferryus Devidson.

Islem Liliyane. The single highway and the ring methods are often termed peer to peer in that each terminal has equal status. Such a system allows many stations to use the same network. With token passing, a special bit pattern called a token is circulated round the network. When a station wishes to transmit into the network it waits until it receives the token, then transmits the data with the token attached.

Another station wishing to transmit cannot do so until the token has been freed by removal from the data by a receiver. With slot passing, empty slots are circulated into which stations can deposit data for transmission.

Bus systems generally employ the method in which a system wishing to transmit listens to see if any messages are being transmitted. If no message is being transmitted, a station can take control of the network and transmit its message. This method is known as carrier sense multiple access CSMA. However, we could end up with two stations simultaneously perceiving the network to be clear for transmission and both simultaneously taking control and sending messages. If such a situation is detected, both stations cease transmitting and wait a random time before attempting to again transmit.

Different PLC manufacturers adopt different forms of network systems and methods of communication for use with their PLCs. Most employ peer to peer forms, e.

The next level involves controllers such as small PLCs or small computers, linked through a network with the next level of larger PLCs and computers exercising local area control. These in turn may be part of a network involved with a large mainframe company computer controlling all. This involves control and the gathering of data. The term SCADA, which stands for supervisory control and data acquisition system, is widely used for such a system. Its functions include synchronising data transfer and transferring bits of data between systems.

Layer 2: Data link This layer defines the protocols for sending and receiving information between systems that are directly connected to each other. Layer 3: Network This layer defines the switching that routes data between systems in the network. Layer 4: Transport This layer defines the protocols responsible for sending messages from one end of the network to the other.

It controls message flow. Layer 5: Session This layer provides the function to set up communications between users at separate locations. Layer 6: Presentation This layer assures that information is delivered in an understandable form. Layer 7: Application This layer has the function of linking the user program into the communication process and is concerned with the meaning of the transmitted information.

Each layer is self-contained and only deals with the interfaces of the layer immediately above and below it; it performs its tasks and transfers its results to the layer above or the layer below. It thus enables manufacturers of products to design products operable in a particular layer that will interface with the hardware of other manufacturers.

The MAC layer defines the access method to the transmission medium and consists of a number of standards to control access to the network and ensure that only one user is able to transmit at any one time. One standard is IEEE Another standard is IEEE The LLC layer is responsible for the reliable transmission of data packets across the Physical layer.

They thus developed a standard communications system for factory automation applications, this being termed the manufacturing automation protocol MAP. The system was for all systems on the shop floor, e. For the data link, methods are needed to ensure that only the user of the network is able to transmit at any one time and for MAP the method used is token passing.

The term broad band is used for a network in which information is modulated onto a radio frequency carrier which is then transmitted through the coaxial cable. MAP is not widely used, a more commonly used system being the Ethernet.

It uses coaxial cable with a maximum length of m and up to stations can be accommodated, repeaters which restore signal amplitude, waveform and timing can be used to extend this capability Figure 4.

Each station is connected to the bus via a transceiver, the transceiver clamping on to the bus cable. The term base band is used when the signal is transmitted as just a series of voltage levels directly representing the bits being transmitted. A station wishing to send a message on the bus will determine whether the bus is clear and, when it is, put its message frame on the bus. There is the slight probability that more than one station will sense an idle bus and attempt to transmit.

Thus each sender monitors the bus during transmission and detects when the signal on the bus does not match its own output. Each message includes a bit sequence to indicate the destination address, source address, the data to be transmitted and a message check sequence.

The message check sequence contains the cycle redundancy check see Section 4. If so, it accepts the message. Ethernet is widely used where systems involve PLCs having to communicate with computers. The modular Allen-Bradley PLC-5 can be configured for use with a range of communication networks by the addition of suitable modules see Figure 1.

PLC manufacturers often have their own networks, in addition to generally offering the possibility of Ethernet. The Allen-Bradley data highway is a peer-to-peer system developed for Allen-Bradley PLCs and uses token passing to control message transmission. Communication is established by a single message on the data highway, this specifying the sending and receiving addresses and the length of block to be transferred.

Each such loop is termed a cycle. PLCs could be operated by each input being examined as it occurred in the program and its effect on the program determined and the output correspondingly changed. This mode of operation is termed continuous updating. As the program is executed the stored input data is read, as required, from RAM and the logic operations carried out. At the end of each program cycle all the outputs are transferred from RAM to the appropriate output channels. The outputs then retain their status until the next updating.

The sequence can be summarised as Figure 4. A typical cycle time is of the order of 10 to 50 ms. This means that the inputs and outputs are updated every 10 to 50 ms and thus there can be a delay of this order in the system reacting. It also means that if a very brief input cycle appears at the wrong moment in the cycle, it could be missed. In general, any input must be present for longer than the cycle time. Special modules are available for use in such circumstances.

Consider a PLC with a cycle time of 40 ms. What is the maximum frequency of digital impulses that can be detected? The maximum frequency will be if one pulse occurs every 40 ms, i. The cycle or scanning time for a PLC, i.

Thus the more complex the program the longer the cycle time will be. It does this by allocating addresses to each input and output. Toshiba use a similar system. With larger PLCs having several racks of input and output channels, the racks are numbered.

With the Allen-Bradley PLC-5, the rack containing the processor is given the number 0 and the addresses of the other racks are numbered 1, 2, 3, etc. Thus addresses can be of the form shown in Figure 4. This would indicate an input, rack 01, module 2 and terminal Each 8 group is termed a byte and each input or output within an 8 is termed a bit.

The inputs and outputs thus have their addresses in terms of the byte and bit numbers, effectively giving a module number followed by a terminal number, a full stop. Thus I0. X Bit number Byte number Figure 4.

The letter A is used to designate inputs and B outputs. Thus A3. In addition to using addresses to identify inputs and outputs, PLCs also use their addressing systems to identify internal, software-created devices, such as relays, timers and counters.

A serial communication interface: i Involves data being transmitted and received one bit at a time. The RS communications interface: i Is a serial interface. The extra bits X and Z at the beginning and the end are: i To check whether the message is corrupted during transmission.

Bit Y is: i The parity bit showing odd parity. The parallel data communication interface: i Enables data to be transmitted over short distances at high speeds. For communications over distances of the order of to m with a high transmission rate: i The RS interface can be used.

B Read all the input signals. C Check all the input signals against the program. D Read all the inputs, run the program and update all outputs. A PLC with a long cycle time is suitable for: i Short duration inputs.

However, assembly language based on the use of mnemonics can be used, e. LD is used to indicate the operation required to load the data that follows the LD, and a computer program called an assembler is used to translate the mnemonics into machine code.

Programming can be made even easier by the use of the so-called high level languages, e. These use pre-packaged functions, represented by simple words or symbols descriptive of the function concerned. However, the use of these methods to write programs requires some skill in programming and PLCs are intended to be used by engineers without any great knowledge of programming.

As a consequence, ladder programming was developed. This is a means of writing programs which can then be converted into machine code by some software for use by the PLC microprocessor. This method of writing programs became adopted by most PLC manufacturers, however each tended to have developed their own versions and so an international standard has been adopted for ladder programming and indeed all the methods used for programming PLCs.

This chapter is an introduction to the programming of a PLC using ladder diagrams and functional block diagrams, with discussion of the other techniques in the next chapter. Later chapters continue with further ladder programming involving other elements. The diagram shows the circuit for switching on or off an electric motor. We can redraw this diagram in a different way, using two vertical lines to represent the input power rails and stringing the rest of the circuit between them.

Figure 5. The circuit shown in Figure 5. The power lines, or rails as they are often termed, are like the vertical sides of a ladder with the horizontal circuit lines like the rungs of the ladder.

The horizontal rungs show only the control portion of the circuit, in the case of Figure 5. Circuit diagrams often show the relative physical location of the circuit components and how they are actually wired. With ladder diagrams no attempt is made to show the actual physical locations and the emphasis is on clearly showing how the control is exercised. In the normal state, push button 1 is open and push button 2 closed. When button 1 is pressed, the motor circuit is completed and the motor starts.

Also, the holding contacts wired in parallel with the motor close and remain closed as long as the motor is running. Thus when the push button 1 is released, the holding contacts maintain the circuit and hence the power to the motor. To stop the motor, button 2 is pressed. This disconnects the power to the motor and the holding contacts open. Thus when push button 2 is released, there is still no power to the motor.

Thus we have a motor which is started by pressing button 1 and stopped by pressing button 2. L1 L2 1 2 M Holding switch Figure 5. Writing a program is then equivalent to drawing a switching circuit. The ladder diagram consists of two vertical lines representing the power rails. Circuits are connected as horizontal lines, i.

The power flow is taken to be from the left-hand vertical across a rung. The top rung is read from left to right. Then the second rung down is read from left to right and so on. When the PLC is in its run mode, it goes through the entire ladder program to the end, the end rung of the program being clearly denoted, and then promptly resumes at the start see Section 4.

This procedure of going through all the rungs of the program is termed a cycle. The end rung might be indicated by a block with the word END or RET for return, since the program promptly returns to its beginning. The term input is used for a control action, such as closing the contacts of a switch, used as an input to the PLC. The term output is used for a device connected to the output of a PLC, e. Thus a switch which is normally open until some object closes it, is shown as open on the ladder diagram.

A switch that is normally closed is shown closed. For example, we might have a relay which switches on one or more devices. This is the address of the input or output in the memory of the PLC see Section 4. Programming 83 Figure 5. Some slight variations occur between the symbols when used in semi-graphic form and when in full graphic.

Note that inputs are represented by different symbols representing normally open or normally closed contacts. The action of the input is equivalent to opening or closing a switch.

Output coils are represented by just one form of symbol. Further symbols will be introduced in later chapters. Semi-graphic form Full graphic form A horizontal link along which power can flow Interconnection of horizontal and vertical power flows Left-hand power connection of a ladder rung Right-hand power connection of a ladder rung Normally open contact Normally closed contact Output coil: if the power flow to it is on then the coil state is on Figure 5.

The input is thus the switch and the output the motor. There are no other input devices and the line terminates with the output, denoted by the symbol. When the switch is closed, i. Only while there is an input to the contacts is there an output. Only while there is no input to the contacts is there an output. In drawing ladder diagrams the names of the associated variable or addresses of each element are appended to its symbol. Thus Figure 5. When wiring up the inputs and outputs to the PLC, the relevant ones must be connected to the input and output terminals with these addresses.

Thus, for an automatic drilling machine as illustrated in Figure 1. Such a situation involves the AND logic function, condition A and condition B having both to be realised for an output to occur. This section is a consideration of such logic functions. We can think of this as representing a control system with two inputs A and B Figure 5.

Only when A and B are both on is there an output. Thus if we use 1 to indicate an on signal and 0 to represent an off signal, then for there to be a 1 output we must have A and B both 1. The ladder diagram starts with , a normally open set of contacts labelled input A, to represent switch A and in series with it , another normally open set of contacts labelled input B, to represent switch B. The line then terminates with O to represent the output. For there to be an output, both input A and input B have to occur, i.

In general: On a ladder diagram contacts in a horizontal rung, i. This describes an OR logic gate Figure 5. The ladder diagram starts with , normally open contacts labelled input A, to represent switch A and in parallel with it , normally open contacts labelled input B, to represent switch B. Either input A or input B have to be closed for the output to be energised Figure 5. In general: Alternative paths provided by vertical paths from the main rung of a ladder diagram, i.

Programming 87 5. When there is an input to the switch, it opens and there is then no current in the circuit. This illustrates a NOT gate in that there is an output when there is no input and no output when there is an input Figure 5. The gate is sometimes referred to as an inverter. The input A contacts are shown as being normally closed. This is in series with the output. With no input to input A, the contacts are closed and so there is an output. When there is an input to input A, it opens and there is then no output.

An example of a NOT gate control system is a light that comes on when it becomes dark, i. An alternative, which gives exactly the same results, is to put a NOT gate on each input and then follow that with OR Figure 5.

There is an output when input A and input B are not 1. The combination of these gates is termed a NAND gate. When the inputs to input A and input B are both 0 then the output is 1. When the inputs to input A and input B are both 1, or one is 0 and the other 1, then the output is 0. An example of a NAND gate control system is a warning light that comes on if, with a machine tool, the safety guard switch has not been activated and the limit switch signalling the presence of the workpiece has not been activated.

An alternative, which gives exactly the same results, is to put a NOT gate on each input and then an AND gate for the resulting inverted inputs Figure 5. There is an output when neither input A or input B is 1. When input A and input B are both not activated, there is a 1 output. When either X or X are 1 there is a 0 output.

Sometimes there is, however, a need for a gate that gives an output when either of the inputs is 1 but not when both are 1, i. When input A and input B are not activated then there is 0 output. When just input A is activated, then the upper branch results in the output being 1.

When just input B is activated, then the lower branch results in the output being 1. When both input A and input B are activated, there is no output. In this example of a logic gate, input A and input B have two sets of contacts in the circuits, one set being normally open and the other normally closed.

With PLC programming, each input may have as many sets of contacts as necessary. A simple example of such a situation is a motor which is started by pressing a push button switch. Though the switch contacts do not remain closed, the motor is required to continue running until a stop push button switch is pressed. The term latch circuit is used for the circuit used to carry out such an operation. It is a self-maintaining circuit in that, after being energised, it maintains that state until another input is received.

An example of a latch circuit is shown in Figure 5. When the input A contacts close, there is an output. However, when there is an output, another set of contacts associated with the output closes.

These contacts form an OR logic gate system with the input contacts. Thus, even if the input A opens, the circuit will still maintain the output energised. The only way to release the output is by operating the normally closed contact B.

Note that the stop contacts X are shown as being programmed as open. If the stop switch used is normally closed then X receives a start-up signal to close. This gives a safer operation than programming X as normally closed. X is closed when the program is started. When X is momentarily closed, Y is energised and its contacts close. This results in latching and also the switching off of Y and the switching on of Y To switch the motor off, X is pressed and opens.

Y contacts open in the top rung and third rung, but close in the second rung. Thus Y comes on and Y off. Latching is widely used with start-ups so that the initial switch on of an application becomes latched on. When the input contacts close both the coils give outputs. Output B only occurs when both input A and input B occur.

Until input A is closed, none of the other outputs can be switched on. When input A is closed, output A is switched on. Then, when input B is closed, output B is switched on. Finally, when input C is closed, output C is switched on. The entire ladder gives the complete program.

There are several methods that can be used for keying in the program into a programming terminal. Whatever method is used to enter the program into a programming terminal or computer, the output to the memory of the PLC has to be in a form that can be handled by the microprocessor.

This is termed machine language and is just binary code, e. For example, to enter a pair of contacts the key marked might be used, followed by its address being keyed in.

To enter an output the key marked might be used, followed by its address. To indicate the start of a junction. Computers can be used to draw up a ladder program. These involve loading the computer with the relevant software, e. The software operates on the Windows operating system and involves selecting items, in the usual Windows manner, from pull-down menus on the screen.

It is described as being a graphical language for depicting signal and data flows through blocks, these being reusable software elements. A function block is a program instruction unit which, when executed, yields one or more output values. Thus a block is represented in the manner shown in Figure 5. Output Inputs Function Figure 5. A function block is depicted as a rectangular block with inputs entering from the left and outputs emerging from the right.

The function block type name is shown in the block, e. AND, with the name of the function block in the system shown above it, Timer1. Names of function block inputs are shown within the block at the appropriate input and output points. Cross diagram connectors are used to indicate where graphical lines would be difficult to draw without cluttering up or complicating a diagram and show where an output at one point is used as an input at another.

The 1 in a box indicates that there is an output when the input is 1. A negated input is represented by a small circle on the input, a negative output by a small circle on the output Figure 5.

When A or B inputs are 1 then there is an output. The function block diagram equivalent can be shown as a feedback loop.

What is required is an AND logic situation between the start switch input and a sensor input which is on when the liquid in the tank is below the required level. We might have a switch which is on until the liquid is at the required level. These two elements are then in an AND logic situation with a switch indicating that there is liquid in the reservoir. Suppose this switch gives an input when there is liquid. The function block diagram, and the equivalent ladder diagram, is then of the form shown in Figure 5.

In Boolean algebra there are just two digits, 0 and 1. A signal lamp is required to be switched on if a pump is running and the pressure is satisfactory, or if the lamp test switch is closed. For the inputs from the pump and the pressure sensors we have an AND logic situation since both are required if there is to be an output from the lamp. We, however, have an OR logic situation with the test switch in that it is required to give an output of lamp on regardless of whether there is a signal from the AND system.

The function block diagram and the ladder diagram are thus of the form shown in Figure 5. As another example, consider a valve which is to be operated to lift a load when a pump is running and either the lift switch is operated or a switch operated indicating that the load has not already been lifted and is at the bottom of its lift channel.

We have an OR situation for the two switches and an AND situation involving the two switches and the pump. One way we could write a program for this is for each sensor to have contacts that are normally closed so there is an output.

When there is an input to the sensor the contacts open and the output stops. We have an AND logic situation. A stop switch is not safe if it is normally closed and has to be opened to give the stop action. If the switch malfunctions and remains closed then the system cannot be stopped.

A better arrangement is to program the stop switch in the ladder program as open in Figure 5. Thus there is an input signal to the system which closes the contacts in the program when it starts up.

If it is in the input to the PLC Figure 5. However, if the emergency stop switch is in the output, operating it will stop the motor and also cause the start switch to become unlatched if the arrangement shown in Figure 5. The motor will thus not restart when the emergency stop button is released. Output ii Input 2 is activated. Problems 11 to 14 concern Boolean expressions for inputs A and B. A Input A is in series with input B, both inputs being normally off. B Input A is in parallel with input B, both inputs being normally off.

C Input A, normally off, is in series with input B which is normally on. D Input A is in parallel with input B, both inputs being normally on. A B 15 The arrangement of inputs in Figure 5. For the function block diagram in Figure 5. Which of the function block diagrams in Figure 5. Which of the ladder diagrams in Figure 5.

Instruction list gives programs which consist of a series of instructions, each instruction being on a new line. An instruction consists of an operator followed by one of more operands, i. In terms of ladder diagrams an operator may be regarded as a ladder element.

Each instruction may either use or change the value stored in a memory register. The codes used differ to some extent from manufacturer to manufacturer, though a standard IEC has been proposed and is being widely adopted. Table 6. LD A is thus the instruction to load the A into the memory register. It can then later be called on for further operations. The last line has the result stored in Q, i. Labels can be used to identify various entry points to a program, useful as we will find later for jumps in programs, and these precede the instruction and are separated from it by a colon.

With the IEC operators, an N after it is used to negate its value. All rungs must end with an output or store result code. The following shows how individual rungs on a ladder are entered using the Mitsubishi mnemonics for the AND gate, shown in Figure 6. Since the address of the input is X, the instruction is LD X This is followed by another open contacts input and so the next program line involves the instruction AND with the address of the element, thus the instruction is AND X The rung terminates with an output and so the instruction OUT is used with the address of the output, i.

OUT Y Figure 6. The next item is the parallel OR set of contacts X Thus the next instruction is OR X The last step is the output, hence OUT Y The following is the Siemens instruction list: A I0. I when added to Mitsubishi instruction is used to indicate the inverse of the instruction.

I is also the instruction for a NOT gate. Note that N added to an instruction is used to make the inverse. The instruction list then becomes: LN I0. The next instruction is for a parallel set of normally closed contacts, thus the instruction is ORI X The instruction list is then: AN I0. The first instruction is for a normally open pair of contacts X After reading the first two instructions, the third instruction starts a new line.

But the first line has not been ended by an output. The PLC thus recognises that a parallel line is involved for the second line and reads together the listed elements until the ORB instruction is reached. The list concludes with the output OUT Y Brackets are used to indicate that certain instructions are to be carried out as a block.

They are used in the same way as brackets in any mathematical equation. Thus with the Siemens instruction list we have in step 0 the instruction A. The brackets close in step 3. This means that the A in step 0 is applied only after the instructions in steps 1 and 2 have been applied. The IEC standard for such programming is to use brackets in the way used in the above Siemens example.

The instruction used here is ANB. Such a program is written as an instruction list using brackets. The A instruction in step 0 applies to the result of steps 1 and 2.

The A instruction in step 4 applies to the result of steps 5 and 6. In writing the instruction list we just write the instructions for each line in turn. When X is activated, there is then an output from Y but not Y The instruction list is then: A I0.

See that section for an explanation of the ladder diagrams; here we just show the instruction lists relating to the programs. State 0 has an input which is triggered after the green light has been on for 1 minute and an output of red light on. State 1 has an input which is triggered after the red light has been on for 1 minute and an output of green light on.

States Outputs 0 Red light only on Transfer condition for next state is red light on for 1 minute Green light 1 only on Transfer condition to next state is green light on for 1 minute Figure 6. SFC charts have the following elements: 1 The operation is described by a number of separate sequentially connected states or steps which are represented by rectangular boxes, each representing a particular state of the system being controlled.

The initial step in a program is represented differently to the other steps, Figure 6. Stop Final step Figure 6. Two transitions can never directly follow from one to another, they must always be separated by a step.

As an illustration, Figure 6. Then the drum is to be rotated for a specified time. We have a Drum water sequence of states which can be represented in the manner shown in Figure 6. Level full switch Step 2 Heat 6.

Parallel branching Figure 6. Figures 6. In Figure 6. As an illustration of the use of the above, Figure 6. Such actions, like the outputs in the above example, are depicted as rectangular boxes attached to the state. Thus, where a ladder diagram is used, the behaviour of the action is shown by the ladder diagram being enclosed within the action box. The action is then activated when there is a power flow into the action box. Beginning with a basic layout the book goes right into programming techniques, it progresses through fundamental, intermediate, and advanced functions-- and concludes with chapters on related topics.

Applications are discussed for each PLC function, and vast arrays of examples and problems help users achieve an understanding of PLCs, and the experience needed to use them. For programmers and others working with PLCs. Programmable Logic Controllers includes 15 in-depth chapters that covers the basics, as well as every important aspect of PLCs. Each topic is written in a modular style that allows that each subject be covered thoroughly and in one place.

These latter chapters are like books in themselves. This book provides the most comprehensive, practical, and easy to understand source on the subject of PLCs. The answers to the many questions readers have regarding system design, programming, Implementation, startup, and maintenance will be made crystal clear! The text's extensive review questions at the end of each chapter and over 40 hands-on lab manual exercises give students the tools to learn the topic at hand. This book covers introduction of programmable logic controllers with basic to advance ladder programming techniques.

The main objective of this book is to bridge the gap between theory and practical implementation of PLC information and knowledge. In this book, you will get an overview of practical PLC programming for beginner to intermediate level user chapter 1 is introduction to history and types of PLCs.

Chapter 2 introduce how relay logic can be converted into PLC logic. Chapter 3 introducing plc ladder programming logic, jump, call and subroutines. Chapter 5 explains data handling and advance logic programming techniques commonly use in practical plc programming.

Chapter 6 introducing analog programming and chapter 7 gives introduction of different languages used for plc programming. This books contains ladder diagrams, tables, and examples to help and explain the topics.

Download Programmable Logic Controllers books , Rapid technological advances have made the PLC an important part of many industries, from petrochemicals to food production.



0コメント

  • 1000 / 1000