UNIT 22: Programmable Logic Controllers – Assignment 1 Phil Bishop 1. Describe the design characteristics of a modular PLC, and compare it to unitary (brick) and software based PLCs. A modular PLC contains multiple modules or “cards” that can be compiled together to build a bespoke purpose made controller. Generally, a base module/card such as electrical power regulation, the computers processor and input connections. Other cards such as analog to digital converters. Also, more outputs can be added when required. This design means that the PLC can be modified and built easily. A common modular PLC unit is capable to handle between 23 and 40 inputs and outputs as standard. The number of connections can be increased by adding more cards, this gives lots of flexibility and range for software programs. A unitary (brick) PLC is a more simplistic type of controller, it contains all necessary system components like the processor in just one box that runs the software program (as well as ports for the input and output connections). Unitary PLCs are usually connected directly to the equipment it is controlling. A common unitary PLC unit includes built in memory for storing programs, 32 digital input/output ports and a communication port used in programming the unit. Memory Unitary PLCs are only capable of holding an (x) amount of information. This is because all necessary parts are kept in the single housing. Additionally, there isn’t much room for expanding information past the basic functions it requires to work. Modular PLCs have lots more memory and has the capability to keep higher volumes of information stored. I/O Modules The unitary PLC has limited input and output modules resulting in limited performance. Also, if the need to expand your operations at work the unitary PLC will be incapable of achieving this. Modular PLCs have the capacity to do more complex processes as you can just keep adding I/Os. The modular PLC was designed for the purpose of growth as you can expand and customize them. UNIT 22: Programmable Logic Controllers – Assignment 1 Phil Bishop Troubleshooting Even though Unitary PLCs do not alert the operator if there is a fault, leading to longer downtime and potential difficulties in fault finding. They are considerably cheaper to buy. Modular PLCs can easily troubleshoot problems and even keep some processes functioning when fixing the fault(s). in terms of longevity modular PLCs can help save money by reducing downtime and specifying faults. Interchangeability The cards used in Modular PLCs can be swapped and changed due to pluggable I/O cards. This gives great customizing capabilities, a diverse experience and the potential to create more complex processes than Unitary PLCs can. 2. Describe the internal architecture of a typical modular PLC. Include a description of the role of each component part and a diagram of how they interact with each other. Modular PLCS are adaptive systems that can be modified and interchanged easily. They consist of a chassis rail where a collective of modules/cards are built into an interfaced system. The components needed for a functioning system are, CPU, power supply and I/O modules. One of the main advantages of a Modular PLC is its architecture. It gives the user the ability to choose individual specifications as required. Such as, the quantity and type of the input/output cards and also you can include network interface cards. Modular PLCs are connected by a motherboard that has a comms link between all the cards, letting the CPU register where and what is connected. I/O modules can take out the need for wiring by networking process signals to digital communication links. Retrieving the data is done by the standard sensors and transmitters mounted in the module. Internal PLC architecture like processing power, memory consumption, I/O devices and current load will impact the system. The CPU inside the PLC is a microprocessor. The type of processor needed will depends on what design is implemented, like complex logic operations, local area network accessibility and user interface. Data is sent across the data bus in the back plane. Generally the process follows, scan starting, internal checks performed, scan inputs, execute program logic and then update outputs. UNIT 22: Programmable Logic Controllers – Assignment 1 Phil Bishop 3. Describe the CPU operation “mass I/O copying” At the start of each program cycle the CPU scans all the inputs and copies their status’ into the input and output addresses in random access memory. As the program is carried out the stored inputs data is read from the RAM, then the logic operations are performed. The resulting output signals are stored in a reserved area of the RAM. At the end of each cycle the outputs are transferred from the RAM to the channels and keep their status until the next update. Scan all inputs and copy into ram Fetch, decode and perform all program functions in sequence (copying output commands into RAM) Update all outputs Repeat Cycle UNIT 22: Programmable Logic Controllers – Assignment 1 Phil Bishop 4. The system can also be controlled by an embedded controller a. Briefly describe what a PIC controller is. b. Determine whether the current modular PLC or a PIC is the best option for their system. A PIC (Programmable Interface Controller) is similar to a PLC in which electronic circuit can be programmed to carry out a range of tasks. They are commonly found in devices such as computers, smart phones and alarms. They contain a processor and memory bank. Computer software is required to program PIC’s. Modular PLCs are industrial grade computers. PLCs are commonly powered by 240v domestic supply. PLCs accept inputs and give outputs which can be 24VDC for sensors and solenoids. Modular PLCs communicate to with each installed card and can even offer Ethernet capabilities. PLC inputs and outputs are usually protected reducing the possibility of damage or interference. PLCs are also very interchangeable and can be bought off the shelf and programmed. A PIC is a very small controller. This would require an adequate circuit build to suit the PIC to work similarly to that of a PLC. PICs also run off of low DC voltage and only capable of handling up to 20mA meaning you will need to step down supply voltage even further, this also means you cannot connect sensors or solenoids directly to the PIC. Due to the size of PICs they will be costly to have manufactured. For the purpose of running this system I would choose the current Modular PLC as it is more versatile to use and requires less preparations for the system to function effectively. The signals from the flow meter, temperature probes and drain solenoid can be sent and received directly to the PLC whereas it can’t with the PIC. UNIT 22: Programmable Logic Controllers – Assignment 1 Phil Bishop 5. Describe how the following devices measure or operate, and in each case state the correct IO card that will connect them to the PLC a. Temperature probe b. Flow meter c. Drain solenoid Temperature probes work by being placed in the proximity where the temperature needs to be recorded. The temperature is read by the change in resistance due to the resistance being affected by temperature (as the temperature changes the resistance increases/decreases). A formula is used to interpret the change in resistance to correlate with temperature. An Analogue IO card will be required to let the PLC convert the signal into a value. Flow meters are devices that measure the amount of liquid (or gas) that passes through them. The measurements can be calculated in periods of time or total volume (100l per minute or high/low flow). Magnets are used to cause a voltage signal that is picked up by the sensor, when the flow increases the voltage signal gets stronger, the signal is then converted into a figure representing flow rate. An Analogue IO card will also be needed for the flow meter as it works on a similar principle to the temperature probe Drain solenoids work by having an electromagnet as a housing for a magnetic plunger. Once a voltage is applied to the solenoid it activates the electromagnet pulling up the plunger, this plunger is mechanically connected to the drain valve forcing it to stay open until the voltage is removed. Only a Digital IO card will be required for the drain solenoid as all it needs is power to open the valve, it doesn’t need to convert any signals. 6. The flow meter will provide analogue signals to the PLC, but the diverter solenoid will only require a digital one. Explain why. The solenoid only requires a digital output because its function is very basic. Digital outputs only work one of two days, ON or OFF. If the valve needs to be open the output will be ON if the valve needs to be closed the output will be OFF. Analogue signals are variable, they can have different states. Analogue inputs are used for things like temperature or flow rate because the voltage received back is converted using formulae to represent a figure. Also analogue outputs can be used to actuate devices partially. UNIT 22: Programmable Logic Controllers – Assignment 1 Phil Bishop 7. The temperature probe will provide an analogue input to the PLC, assume the parameters have been set to measure -5 degrees and +105 degrees. a. Use a variable signal of your choice over 100ms, show the digital conversion using 2 bit resolution and 5ms sample rate. b. Using the same variable signal, show the digital conversion using 4 bit resolution and 5ms sample rate c. Comment on the differences between the two conversions mA 4-9 9 - 15 15 - 18 18 - 20 Temperature °C -5 31.6 68.2 105 2 Bit = 22 -5 to +105 = 110 = increments of 36.6 mA 4-5 5-6 6-7 7-8 8-9 9 - 10 10 - 11 11 - 12 12 - 13 13 - 14 14 - 15 15 - 16 16 - 17 17 - 18 18 - 19 19 - 20 Binary 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 Temperature °C -5 2.3 9.6 16.9 24.2 31.5 38.8 46.1 53.4 60.7 68 75.3 82.6 89.9 97.2 104.5 4 Bit = 42 -5 to +105 = 110 110 / 15 = increments of 7.3 The differences between these two conversions (shown on attached excel file) show that having a higher number of bits will provide more accurate readings of temperature. The change in potential difference in the sensor is affected by temperature, the more bits that are available mean that more changes in the potential difference can be measured, resulting in more accurate temperature readings. UNIT 22: Programmable Logic Controllers – Assignment 1 Phil Bishop 8. The flow meter has provided a range of values that have been stored by the PLC in a variety of different formats show below. Complete the following table (show your working for two different rows with different starting numbering systems). Decimal Binary Octal Hexadecimal 7 216 33 167 52 188 424 5 74 311 0111 11011000 0100001 10100111 00110100 10111100 0000000110101000 101 01001010 100110111 7 330 041 247 64 274 650 5 112 467 7 D8 21 A7 34 0bc 1a8 5 4a 137 Binary Coded Decimal 0111 0010 0001 0110 0011 0011 0001 0110 0111 0101 0010 0001 1000 1000 0100 0010 0100 0000 0000 0101 0111 0100 0011 0001 0001 UNIT 22: Programmable Logic Controllers – Assignment 1 Phil Bishop 9. Coaxial cable, twisted pair and optical fibre can all be used to form communication links. Describe how each one works and determine the best one to use to connect the cooling system to the main office. Coaxial cable is comprised of a single core conductor sheathed by a dielectric insulator, which is protected by a woven copper shield enclosed by an outer plastic shield. The cable is specifically designed like this with precise constant conductor spacing which is needed for it to function effectively. The electrical signal is conducted using the inner single core, the electromagnetic fields are restricted to the woven copper shield which pacifies interference. Twisted pair cable is a form of wiring where two conductors of the same circuit (but are carrying equal and opposite signals) are twisted together. Similarly to Coaxial cable, this is done to pacify the effects of electromagnetic interference. Optical Fibre cable contains several cores called “optical fibres” these cores are used to carry light. These cores are coated in plastic sheaths and enclosed in a tube suited to the environment it’s required to be in. the cable is manufactured for the purpose. For example, you can have one design of cable for high speed data transfer and a different design for telecommunications. I would choose a Coaxial cable for the purpose of connecting the cooling system to the main office because the design of the cable is a much more practical design for travelling through the environment it will be placed in. 60 meters is a reasonable distance for the cables to travel, excluding the twisted pair cables. This type of cable usually has a very small cross sectional area and is only used for local communications, as the cable needs to be travelling to the central PLC (although it is good as avoiding the interference induced by the electrically noise area). I feel that it is too small to travel 60 meters due to potential signal drops and vulnerability to physical damage. With the Optical Fibre cable, 20 meters of an electrically noisy area is more than capable of disturbing the efficiency and effectiveness of the cable. Also the environment may mean that the Optical Fibres are susceptible to dynamic fatigue as well as static fatigue. Although it offers the fastest data transfer the environment has to be correct for the cables capabilities to thrive. The Coaxial cable offers a large cross sectional area due to its layers of protection which make it ideal for travelling 60 meters to the main office. Additionally, these layers of protection will not only offer physical protection for the communications but also static protection, the woven sheath and plastic shield suppress electromagnetic interferences created by an electrically noisy environment. UNIT 22: Programmable Logic Controllers – Assignment 1 Phil Bishop 10. Assuming the communication cable is coaxial; describe which one of the following protocols would be suitable and why the others are not. a. RS232 b. IEE488 c. 20mA Current Loop I think that the 20mA current loop protocol is not suitable for this purpose because, although it has advantages such as immunity to electrical noise, this is only obtainable through being in a twisted pair circuit. Also for 20mA current loop connections to work an end to end DC continuity needs to be established, these connections cannot be made with cables such as multiplexed or fibre optics. This also means that the supply is not isolated from the output. Even though the 20mA current loop keeps the current stable, it is prone to voltage drops over long distances. Additionally the 20mA current loop protocol has high power consumption compared to other analogue signals. I feel that the IEE488 protocol is unsuitable for this purpose because of its intended purpose. This protocol is only used for short ranged connections, rendering it unsuitable for travelling the distance to the main office. Although you can have multiple instruments on a single bus, if you do not expand it this amount is limited due to the length of the connection (20m or 2x(number of devices) whichever is less). Additionally this protocol generally has low bandwidth meaning slow connection or response time and bulky connectors often resulting in poor cable reliability, which is essential for the main PLC. I think that the RS232 protocol is the most suitable for this purpose because of its popularity, most controllers will have this connection making connectivity easier. Additionally the use of Coaxial Cable will work with an RS232 protocol, even though it is intrinsically unbalanced the coax cable insulation will stop this. As this protocol is asynchronous there is no separate synchronizing signal, which means it will synchronize itself. Once this is achieved serial communications transmit one bit at a time (where as parallel transmission transmits all at once) because the serial transmission happens one bit at a time only a single cable is required, which is the configuration of coaxial cable. This type of data transfer is also preferable at long range, which makes it the most ideal protocol for connecting to the main office. UNIT 22: Programmable Logic Controllers – Assignment 1 Phil Bishop 11. Determine which of the following methods “master-slave” or “peer to peer” would be suitable. In networking master-slave is a type of communication protocol ford hardware devices in which one device has full control over one or more other devices. All controls are routed from the designated “master” and the “slaves” carry out the processes. Peer to peer is a decentralized communication protocol in which each device has the same capabilities as the other and either one can initiate communications. In this protocol the client makes a service request and the server carries this out. In this configuration the device can function as either the client or the server. Peer to peer method may be more resilient to failure than the master-slave method. If the master devices is somehow unavailable then the slaves do not receive command and stop their processes (a standby master would need to be put in place). If the master device receives a fault sent back by one of the slaves it should command all other slaves to stop their processes to prevent potential accident from happening. Both methods are credible and have attributes which may appeal more to certain requirements. If high availability is wanted then the peer to peer method may be best. But if all data is oversaw by a central device then the simpler master-slave method could be best. Due the central PLC in the main office is used to oversee the processes carried out by the other PLCs I feel that this is the exact purpose of the master-slave method. Each PLC will receive its command based on what is fed back to the master PLC, making the entire process work with each other smoothly via the master PLC. UNIT 22: Programmable Logic Controllers – Assignment 1 Phil Bishop 12. Describe why the networking standards ISO/OSI 7 Layer Model is useful to link all of the PLCs in the system. In the OSI 7 layer model, control is passed from one layer to the next, starting with the application layer, working its day to the bottom and back up again. The OSI 7 layer model takes on the role of inter-connecting networks and separates them into a “vertical stack” which consists of the 7 layers. - Physical Layer This layer passes the signal through the network at the electrical and mechanical level. It provides the hardware the means of sending and receiving the data via physical cables or cards, Ethernet or RS232. - Data Link Layer In this layer the data packets are encoded and decoded into bits. It furnishes transmission protocol knowledge as well as managing and handles errors in the physical layer, flow control and frame synchronization. - Network Layer This layer provides switching and routing technologies, creating logic paths for transmitting data from PLC to PLC as well as routing and traffic controlling paths. - Transport Layer This layer provides transparent data transfer and is responsible for error recovery and flow control ensuring the complete transfer of data. - Session Layer This layer creates, maintains and ends connection between applications. The session layer sets up, “conversations” “exchanges” and “dialogues” between applications. - Presentation Layer This layer provides independence from differences in how data has been represented by translating from application format to network format (and vice versa). This layer transforms data into a form that can be accepted (as well as encrypting data that is sent across a network, providing freedom from compatibility issues). - Application Layer This layer supports end-user processes. User identity and privacy are considered, communication partners and quality of service is identified as well as presentation layer issues (received encrypted data). Everything on this layer is application specific. UNIT 22: Programmable Logic Controllers – Assignment 1 Phil Bishop With each layer process identified and summarized it is clear to see why the ISO/OSI 7 Layer Method is useful to link all the PLCs in the system together. Each layer conducts a process which is essential for all the PLCs to function correctly. With receiving a signal on a mechanical/electrical level it means that a sensor has been triggered (regardless of whether to start or stop the process). This data is then sent through the connection and is identified resulting in control of its destination, as well as switching and routing to go to the correct PLC further supported by the Transport and Session layer. This is proving that the layers in this module are carrying out exactly what is needed to be established across all the PLCs as well as the Central PLC. Where data encryption, routing, security, signal receiving and commands are communicated appropriately across the whole network, keeping a healthy link across all the connections.