You are on page 1of 12

ExpS Industrial Automation rev0.

docx

CARLETON UNIVERSITY


Department of Mechanical and Aerospace Engineering



MAAE 3901



Experiment No.: S


Title: Industrial Automation Using Programmable Logic
Controllers


Owner: Professor M. Ahmadi


Equipment: Small-scale assembly machine, Personal Computer
with PLC software


Location of Equipment: 3103 CB


ExpS Industrial Automation rev0.docx

1.0 Introduction

A large portion of industrial automation is based on logic operations where most signals
have either an ON or OFF state. For example, turning a heater ON (state 1) or OFF (state
0), depending on the temperature being higher or lower than a desired value, is a logic
control. Until the development of the electromechanical relays in the late 19
th
century
most of automation was achieved through mechanical controls. Electromechanical relays,
which are electrical switches activated or deactivated through a small voltage across a
solenoid, allowed engineers to introduce digital (binary) logic into industrial control in a
much simpler fashion. The output of a relay, for example, can be used to control an
electric motor, a heater, or any other actuator. Today, it is much simpler to implement
relays electronically using transistors or even develop complex logic via virtual (internal)
relays via programmable microprocessors.



Programmable Logic Controllers (PLCs) are microprocessor-based devices capable of
condensing the large inflexible relay logic panels (that are hard-wired) into a small,
rugged, and field-programmable box of relays. PLCs are commonly used on a wide
range of industrial settings from the automotive industry to food processing. Modern
PLCs are capable of executing closed-loop PID controls on continuous processes in
addition to logic controls. A PLC interacts with the controlled systems hardware sensors
and actuators via its input and output ports. It receives the sensor information such as the
state of a switch through its input ports, processes the information according to the
control logic stored in its memory, and then generates the required actions that will be
sent to the actuators through its output ports. The advantage of PLCs is the possibility to
modify the control program written in particular languages without having to rewire the
connections. PLCs are widely used in industry for the implementation of logic control
functions due to their ease of use.


2.0 Lab Objectives
The objectives of this laboratory exercise are as follows:

1. Provide a basic understanding of logics and their use in industrial automation;
2. Analyze a model factory assembly line, including sensors and actuators, and
determine the requirements of a logic based control strategy;
3. Determine the relay logic programming required to sort parts and assemble them
into widgets;
4. Implement the logic program using an Allen-Bradley Micrologix PLC; and
5. Successfully troubleshoot faults introduced in the system.

The laboratory TA will provide a tutorial on relay logic, and Allen-Bradley PLC
hardware/software.


ExpS Industrial Automation rev0.docx

3.0 Theory

3.1 Logic signals and operations
Logic signals take either a high value, represented by binary 1, or low value, represented
by value 0. For example, when a switch is closed, the light will be ON and when opened,
the light will be OFF corresponding to 1 and 0 logic states. This is the principle behind all
digital devices and computers where a bit is used to store a value of 1 or 0. Logic signals
can be combined through logical operations to create complex logic behaviors. The basic
logical operations include AND, OR, NOT, NAND, NOR, and XOR that take produce a
logical signal at the output based on the provided logical signals at their input. These
basic operations are also called combinational logic and are usually referred to as gates.
Figure 1 illustrates each gate in standard symbols.

AND: the output will be high (1) only if all inputs are high (1)
OR: the output is high (bit 1) if any of the inputs is high (bit 1)
INV: or a NOT gate negates the value of the input signal
NAND: combines the AND and NOT gates (not AND); output is low (0) only if
all inputs are high (1)
NOR: combines the OR and NOT gates (0); output is high (1) only if all of the
inputs is high (1)
XOR: the exclusive OR gate output is high (1) if only one of the inputs is high
(1);


Figure 1. Standard logic gates symbols
The following figure shows how two switches in series represent an AND gate whose
output is turning a light ON or OFF. On the left, two batteries provide the input voltage
(logical 1). The Truth Table illustrates all possible combinations of the inputs A and B
and the output C.

Figure 2. AND gate using switches

ExpS Industrial Automation rev0.docx

3.2 Relay Logic / Ladder Programming

Relays are switches that are made to change state (open/closed) when triggered by an
electrical signal; relays may be normally open or normally closed types. In 3.1 Logic
signals and operations, the concept of logic gates was presented in which the flow of
information was granted or restricted. Relays (or other switching devices) allow for the
physical realization of such logic circuitry.

If we examine the logic diagram as an electrical circuit we can make the following
observations about logic gates as illustrated in Figure 3.


Figure 3. The equivalency between relay and logic gates
Relay logic is expressed in the form of ladder logic diagrams which are also the basis for
the ladder logic programming language used in modern PLCs. The basic structure of a
ladder diagram is much like a climbing ladder with a left and right rail supporting some
number of rungs. The left rail can be interpreted as the electrical high and the right rail
as the low. In ladder programming, each rung contains a set of input and output logic
functions; the controller reads through this set of instructions from top to bottom
repeatedly performing the following tasks:

1. Input Scan: Read and store the current state of the system
2. Program Scan: Execute the ladder program, one rung at a time
3. Output Scan: Turn on/off output bits based on Step 2.
4. Housekeeping: Communicate with the PC and any other computations

There are four principal instructions used in ladder programming:

1. Examine If Closed (XIC): Will be an open circuit unless the associated input goes
high.
2. Examine If Open (XIO): Is the opposite of the XIC. The circuit is normally closed
unless the associated input is high.
ExpS Industrial Automation rev0.docx

3. Output (OTE): If the output symbol is on a closed circuit from the left rail to the
right rail, the associated output will be enabled (high).

Relay (XIC, or XIO) bits can either be real inputs received from sensors connected to
input ports/terminals of the PLC, or virtual (internal) bits toggled by real or virtual
outputs. The outputs can be virtual or be associated to physical output ports/terminals of
the PLC. Figure 4 illustrates the standard symbols used.


Figure 4. Four basic instructions in a ladder diagram

For example the ladder diagram in (a) is designed to allow the motor M1 (connected to
the physical output 1) to stay on as long as the manual toggle switch A is High and the
temperature sensor B (overheating sensor) is Low. In this case all of the instructions are
connected to their associated physical inputs and outputs. A logical AND is used with A
and B. As another example, Figure 5 (b), the pushbutton PB1 is used to turn on the motor
M1. The virtual output O1 is used to keep the motor on after pressing the button. As a
result of using an OR operation between PB1 and O1, we have created a memory for the
pushbutton.

Figure 5 (c) is another example of how one can generate an XOR operation of inputs In1
and In2 to enable the output O1.

ExpS Industrial Automation rev0.docx


Figure 5. Sample ladder diagrams to control electric motor M1

4.0 Problem Definition

It is often advantageous to automate repetitive tasks than to pay employees; although this
is true in general, it is certainly the case in the manufacturing industry. Petrochemical,
foodstuffs, automotive, and commercial producers all make use of programmable logic
controllers to improve product quality, and manufacturing efficiency. You are tasked
with the design and implementation of a programmable logic control system to perform
the following tasks in the manufacturing of a peg-disk assembly:

1. Part Sorting
2. Part Assembly
3. Part Quality Control

This laboratory exercise requires the independent development of RSLogix Ladder
Logic Software to control an Allen-Bradley Micrologix Programmable Logic Controller.
Although this may sound daunting at first, it is quite straightforward if you follow the
following procedure:

1. Understand your sensor and actuator infrastructure
2. Think about the task and logically plan a solution
3. Develop pseudo code to assist you in the development of your logic
4. Develop your RSLogix ladder code

The following sections briefly describes the sensor and actuator infrastructure, and key
features and stations of the model factory. A tutorial is also provided in Section 6.0 ,
ExpS Industrial Automation rev0.docx

covering the solution algorithm for Manufacturing Task 1: Part Sorting. Review this
document carefully; the TA will briefly review this algorithm, however it is assumed that
students will have familiarized themselves.


5.0 Apparatus

The Bytronic ICT3 Industrial Automation Simulator uses several sensors and actuators
that one might experience in an actual factory setting.

Inductive Proximity Sensor
Capacitive Proximity Sensor
Infra-red Fixed Focus Sensor
Infra-red Diffuse Scan Sensor
Fibre-optic Through-beam Sensor
Linear Solenoid
Rotary Solenoid
DC Motor

All sensors are binary and indicate the presence (or non-presence) of pegs and disks
and/or their assembly status, they do not tell you the material and absolute proximity of
the object. Accordingly, the sensors and actuators are grouped into stations corresponding
to the three manufacturing tasks.

ExpS Industrial Automation rev0.docx



Figure 6. ICT3 Industrial Control Simulator


5.1 Part Sorting Station

As the name implies this station is tasked with pushing disks into a hopper chute and
allow pegs to pass. The station consists of the following components:

Inductive Proximity Sensor (Allen-Bradley 872C-D4NP12-E2)
IR Fixed Focus Sensor (Allen-Bradley 42SMP-7021)
Inductive Proximity Sensor (Allen-Bradley 871C-DH4NP12-E2)(for solenoid)
Linear Solenoid

Development of the automation solution for this station will be covered in the tutorial
included with this report.

5.2 Part Assembly Station

This station is tasked with releasing disks from the assembly hopper onto a free peg; the
station consists of the following components:

ExpS Industrial Automation rev0.docx



IR Sensor (Allen-Bradley 42SMP -7021)
Rotary Solenoid

5.3 Quality Control Station

Correctly assembled parts are stored in an assembly hopper; good quality control should
ensure that ONLY correctly assembled parts make it to the hopper. The Quality Control
Station includes the following sensor/actuator hardware:

2 X Inductive Proximity Sensor (Allen-Bradley 872C-D4NP12-E2)
Fiber Optic Thru Beam Sensor (Allen-Bradley 42MF-7101)
Capacitive Sensor (Electromatic DR6GE)
Linear Solenoid
IR Diffuse Sensor (Allen-Bradley 42MP-7001)

The system is controlled using an Allen-Bradley MicroLogix PLC. A PLC is essentially a
Box of Relays. All hardware configuration and wiring has been completed prior to the
lab.

RSLogix is a ladder logic programming software developed by Allen-Bradley for use
with their PLC hardware. This laboratory exercise will require that students use RSLogix
for preparing their automation software. The following section will provide a brief
tutorial on RSLogix programming using the first of the three manufacturing tasks, Part
Sorting.

6.0 Tutorial

This section will describe the solution procedure and rationale following the four steps
described in Section 4.0 Problem Definition. This laboratory exercise doesn.t require a
precise step-by-step procedure for the student to follow; rather it is up to the student to
work within a set of guidelines to solve an engineering problem. The tutorial should
provide sufficient information and guidance for the student to complete analysis and
automation of the remaining two tasks.

It is expected that laboratory log books will contain solutions that follow a similar outline
to the procedure described below.

1. Understand Your Sensor and Actuator Hardware

The Part Sorting Station consists of 3 sensors and a single actuator; parts are
carried to the sorting station via a chain conveyor in no particular order.

Referring to Figure 6, two of the sensors are inductive proximity sensors and the
third is an IR fixed-focus sensor. All three sensors detect the presence of an
ExpS Industrial Automation rev0.docx

object; inductive sensors require that the object be in close proximity (distance is
dependant on the object material) and IR sensors are triggered when an object
passes through its beam.

Two of the sensors (one inductive and the IR) look at. the chain conveyor; the
third sensor is targeted at the linear solenoid. When activated the solenoid will
push any object in its way down a chute and the solenoid sensor will turn off (will
not detect an object).

2. Think About the Task and Logically Plan A Solution

What is the sorting station supposed to do? Well sort.

Disks and pegs will climb the chain conveyor in no particular order; there is no
robotic manipulator to manually pick up a disk and install it on a peg. The sorting
station must push disks down the assembly chute and allow pegs to pass so that they
my travel to the belt conveyor and on to the Part Assembly Station.

By analysis, we can note that only pegs will pass close enough to the inductive sensor
for the sensor to notice and send a signal; both disks and pegs will trigger the IR
sensor. So, logically, disks and pegs can be described by the following table (1 =On;
2 =Off):


Inductive Sensor IR Sensor
Disk 0 1
Peg 1 1

A linear solenoid provides an impact; it is either extended or it isn.t. After the
solenoid pushes a disk down the assembly chute it must be commanded to return
or it will deflect subsequent objects that pass along the chain conveyor.

3. Develop Pseudo Code

Pseudo code can be presented in point form; it represents the software commands
that will be programmed an easily understood text-based form.

Turn On Conveyor
If the inductive and IR sensors are ON then the part is a peg
If the inductive sensor is OFF and the IR sensor is ON, it is a disc
If the part is a peg do nothing
If the part is a disk trigger the solenoid
If the solenoid inductive sensor is on the solenoid has successfully actuated.
Hold for some time to ensure full solenoid stroke
De-activate the solenoid
If the solenoid inductive sensor is off the solenoid is de-energized
ExpS Industrial Automation rev0.docx





Thats it. This is all the logic that is required to sort pegs and disks.

4. Develop RSLogix Ladder Logic Program

RSLogix (Ladder Logic) is a graphical programming language; as described in the
theory section, there are only 4 kinds of blocks. that can be used.

For the purposes of this lab it will suffice for the student to develop the ladder code
using hand sketches; together with the TA, the student will develop the software in
RSLogix and transfer the program to the PLC and run the code.

7.0 Report Preparation and Analysis
Students shall consider the following guidelines when preparing their logbook entries for
this laboratory exercise; formal lab requirements are included as an appendix.

7.1 Pre-Lab

You must complete the Pre-Lab Assignment Questions and present them to the TA.

This is not a lab like many of the others in MAAE 3901, there is no strict procedure to
follow, no discrete data to collect and analyze, and concrete conclusions to reach. Rather,
this lab exercise presents students with the opportunity to learn a new skill and gain
experience with engineering problem solving and solution implementation. The pre-lab is
not difficult; most students have no prior experience with logic programming, control, or
industrial engineering. The following questions ensure that students have familiarized
themselves with the basic theory required to complete the lab exercise in the allotted
three hours.

1. Discuss the sensors and actuators that are used in this experiment and how they
work.
2. Show the truth table of an XOR gate. Express the output of XOR in terms of
inputs A, B.
3. Write the simplest Ladder program that uses two manual switches A and B in one
room to control a single light, for:
a. Both switches must be ON for the light to be ON.
b. Either Switch can be ON for the light to be ON.
c. Only one switch can be ON for the light to be ON.
4. Provide a detailed description of the automation requirements for the Bytronic
ICT3 factory simulator such that a PLC programmer without seeing the system
would be able to code the controller (for each Station)


ExpS Industrial Automation rev0.docx

7.2 Laboratory Exercises

The solution procedure for the first of the three automation tasks has been completed in
this report. During the laboratory period the TA will implement the ladder logic for the
solution of the Sorting Task as part of a brief tutorial. The TA will then discuss the logic
required for the Part Assembly Task; the lab group will work independently to develop
the ladder code. The third task will be completed independently (without direct guidance
from the TA).

It is expected that logbooks contain a solution procedure as was followed in the Sorting
Task example.

7.3 Post-Lab Analysis

Complete the following questions as part of the discussion section of your report.

1. Write a pseudo code or ladder logic for the logic controller developed
2. Explain what logical operations (i.e. AND, OR etc.) are used in your program
3. Explain why a timer block is used
4. How can the code be modified to prevent overfilling the disk overfilling
5. Pick three sensors/actuators that are used to control the industrial automation
simulator and describe what would happen if these sensors/actuators would fail.
6. What could be done to decrease the failed assembly rate without changing the
hardware?
7. What is the effect of the belt speed on the process? How is the belt speed control
done if the only command send out is to start or stop the system. With a more
advanced PLC, how can one control the speed of the belt?
8. Propose all the sensing and actuation needs if you are to expand this system to
perform a heat treatment on the parts at the end before a robot is made aware that
the part is ready to pick up. The heat treatment is done for a period of four
minutes. The robot is already programmed with the position of the parts in the
heating station and after receiving a command from PLC and knowing that the
part is still in place will start and finish its pick-and-place task before it goes to its
home position and tell the PLC that it is ready through a signal.

Useful Link

[1] http://www.asic-world.com/digital/tutorial.html

You might also like