Professional Documents
Culture Documents
for the
Bytronic
Industrial Control Trainer
Version 3.15
The Courtyard
Reddicap Trading Estate
Sutton Coldfield
West Midlands
B75 7BU
ENGLAND
Tel : +44 (0121) 378 0613
Fax : +44 (0121) 311 1774
Email : mail@bytronic.co.uk
Website : http://www.bytronic.co.uk
Copyright
1996 Bytronic International Ltd. All Rights Reserved.
Documentation for the Bytronic Industrial Control Trainer Version 3.1
This manual, as well as the software described within, is furnished under
license and may only be used or copied in accordance with the terms of
such license. The content of this manual is furnished for information use
only, is subject to change without notice and should not be construed as a
commitment by Bytronic International Ltd. Bytronic International Ltd.
assumes no responsibility or liability for any errors or inaccuracies that
may appear in this manual.
Except as permitted by such license, no part of this publication may be
reproduced, stored in a retrieval system, or transmitted in any form or by
any means, electronic, mechanical, recording or otherwise, without prior
written permission of Bytronic International Ltd.
Bytronic acknowledges all copyrights and trademarks.
Important Note
The infra-red sensors on the Industrial Control Trainer have been
calibrated in factory lighting conditions. The lighting conditions in your
laboratory where the unit is to be used may differ and could cause
incorrect operation of the sensors. In this situation, simple re-calibration
of the signal conditioning board is required and will overcome any
problems.
The table below shows the list of sensors and their appropriate sensitivity
adjustment potentiometer.
Input
0
1
2
3
4
5
Function
IR Reflective at the assembly area
IR Reflective at the sort area
IR Reflective at the reject area
IR Reflective at the capacitive area
Metal peg detector on the chain conveyor
IR Through beam sensor on the belt conveyor
Adjust
VR6
VR5
VR4
VR3
VR2
VR1
Table of Contents
Table of Contents
Introduction .............................................................. 1.1
Getting Started ......................................................... 2.1
Connecting the ICT1 to a PC Compatible Microcomputer .........2.1
Connecting Procedure for the ICT1 to a PC ......................2.1
The PC Interactive Program...............................................2.3
Connecting the ICT1 to a Programmable Logic Controller ........2.4
ICT1 to PLC Connecting Procedure ..................................2.4
PLC Input / Output Wiring Details ....................................2.6
Analogue Connection Options.....................................................2.12
PC Analogue Motor Control ..............................................2.12
PLC Analogue Motor Control............................................2.12
Gauging Head Connections .........................................................2.13
PC Control..........................................................................2.13
PLC Control .......................................................................2.13
Table of Contents
Table of Contents
Table of Contents
Appendices
Appendix 1 : PLC Wiring Record ............................................ A1.1
Appendix 2 : Computer Header Configuration ........................ A2.1
Appendix 3 : ICT Standard Sensor Arrangement..................... A3.1
Inductive Sensor Set Up Procedure................................. A3.1
IR Through Beam Set Up Procedure............................... A3.2
Capacitive Sensor Set Up Procedure............................... A3.3
IR Reflective at Capacitive Area Set Up Procedure........ A3.3
IR Reflective at Reject Area Set Up Procedure .............. A3.3
Appendix 4 : Aluminium Peg Size Codes................................ A4.1
Table of Contents
Figures
2.1
2.2
2.3
2.4
2.5
2.6
2.7
2.8
2.9
2.10
2.11
3.1
3.2
3.3
3.4
3.5
3.6
3.7
4.2.1
4.2.2
4.2.3
4.2.4
4.2.5
4.2.6
4.2.7
4.2.8
4.2.9
4.2.10
4.2.11
4.2.12
4.3.1
4.3.2
4.3.3
4.3.4
4.3.5
4.3.6
4.3.7
4.3.8
4.3.9
4.3.10
4.3.11
4.3.12
Table of Contents
4.4.1
4.4.2
4.4.3
4.4.4
4.4.5
4.4.6
4.4.7
4.4.8
4.4.9
4.4.10
4.4.11
4.4.12
4.4.13
4.4.14
4.4.15
4.4.16
4.4.17
4.4.18
4.4.19
4.4.20
4.4.21
4.5.1
4.5.2
4.5.3
4.5.4
4.5.5
4.5.6
4.5.7
4.5.8
4.5.9
4.5.10
4.5.11
4.5.12
4.6.1
4.6.2
4.6.3
4.6.4
4.6.5
4.6.6
4.6.7
4.6.8
4.6.9
4.6.10
4.6.11
4.6.12
Table of Contents
4.7.1
4.7.2
4.7.3
4.7.4
4.7.5
4.7.6
4.7.7
4.7.8
4.7.9
4.7.10
4.7.11
4.7.12
5.1
6.1
6.2
6.3
6.4
6.5
8.1
8.2
8.3
8.4
8.5
8.6
9.1
9.2
9.3
9.4
A3.1
A3.2
A3.3
A3.4
Introduction
Introduction.
The Bytronic Industrial Control Trainer (ICT) has been specifically
designed to meet the requirements for teaching the control application of
both Programmable Logic Controllers (PLCs) and Microcomputers as
found in industry.
The system has been designed to realistically represent a component
sorting, assembly and inspection process that can be controlled from
virtually any PLC that is commonly available. A unique, built-in
interface also allows the unit to be easily interfaced to a Microcomputer.
In principle, the unit is designed to sort an aluminium 'peg' from a plastic
'ring' then assemble these two components and check for correct
assembly. The components are initially randomly placed on the chain
conveyor which lifts them to a higher level. When the higher level is
reached the plastic components are detected by an infra red sensor and
ejected by a solenoid down an assembly chute. The aluminium pegs,
meanwhile, continue on the conveyor and are finally deflected down the
feeder chute. From the feeder chute the aluminium components are
automatically fed onto the belt conveyor. An infra red sensor is used to
determine whether or not the plastic ring 'hopper' is empty. If it is, a
rotary solenoid is used to dispense a ring from the assembly chute into
the hopper. The hopper is positioned just above the belt conveyor and,
when the aluminium peg passes, the peg engages with hole in the ring
and the two are thus assembled. Inductive, capacitive and infra red
industrial sensors positioned along the belt conveyor are used to check
for correct assembly. Components that have not been assembled are
ejected by a solenoid into a 'scrap' or 'recycle' bin while correctly
assembled components pass into a finished parts tray.
The electronic control circuits for the unit are easily accessible in the
form of three fully labelled printed circuit boards. Switched fault
facilities are provided which allow various common faults to be applied
to the system which the student can identify using standard test
equipment.
The following sections in this manual give interfacing details, suggest
labworks that could be used, give full circuit details and explain the
operation of the switched faults.
1.1
Getting Started
Getting Started
A unique, built-in interface allows the Bytronic Industrial Control Trainer
(ICT1) to be easily and quickly interfaced to either a PLC or PC
Microcomputer. The details of these connections are discussed in the
following subsections.
MPIBM4
MPIBM6
Providing ......
3 x 8 bit TTL ports
3 x counter/timer channels
3 x 8 bit TTL ports
3 x counter/timers
8 x 8/12 bit ADC
2 x 12 bit DAC
3 x 8 bit TTL ports
3 x counter/timers
16 x 8/12 bit ADC
2 x 12 bit DAC
3 x 8 bit TTL ports
3 x counter/timers
8 x 8 bit ADC
2 x 8 bit DAC
If your Industrial Control Trainer is fitted with a Gauging Head, either the
MPIBM3, MPIBM4 or MPIBM6 are essential as these provide the
analogue input for the component dimension.
1.
2.
2.1
Getting Started
3.
4.
5.
6.
7.
8.
Run the PC interactive program. After the software has loaded, the
START/STOP may be released to start the ICT. The software may
now be used to demonstrate the ICT1.
In the event of incorrect operation, turn the power off, check connections
and re-test. If the problem persists, contact Bytronics Technical
Department.
2.2
Getting Started
2.3
2.
Mitsubishi F1
Mitsubishi FXo
Allen-Bradley SLC500
Allen-Bradley MicroLogix 1000
Siemens S5-90U
Siemens S7-200
3.
4.
5.
2.4
6.
Power up the PLC and the Industrial Control Trainer. Switch the
ICT Start/Stop to "START". On power up, all the inputs will be
"OFF" and the outputs will be under the control of the host PLC.
Test the interface by activating each input sensor and checking that
the signal appears on both the ICT Signal Conditioning Board and
the PLC input. Test the outputs by writing a simple program to
activate each output in turn.
7.
The solutions for all of the labworks listed are provided on disk for
the Mitsubishi FXo, Allen-Bradley SLC500, MicroLogix 1000 and
Siemens S5-90U, S7-200 series.
If any problems are encountered, turn all power off and re-check
connections and switch settings, finally re-test. If the problem persists,
contact Bytronics Technical Department for advice.
Sorts the metal pegs and plastic components travelling along the
chain conveyor.
ii. Assembles the rings onto the pegs using the rotary solenoid.
iii. Uses the sensors on the belt conveyor to detect the presence of
correctly assembled parts amongst a queue of components.
iv Activates the reject solenoid to eject unassembled components into
the reject bin.
The Allen-Bradley SLC500 and Siemens S5-90 packages will be
supplied with the enhancement of Labwork 7 which makes use of the
Run/Stop switch on the mounting frame control panel to start/stop
control of the ICT.
2.5
Note: When the Run/Stop switch is set to the stop position, the PLCs
control program is reset. Thus remove all components from the ICT.
When a Gauging Head pack has been purchased, the pre-loaded program
provided is the solution to the Gauging Head labwork 5 enhancement
which, in addition to the program detailed on the previous page, uses the
Gauging Head to determine the peg diameter of the correctly assembled
components travelling along the belt conveyor and uses the minimum and
maximum size potentiometers on the mounting frame control panel to
provide the acceptable tolerance band. Assembled components that
consist of a metal peg whose diameter is outside of the acceptable
tolerance band are rejected when they reach the reject area.
If you need to calibrate the Gauging Head, set the Run/Stop switch to the
stop position and use the Calibrate Gauging Head switch on the mounting
frame control panel to activate the calibration routine (the Enable
Switched Inputs switch will need to be set to the on position).
Once activated, the belt conveyor will start and Spare O/P 0 will be
energised indicating that the routine is ready to measure the 30mm peg.
Thus, place the 30mm peg on the belt conveyor before the Gauging Head.
When the peg has been measured, Spare O/P 0 will turn off and Spare
O/P 1 will be energised to indicate that the routine is ready to measure the
32.5mm peg. Place the 32.5mm peg on the belt conveyor before the
Gauging Head. When the peg has been measured, Spare O/P 1 will turn
off and the belt conveyor will stop indicating that the calibration routine
is complete. (Note that this routine will update the values held within the
PLC and cannot alter those values stored in the EPROM. Thus, if the
EPROM contents are copied into the PLCs memory, these new
calibration values will be overwritten).
Once the calibration routine is complete, return both the Calibrate
Gauging Head switch and the Enable Switched Inputs switch to the off
positions. The Run/Stop switch can now be used to activate control of the
ICT and Gauging Head with the new constants.
2.6
Function
Pin
Red
S1
Orange
S2
Orange/Black
S3
Red/White
S4
Blue/White
S5
Green/Black
S6
Black/White
S7
White/Black
S8
Pin
Function
MPCT7
Cable
Colour
S9
GND
Black
S10
GND
Green
S11
Red/Black
S12
Blue/Black
S13
S14
Green/White
S15
White
Blue
This diagram shows the connector on the MPCT7 cable and NOT the
PCB connector pin out.
Note: The 24V dc supply from the PLC should be connected to terminal
S3. When connected to the ICT1 this same voltage will then be
connected to pins S1 and S2 which should be used as a common
supply for the PLC outputs.
For example, wiring the first two outputs to a PLC with relay outputs.
2.7
MPCT7
Cable
Colour
Function
Pin
Brown
P9
Blue
P10
Yellow/Red
P11
P12
Pin
Function
MPCT7
Cable
Colour
P1
GND
Black
P2
Red
P3
Orange
P4
Red/Blue
Cyan
Purple
White
P5
Through Beam
Detect
Capacitive
I/P 3 :
Area Detect
I/P 5 :
P13
P6
P14
P7
P15
P8
Gauging Head
I/P 8 :
Area Detect
Capacitive
I/P 6 :
Sensor
I/P 4 : Metal Peg Detect
Reject Area
I/P 2 :
Detect
Assembly
I/P 0 :
Hopper Full
Green/Red
Grey
Pink
Green
Yellow
This diagram shows the connector on the MPCT7 cable and NOT the
PCB connector pin out.
Note: The 24V dc supply from the PLC should be connected to terminal
P9. This is used as the common voltage for all of the inputs.
When an input is actuated, this voltage will be switched onto the
input terminal.
For example, wiring the first two inputs of a dc input PLC. Any spare
inputs on your PLC may be used up by connecting switches as switch x.
2.8
S9, S10, P1
S3
P9
P15
See manufacturers
instructions for mains
wiring details
N1
P8
P14
P7
P13
P6
P12
P5
Spare Inputs
N2
24V Run 0V 400 401 402 403 404 405 406 407 410 411 412 413
431
432
433
434
435
436
437
S1, S2
S8
S15
S7
S14
S6
P15
P8
External
24V Power
Supply
24V 0V
S/S
X0
P14
P7
X1
X2
P13
P6
X3
X4
P12
P5
X5
X6
X7
Y4
Y5
MITSUBISHI FXo-14MR-DS
S8
S1, S2
S15
Y3
S7
S6
S14
2.9
S1, S2
S8
S15
S7
S14
S6
DIGITAL OUTPUTS
VAC
PWR
NEUT +24VDC
EARTH
GND
PWR
COM
DC
COM
DC
COM
IN5
IN7
IN0
HSC
IN2
IN4
IN6
P8
P7
P6
P5
P1
See manufacturers
instructions for mains
wiring details
IN3
IN1
S3, P9
P15
P14
P13
IN9
IN8
IN11
IN10
P12
OV
P15
P8
com I/0
P14
P13
P7
P6
I/2
P12
P5
I/8
I/9
Vdc O/0 Vdc O/1 Vdc O/2 Vdc O/3 Vdc 0/4
0/5
I/1
I/5
I/6
I/7
24V 0V
External
24V Power
Supply
S8
S3, P9
S15
S7
S14
S6
S1, S2
2.10
S9, S10, P1
S3, P9
P15
See manufacturers
instructions for mains
wiring details
N1
N2
P8
24V 0V
P14
P7
P13
P12
P6
P5
32.0 32.1 32.2 32.3 32.4 32.5 32.6 32.7 33.0 33.1
SIEMENS S5-90U
32.0
32.1
32.2
32.3
32.4
32.5
S1, S2
S8
S15
S7
S14
S6
External
24V Power
Supply
S1, S2
S15
S8
L+
0.0
S6
S7
0.1
S14
0.2
0.3
0.4
S3, P9
0.5
L+
0V 24V
1M
0.0
0.1
P8
0.2
0.3
P7
P15
2M
0.4
0.5
P6
P14
0.6
0.7
L+
P5
P13
P12
P1
2.11
2.12
Chain Conveyor
PLC Output No.
Capacitive Sensor
PLC Input No.
Reject Solenoid
PLC Output No.
Rotary Solenoid
PLC Output No.
Inductive Sensor
PLC Input No.
Belt Conveyor
PLC Output No.
Sort Solenoid
PLC Output No.
2.13
PC Control.
As the Gauging Head provides an analogue signal, a Bytronic MPIBM3,
MPIBM4 or MPIBM6 PC interface card must be used. When you
connect the 40 way MPCT4 cable between the Bytronic PC interface card
and the ICT, the Gauging Head solenoid clamp action control signal is
connected to Port A bit 5. As there are no spare digital inputs left on the
interface card, the digital input signal from the component present sensor
is connected via the 26 way IDC connector to analogue input channel 1 of
the ADC. The analogue dimension feedback is also connected via the 26
way IDC connector to analogue input channel 0 of the ADC. The PC
interactive program allows you to demonstrate the use of the Gauging
Head by selecting software option F5.
PLC Control.
PLC connection to the 3 Gauging Head control signals is made via the
D type connectors on the ICT interface and can be achieved by using
the Bytronic MPCT8 connecting lead set. This lead set contains the two
leads as supplied with an MPCT7 set and an additional analogue lead
which plugs onto the 9 way D socket. Refer to figures 2.2 and 2.3
shown earlier in this section for the digital connections. Figure 2.11 on
the following page shows the analogue connections.
2.14
MPCT8
Cable
Colour
Function
Pin
P6
White
IN 1 : Not Used
P7
Purple
IN 3 : Not Used
P8
Cyan
IN 5 : Not Used
P9
Pin
P1
Orange
P2
Function
OUT 0 : Analogue
Motor Control
IN 0 : Gauging Head
Dimension
MPCT8
Cable
Colour
Red
Yellow
P3
IN 2 : Not Used
Green
P4
IN 4 : Not Used
Pink
P5
IN 6 : Not Used
Black
The diagram shows the connector on the MPCT8 and NOT the PCB
connector pin out.
An example of connecting the analogue feedback signal to a PLC
analogue input module is shown below.
Analogue Input 0
P2
Analogue GND
P5
2.15
Universal Interface.
This interface allows the 'Bytronic' ICT to be connected to almost any
programmable controller or a microcomputer.
The board features are 1.
2.
3.
4.
5.
3.1
METHOD OF CONTROL
Power OP amp (L165)
Darlington - Relay
Transistor (TIP31A)
MOSFET (IRF510)
Transistor (TIP31A)
Darlington
DEVICE RATING
12v
200mA
12v
200mA
12v
650mA
12v
1A
12v
0.4A
3.2
Inductive Sensor
Capacitive Sensor
Infra Red (IR) Through Beam.
Infra Red (IR) Reflective Type
Inductive Sensor.
Inductive proximity switches consist of three stages, namely oscillators,
trigger, and output amplifier, as shown in figure 3.2 on the following
page. The oscillator generates a high frequency electromagnetic field
which radiates from the sensing face. As a metal target appears within
the sensing range, a change in the strength of magnetic field occurs. The
sensor is triggered and therefore the output is switched. The output
circuitry is generally available as either a)
b)
c)
NPN transistor
PNP transistor
NAMUR current output
3.3
100%
110%
90%
40%
35%
30%
The sensing tip style depends on the mounting method and the materials
in the vicinity of the sensor. A non screened tip as shown in figure 3.3
will give a greater range than screened as in figure 3.4. However a non
screened tip can pick up interference from surrounding metalwork.
3.4
Capacitive Sensor.
Capacitive proximity switches consist of 3 stages, namely a capacitance
coil, trigger, and output amplifier, as shown in figure 3.5 on the
following page. As a component passes the capacitive probe within the
sensing range it acts as the dielectric. The trigger circuitry is activated
and therefore the output is switched.
The output circuitry is generally available as either a)
b)
c)
NPN transistor
PNP transistor
NAMUR current output
3.5
Photoelectric Sensors.
Photoelectric sensors all have an emitter and receiver. The emitter
transmits a beam of infra red light, 8980-1770 nm wavelength. The
tuned receiver is either on or off depending on whether the emitted light
is being received or not.
Photoelectric sensors are used in 3 principle configurations a)
b)
c)
Through scan.
Retro reflective.
Diffuse.
3.6
1. Through Scan
2. Retro Reflective
3. Diffuse
3.7
Both the diffuse and through scan configurations are used on the
Industrial Control Trainer and an explanation of the operation follows.
The retro reflective principle is not used because it is most suited to the
detection of large objects over a long distance.
Infra Red Through Scan.
This is the most precise form of photoelectric sensor. The emitter
(TSUS5200) and receiver (BPW43) are separately mounted on a 'U'
bracket across the belt conveyor. With the pair of sensors used, a range
of up to 160mm may be achieved. However, more powerful units can
have a range up to 25m. As there are no switching point divergences
over the entire sensing area, through scan sensing is capable of high
accuracy and repeatability. The sensitivity of the receiver circuit may be
adjusted using VR1. The only slight disadvantage is that the system
requires a power supply to both the emitter and receiver.
Infra Red Reflective (Diffuse).
This type of sensor is the lowest cost photoelectric sensor. The type used
on the ICT comprises of a Gallium Arsenide infra red emitting diode
and a silicon photo-transistor. The general principle of the device is
shown in figure 3.7.
3.8
Labworks
Labworks.
To help you quickly integrate the Industrial Control Trainer into your
particular training course, we have carefully constructed a modular set of
labwork exercises that lead to the development of a complete control
program.
To satisfy the greatest audience, we have written labwork solutions for both
the IBM PC and a wide range of market leading programmable logic
controllers.
The following sub-sections give specific details :
Microcomputer Labworks
Allen-Bradley SLC500 and Micrologix 1000 series of PLCs
Mitsubishi F1 PLC
Mitsubishi FXo series of PLCs
Siemens S5 series of PLCs
Siemens S7-200 series of PLCs
Copies of all the labwork solutions are available on the accompanying
labworks disk.
4.1
Microcomputer Labworks
Microcomputer Labworks.
The following exercises, based around the Industrial Control Trainer, are
designed to be carried out using a PC microcomputer. The labworks are
graded in complexity and set in a modular form, leading to the
development of the complete control program. Solutions to the labworks
are provided in the form of program listings.
The following connections have been made to the PC.
PORT
BIT
0
1
2
3
4
5
6
7
0
1
2
3
4
5
6
7
0
1
2
3
4
5
6
7
FUNCTION
Sort Solenoid
Rotary Solenoid
Reject Solenoid
Chain Conveyor Motor
Belt Conveyor Motor
Spare O/P
Spare O/P
Spare O/P
IR Reflective at Assembly Area
IR Reflective at Sort Area
IR Reflective at Reject Area
IR Reflective at Capacitive Area
IR Reflective to Sense Metal Peg
IR Through Beam on Belt Conveyor
Capacitive Sensor
Inductive Sensor
LSB of Analogue Motor Control
Analogue Motor Control
Analogue Motor Control
Analogue Motor Control
Analogue Motor Control
Analogue Motor Control
Analogue Motor Control
MSB of Analogue Motor Control
4.2.1
Microcomputer Labwork 1
2.
Procedure
1.
2.
In the sort area there are two infra red (IR) proximity sensors,
namely a) Input sensor 1 : Proximity sensor at sort area.
b) Input sensor 4 : IR reflective sensor to sense the metal peg.
4.2.2
Microcomputer Labwork 1
Solution
A program listing solution for this labwork is given in figure 4.2.2.
4.2.3
Microcomputer Labwork 1
PortA = BaseAddress + 4
PortB = BaseAddress + 5
CONST False = 0
CONST True = NOT False
SortSensorOn = False
SortSolenoidOn = TIMER
OUT PortA, 8
DO
'***** Sort rings and pegs on chain conveyor *****
IF (INP(PortB) AND 2) = 2 AND SortSensorOn = False THEN
'Detect the rising edge of the sort area detect signal
SortSensorOn = True
IF (INP(PortB) AND 16) <> 16 THEN
'Component is not a metal peg
SortSolenoidOn = TIMER + .5
'Set the sort solenoid on time for 0.5 seconds
END IF
END IF
IF (INP(PortB) AND 2) <> 2 THEN SortSensorOn = False
'Reset edge detect variable when sort area clear.
IF TIMER < SortSolenoidOn THEN
OUT PortA, (INP(PortA) OR 1)
'Energise sort solenoid.
ELSE
OUT PortA, (INP(PortA) AND 254) 'De-energise sort solenoid.
END IF
LOOP UNTIL INKEY$ = " "
OUT PortA, 0
4.2.4
Microcomputer Labwork 2
(b). Ignore plastic rings at sort area, allowing them to pass on to the
excess bin at the end of the chain conveyor.
Procedure
1.
2.
3.
Solution
A program listing solution for this labwork is given in figure 4.2.3.
4.2.5
Microcomputer Labwork 2
PortA = BaseAddress + 4
PortB = BaseAddress + 5
CONST False = 0
CONST True = NOT False
SortSensorOn = False
SortSolenoidOn = TIMER
QueueCount% = 0
OUT PortA, 8
DO
'***** Sort rings and pegs on chain conveyor *****
IF (INP(PortB) AND 2) = 2 AND SortSensorOn = False THEN
'Detect the rising edge of the sort area detect signal
SortSensorOn = True
IF (INP(PortB) AND 16) <> 16 THEN
'Component is not a metal peg
IF QueueCount% < 5 THEN
'Activate solenoid when queue count is less than 5.
SortSolenoidOn = TIMER + .5
'Set the sort solenoid on time for 0.5 seconds
QueueCount% = QueueCount% + 1 'Increment ring queue count
END IF
END IF
END IF
IF (INP(PortB) AND 2) <> 2 THEN SortSensorOn = False
'Reset edge detect variable when sort area clear.
IF TIMER < SortSolenoidOn THEN
OUT PortA, (INP(PortA) OR 1)
ELSE
OUT PortA, (INP(PortA) AND 254)
END IF
OUT PortA, 0
4.2.6
Microcomputer Labwork 3
2.
3.
Procedure
1.
2.
Activate the belt conveyor so that the pegs will travel along the belt
conveyor, picking up the ring waiting in the assembly hopper on the
way.
3.
Sort the metal pegs from the plastic rings using sensors 1 and 4 as
done in Labwork 1.
4.
5.
4.2.7
Microcomputer Labwork 3
I/P PB1
SORT SENSOR
I/P PB4
METAL PEG
O/P PA 0
SORT SOLENOID
O/P PA1
ROTARY SOLENOID
HOPPER FULL
I/P PB0
ASSSEMBLY AREA FULL
QUEUE COUNT:
0 1
Note: Time delays need to be built into the program in the following
areas a)
'Hold on' time of rotary solenoid to allow the ring to fall into the
assembly hopper.
b)
When there are no plastic rings in the queue and the assembly
hopper is empty, a time delay must be incorporated to allow for a
sorted ring to settle against the index cam.
c)
Areas B and C above can be incorporated into one timer by following the
statement: If the assembly hopper is empty and there are rings in the
queue, wait for 2 seconds before activating the rotary solenoid.
Solution
A program listing solution for this labwork is given in figure 4.2.5.
4.2.8
Microcomputer Labwork 3
PortA = BaseAddress + 4
PortB = BaseAddress + 5
CONST False = 0
CONST True = NOT False
SortSensorOn = False
SortSolenoidOn = TIMER
QueueCount% = 0
DispenseDelay = TIMER
HopperEmpty = False
RingDispensed = False
RotarySolenoidOn = TIMER
OUT PortA, 24
DO
'***** Sort rings and pegs on chain conveyor *****
IF (INP(PortB) AND 2) = 2 AND SortSensorOn = False THEN
'Detect the rising edge of the sort area detect signal
SortSensorOn = True
IF (INP(PortB) AND 16) <> 16 THEN
'Component is not a metal peg
IF QueueCount% < 5 THEN
'Activate solenoid when queue count is less than 5.
SortSolenoidOn = TIMER + .5
'Set the sort solenoid on time for 0.5 seconds
QueueCount% = QueueCount% + 1 'Increment ring queue count
END IF
END IF
END IF
IF (INP(PortB) AND 2) <> 2 THEN SortSensorOn = False
'Reset edge detect variable when sort area clear.
IF TIMER < SortSolenoidOn THEN
OUT PortA, INP(PortA) OR 1
ELSE
OUT PortA, INP(PortA) AND 254
END IF
4.2.9
Microcomputer Labwork 3
OUT PortA, 0
4.2.10
Microcomputer Labwork 4
Microcomputer Labwork 4:
Plastic Ring Detection and Sorting
Objective
The objective of this labwork is to combine the sorting & assembly area
loading routine developed in Labwork 3 together with a routine which, by
using the sensors situated along the belt conveyor, can detect the presence
of a single plastic ring and eject the ring into the reject bin.
Procedure
1.
2.
a)
b)
c)
d)
e)
4.2.11
Microcomputer Labwork 4
By logically gating the results from one pass of these sensors, the type of
object can be determined and therefore sorted / rejected. With the
standard pre-set arrangement of sensors the signal feedback sequence is
shown in figure 4.2.6.
I/P PB7
INDUCTIVE SENSOR
I/P PB5
IR THROUGH BEAM
I/P PB6
CAPACITIVE SENSOR
I/P PB3
IR AT CAPACTIVE AREA
I/P PB2
IR AT REJECT AREA
O/P PA2
REJECT SOLENOID
Figure 4.2.6. Sensor Signal Sequence for Plastic Ring.
Solution
A program listing solution for this labwork is given in figure 4.2.7.
Note: With this program only ONE component may be passed along the
belt conveyor at any one time. In reality, this is an unlikely situation. A
typical conveyor may have hundreds of components on the belt at any
one time. The problems associated with component queues are discussed
in Labwork 7.
4.2.12
Microcomputer Labwork 4
CONST False = 0
CONST True = NOT False
SortSensorOn = False
SortSolenoidOn = TIMER
QueueCount% = 0
DispenseDelay = TIMER
HopperEmpty = False
RingDispensed = False
RotarySolenoidOn = TIMER
PegPresent = False
RejectSensorOn = False
RejectSolenoidOn = TIMER
OUT PortA, 24
DO
'***** Sort rings and pegs on chain conveyor *****
IF (INP(PortB) AND 2) = 2 AND SortSensorOn = False THEN
'Detect the rising edge of the sort area detect signal
SortSensorOn = True
IF (INP(PortB) AND 16) <> 16 THEN
'Component is not a metal peg
IF QueueCount% < 5 THEN
'Activate solenoid when queue count is less than 5
SortSolenoidOn = TIMER + .5
'Set the sort solenoid on time for 0.5 seconds
QueueCount% = QueueCount% + 1 'Increment ring queue count
END IF
END IF
END IF
IF (INP(PortB) AND 2) <> 2 THEN SortSensorOn = False
'Reset edge detect variable when sort area clear
IF TIMER < SortSolenoidOn THEN
OUT PortA, INP(PortA) OR 1
ELSE
OUT PortA, INP(PortA) AND 254
END IF
4.2.13
Microcomputer Labwork 4
4.2.14
Microcomputer Labwork 5
Microcomputer Labwork 5:
Metal Component Detection and Sorting
Objective
The objective of this labwork is to combine the sorting and assembly area
loading routine developed in Labwork 3 together with a routine which, by
using the sensors situated along the belt conveyor, can detect the presence
of a single metal peg and eject the peg into the reject bin.
Procedure
1.
2.
I/P PB7
INDUCTIVE SENSOR
I/P PB5
IR THROUGH BEAM
I/P PB6
CAPACITIVE SENSOR
I/P PB3
IR AT CAPACTIVE AREA
I/P PB2
IR AT REJECT AREA
O/P PA2
REJECT SOLENOID
Figure 4.2.8. Sensor Signal Sequence for a Metal Component.
4.2.15
Microcomputer Labwork 5
Solution.
A program listing solution for this labwork is given in figure 4.2.9.
Note: With this program only ONE component may be passed along the
belt conveyor at any one time. In reality, this is an unlikely situation. A
typical conveyor may have hundreds of components on the belt at any
one time. The problems associated with component queues are discussed
in Labwork 7.
CONST False = 0
CONST True = NOT False
SortSensorOn = False
SortSolenoidOn = TIMER
QueueCount% = 0
DispenseDelay = TIMER
HopperEmpty = False
RingDispensed = False
RotarySolenoidOn = TIMER
PegPresent = False
RingAssembled = False
RejectSensorOn = False
RejectSolenoidOn = TIMER
OUT PortA, 24
DO
'***** Sort rings and pegs on chain conveyor *****
IF (INP(PortB) AND 2) = 2 AND SortSensorOn = False THEN
'Detect the rising edge of the sort area detect signal
SortSensorOn = True
IF (INP(PortB) AND 16) <> 16 THEN
'Component is not a metal peg
IF QueueCount% < 5 THEN
'Activate solenoid when queue count is less than 5
SortSolenoidOn = TIMER + .5
'Set the sort solenoid on time for 0.5 seconds
QueueCount% = QueueCount% + 1
'Increment ring queue count
END IF
END IF
END IF
IF (INP(PortB) AND 2) <> 2 THEN SortSensorOn = False
'Reset edge detect variable when sort area clear
IF TIMER < SortSolenoidOn THEN
OUT PortA, INP(PortA) OR 1
ELSE
OUT PortA, INP(PortA) AND 254
END IF
4.2.16
Microcomputer Labwork 5
4.2.17
Microcomputer Labwork 5
END IF
IF TIMER < RejectSolenoidOn THEN
OUT PortA, INP(PortA) OR 4
ELSE
OUT PortA, INP(PortA) AND 251
END IF
LOOP UNTIL INKEY$ = " "
OUT PortA, 0
4.2.18
Microcomputer Labwork 6
Microcomputer Labwork 6:
Component / Assembly Detection and Sorting
Objective
There are four objectives to Labwork 6.
1.
2.
3.
4.
Procedure
1.
2.
4.2.19
Microcomputer Labwork 6
Solution
A program listing solution for this labwork is given in figure 4.2.11.
Note: With this program only ONE component may be passed along the
belt conveyor at any one time. In reality, this is an unlikely situation. A
typical conveyor may have hundreds of components on the belt at any
one time. The problems associated with component queues are discussed
in Labwork 7.
4.2.20
Microcomputer Labwork 6
BaseAddress = 640
PortA = BaseAddress + 4
PortB = BaseAddress + 5
CONST False = 0
CONST True = NOT False
SortSensorOn = False
SortSolenoidOn = TIMER
QueueCount% = 0
DispenseDelay = TIMER
HopperEmpty = False
RingDispensed = False
RotarySolenoidOn = TIMER
PegPresent = False
RingAssembled = False
RejectSensorOn = False
RejectSolenoidOn = TIMER
OUT PortA, 24
DO
'***** Sort rings and pegs on chain conveyor *****
IF (INP(PortB) AND 2) = 2 AND SortSensorOn = False THEN
'Detect the rising edge of the sort area detect signal
SortSensorOn = True
IF (INP(PortB) AND 16) <> 16 THEN
'Component is not a metal peg
IF QueueCount% < 5 THEN
'Activate solenoid when queue count is less than 5
SortSolenoidOn = TIMER + .5
'Set the sort solenoid on time for 0.5 seconds
QueueCount% = QueueCount% + 1 'Increment ring queue count
END IF
END IF
END IF
IF (INP(PortB) AND 2) <> 2 THEN SortSensorOn = False
'Reset edge detect variable when sort area clear
4.2.21
Microcomputer Labwork 6
4.2.22
Microcomputer Labwork 6
RingAssembled = False
END IF
IF TIMER < RejectSolenoidOn THEN
OUT PortA, INP(PortA) OR 4
ELSE
OUT PortA, INP(PortA) AND 251
END IF
LOOP UNTIL INKEY$ = " "
OUT PortA, 0
4.2.23
Microcomputer Labwork 7
Microcomputer Labwork 7:
Component Queue Handling (complete system control)
Objective
The objective is to enhance the detection and sorting program developed
in Labwork 6 to deal with a queue of components travelling along the
belt conveyor and thus achieving complete system control. This being a
far more realistic situation in industry.
Procedure
In order to obtain data on a single product amongst a queue of products
one of the following approaches is required 1.
2.
Solution
A program listing solution for this labwork is given in figure 4.2.12.
4.2.24
Microcomputer Labwork 7
PortA = BaseAddress + 4
PortB = BaseAddress + 5
CONST False = 0
CONST True = NOT False
SortSensorOn = False
SortSolenoidOn = TIMER
QueueCount% = 0
DispenseDelay = TIMER
HopperEmpty = False
RingDispensed = False
RotarySolenoidOn = TIMER
InductiveData = 0
InductivePointer = 1
CapacitiveData = 0
CapacitivePointer = 1
InductiveSensorOn = False
ThruBeamSensorOn = False
CapacitiveSensorOn = False
CapacitiveAreaOn = False
AssembledComponent = False
RejectSensorOn = False
RejectSolenoidOn = TIMER
OUT PortA, 24
DO
'***** Sort rings and pegs on chain conveyor *****
IF (INP(PortB) AND 2) = 2 AND SortSensorOn = False THEN
'Detect the rising edge of the sort area detect signal
SortSensorOn = True
IF (INP(PortB) AND 16) <> 16 THEN
'Component is not a metal peg
IF QueueCount% < 5 THEN
'Activate solenoid when queue count is less than 5
SortSolenoidOn = TIMER + .5
'Set the sort solenoid on time for 0.5 seconds
QueueCount% = QueueCount% + 1 'Increment ring queue count
END IF
END IF
END IF
IF (INP(PortB) AND 2) <> 2 THEN SortSensorOn = False
'Reset edge detect variable when sort area clear
4.2.25
Microcomputer Labwork 7
HopperEmpty = True
DispenseDelay = TIMER + 2
'Wait for 2 seconds before dispensing a ring
END IF
END IF
IF HopperEmpty = True AND TIMER > DispenseDelay THEN
'When the hopper is empty and the 2 second delay is
'complete and a ring has not yet been dispensed,
'set the rotary solenoid on time for 0.5 seconds
IF RingDispensed = False THEN
RingDispensed = True
RotarySolenoidOn = TIMER + .5
QueueCount% = QueueCount% - 1
'Decrement the ring queue count
END IF
END IF
IF TIMER < RotarySolenoidOn THEN
OUT PortA, INP(PortA) OR 2
'Energise the rotary solenoid to dispense a ring
ELSE
OUT PortA, INP(PortA) AND 253
'De-energise the rotary solenoid
IF RingDispensed = True THEN
'Reset the dispensing variables when
RingDispensed = False
'a ring has been dispensed
HopperEmpty = False
END IF
END IF
'***** Metal peg detection on the belt conveyor *****
IF (INP(PortB) AND 128) = 128 THEN
'Detect the rising edge of the inductive sensor
'and log that a metal peg has been detected
IF InductiveSensorOn = False THEN
InductiveSensorOn = True
InductiveData = InductiveData + 1
END IF
ELSE
InductiveSensorOn = False
'Reset the edge detection variable
END IF
4.2.26
Microcomputer Labwork 7
CapacitiveSensorOn = False
END IF
4.2.27
Function
IR Reflective at the assembly area
IR Reflective at the sort area
IR Reflective at the reject area
IR Reflective at the capacitive area
IR Reflective to sense a metal peg at the sort area
IR Through beam sensor on the belt conveyor
Capacitive sensor
Inductive sensor
Function
Sort Solenoid
Rotary Solenoid
Reject Solenoid
Chain Conveyor
Belt Conveyor
There are no facilities to provide inputs to the PLC from the Start/Stop
and Emergency Stop push buttons.
4.3.1
2.
Procedure
1.
2.
In the sort area there are two infra red (IR) proximity sensors,
namely a) Input Sensor 1 : Proximity Sensor at sort area.
b) Input Sensor 4 : IR reflective sensor to sense the metal peg.
4.3.2
Solution
A ladder diagram solution for this labwork is given in figure 4.3.2.
4.3.3
Chain
Conveyor
O:0
( )
Rung 2:1
Energise B3/0 on the rising edge of the sort area detect signal to indicate
that a component has been detected. This is necessary so that the component
will not be detected more than once.
Sort Area
Component
Detect
Detected
I:0
B3
B3
] [[OSR]( )
1
20
0
Rung 2:2
If the component in the sort area is a plastic ring (ie. not a metal peg),
operate the sort solenoid for 0.5 seconds to push the ring down the chute.
Detected Detect
Solenoid
B3
I:0
T4:0
O:0
] []/[]/[( )
0
4
DN
Activate
Sort
output for
Solenoid
0.5 secs
O:0
TON
] [
TIMER ON DELAY
(EN)
0
Timer
T4:0(DN)
Time Base
0.01
Preset
50
Accum
0
Rung 2:3
END
4.3.4
(b). Ignore plastic rings at sort area, allowing them to pass on to the
excess bin at the end of the chain conveyor.
Procedure
1.
2.
3.
Solutions
A ladder diagram for this labwork is given in figure 4.3.3.
4.3.5
Bit
Counter
S:1
C5:0
] [(RES)
15
Rung 2:1
Run the chain conveyor motor.
Chain
Conveyor
O:0
( )
Rung 2:2
Energise B3/0 on the rising edge of the sort area detect signal to indicate
that a component has been detected. This is necessary so that the component
will not be detected more than once.
Sort Area
Component
Detect
Detected
I:0
B3
B3
] [[OSR]( )
1
20
0
Rung 2:3
if the component in the sort area is a plastic ring (ie. not a metal peg) and
the chute is not full (counter 5:0 not reached preset, C5:0/DN = False),
operate the sort solenoid for 0.5 seconds to push the ring down the chute.
Detected Detect
Full
Solenoid
B3
I:0
C5:0
T4:0
O:0
] []/[]/[]/[( )
0
4
DN
DN
Activate
Sort
output for
Solenoid
0.5 secs
O:0
TON
] [
TIMER ON DELAY
(EN)
0
Timer
T4:0(DN)
Time Base
0.01
Preset
50
Accum
0
Rung 2:4
Increment the ring queue counter when the sort solenoid is activated. The
counter preset is set to 5 to represent the maximum number of rings that will
fit into the chute. When the count reaches the preset value, the counter DN
signal becomes true and is used to disable the sort solenoid.
Sort
Queue
Solenoid
Counter
O:0
CTU
] [COUNT UP
(CU)
0
Counter
C5:0(DN)
Preset
5
Accum
5
Rung 2:5
END
4.3.6
2.
3.
Procedure
1.
2.
Activate the belt conveyor so that the pegs will travel along the belt
conveyor, picking up the ring waiting in the assembly hopper on the
way.
3.
4.
5.
4.3.7
INPUT 1
SORT SENSOR
INPUT 4
METAL PEG
0.3s (PLC PROGRAM)
OUTPUT 0
SORT SOLENOID
0.6s
OUTPUT 1
ROTARY SOLENOID
(PLC PROGRAM)
HOPPER FULL
INPUT 0
ASSSEMBLY AREA FULL
QUEUE COUNT:
0 1
Note: Timing delays need to be built into the program in the following
areas a)
'Hold on' time of the rotary solenoid to allow the ring to fall into the
assembly hopper.
b)
When there are no plastic rings in the queue and the assembly
hopper is empty, a time delay must be incorporated to allow for a
sorted ring to settle against the index cam.
c)
Areas B and C above can be incorporated into one timer by following the
statement: If the assembly hopper is empty and there are rings in the
queue, wait for 2 seconds before activating the rotary solenoid.
Solution
A ladder diagram solution for this labwork is given in figure 4.3.5.
4.3.8
Bit
Counter
S:1
C5:0
] [(RES)
15
Rung 2:1
Activate both the chain conveyor and belt conveyor motors.
Chain
Conveyor
O:0
( )
Belt
Conveyor
O:0
( )
Rung 2:2
Energise B3/0 on the rising edge of the sort area detect signal to indicate
that a component has been detected. This is necessary so that the component
will not be detected more than once.
Sort Area
Component
Detect
Detected
I:0
B3
B3
] [[OSR]( )
1
20
0
Rung 2:3
If the component in the sort area is a plastic ring (ie. not a metal peg) and
the chute is not full (counter 5:0 not reached preset, C5:0/DN = False),
operate the sort solenoid for 0.5 seconds to push the ring down the chute.
Detected Detect
Full
Solenoid
B3
I:0
C5:0
T4:0
O:0
] []/[]/[]/[( )
0
4
DN
DN
Activate
Sort
output for
Solenoid
0.5 secs
O:0
TON
] [
TIMER ON DELAY
(EN)
0
Timer
T4:0(DN)
Time Base
0.01
Preset
50
Accum
0
Rung 2:4
Increment the ring queue counter when the sort solenoid is activated. The
counter preset is set to 5 to represent the maximum number of rings that will
fit into the chute. When the count reaches the preset value, the counter DN
signal becomes true and is used to disable the sort solenoid.
Sort
Queue
Solenoid
Counter
O:0
CTU
] [COUNT UP
(CU)
0
Counter
C5:0(DN)
Preset
5
Accum
1
4.3.9
Rung 2:5
If the assembly hopper is empty and the ring queue count is greater than 0,
initialise a timer to give a 2 second delay before activating the rotary
solenoid. The timer acts as a delay to allow the first ring in the chute to
settle correctly against the index cam and also as a delay to allow an
assembled component to clear the assembly area.
Assembly
Dispense
Area Full
Delay
I:0
GRT
TON
]/[GREATER THAN
TIMER ON DELAY
(EN)
0
Source A C5:0.ACC
Timer
T4:1(DN)
1
Time Base
0.01
Source B
0
Preset
200
Accum
0
Rung 2:6
Operate the rotary solenoid for 0.5 seconds to dispense a ring into the
assembly hopper when the dispense delay timer is complete (T4:1/DN = TRUE).
Dispense
Rotary
Delay
Solenoid
T4:1
T4:2
O:0
] []/[( )
DN
DN
Activate
Rotary
output for
Solenoid
0.5 secs
O:0
TON
] [
TIMER ON DELAY
(EN)
1
Timer
T4:2(DN)
Time Base
0.01
Preset
50
Accum
0
Rung 2:7
Decrement the ring queue counter when the rotary solenoid is activated.
Rotary
Queue
Solenoid
Counter
O:0
CTD
] [COUNT DOWN
(CD)
1
Counter
C5:0(DN)
Preset
5
Accum
1
Rung 2:8
END
4.3.10
Allen-Bradley Labwork 4:
Plastic Ring Detection and Sorting
Objective
The objective of this labwork is to combine the sorting & assembly area
loading routine developed in Labwork 3 together with a routine which, by
using the sensors situated along the belt conveyor, can detect the presence
of a single plastic ring and eject the ring into the reject bin.
Procedure
1.
2.
a)
b)
c)
d)
e)
4.3.11
By logically gating the results from one pass of these sensors, the type of
object can be determined and therefore sorted / rejected. With the
standard pre-set arrangement of sensors the signal feedback sequence is
shown in figure 4.3.6.
INPUT 7
INDUCTIVE SENSOR
INPUT 5
IR THROUGH BEAM
INPUT 6
CAPACITIVE SENSOR
INPUT 3
IR AT CAPACTIVE AREA
INPUT 2
IR AT REJECT AREA
OUTPUT 2
REJECT SOLENOID
Figure 4.3.6. Sensor Signal Sequence for a Plastic Ring
Solution
A ladder diagram solution for this labwork is given in figure 4.3.7.
Note: With this program only ONE component may be passed along the
belt conveyor at any one time. In reality this is an unlikely situation. A
typical conveyor may have hundreds of components on the belt at any
one time. The problems associated with component queues are discussed
in Labwork 7.
4.3.12
Bit
Counter
S:1
C5:0
] [(RES)
15
Metal Peg
Present
B3
(U)
Rung 2:1
Activate both the chain and belt conveyors.
Chain
Conveyor
O:0
( )
Belt
Conveyor
O:0
( )
Rung 2:2
Energise B3/0 on the rising edge of the sort area detect signal to indicate
that a component has been detected. This is necessary so that the component
will not be detected more than once.
Sort Area Rising
Component
Detect
Edge
Detected
Detect
I:0
B3
B3
] [[OSR]( )
1
20
0
Rung 2:3
If the component in the sort area is a plastic ring (ie. not a metal peg) and
the chute is not full (counter 5:0 not reached preset, c5:0/DN = False),
operate the sort solenoid for 0.5 seconds to push the ring down the chute.
Detected Detect
Full
Solenoid
B3
I:0
C5:0
T4:0
O:0
] []/[]/[]/[( )
0
4
DN
DN
Activate
Sort
output for
Solenoid
0.5 secs
O:0
TON
] [
TIMER ON DELAY
(EN)
0
Timer
T4:0(DN)
Time Base
0.01
Preset
50
Accum
0
4.3.13
Rung 2:4
Increment the ring queue counter when the sort solenoid is activated. The
counter preset is set to 5 to represent the maximum number of rings that will
fit into the chute. When the count reaches the preset value, the counter DN
signal becomes true and is used to disable the sort solenoid.
Sort
Queue
Solenoid
Counter
O:0
CTU
] [COUNT UP
(CU)
0
Counter
C5:0(DN)
Preset
5
Accum
0
Rung 2:5
If the assembly hopper is empty and the ring queue count is greater then 0,
initialise a timer to give a 2 second delay before activating the rotary
solenoid. The timer acts as a delay to allow the first ring in the chute to
settle correctly against the index cam and also as a delay to allow an
assembled component to clear the assembly area.
Assembly
Dispense
Area Full
Delay
I:0
GRT
TON
]/[GREATER THAN
TIMER ON DELAY
(EN)
0
Source A C5:0.ACC
Timer
T4:1(DN)
0
Time Base
0.01
Source B
0
Preset
200
Accum
0
Rung 2:6
Operate the rotary solenoid for 0.5 seconds to dispense a ring into the
assembly hopper when the dispense delay timer is complete (T4:1/DN = True).
Dispense
Rotary
Delay
Solenoid
T4:1
T4:2
O:0
] []/[( )
DN
DN
Activate
Rotary
output for
Solenoid
0.5 secs.
O:0
TON
] [
TIMER ON DELAY
(EN)
1
Timer
T4:2(DN)
Time Base
0.01
Preset
50
Accum
0
Rung 2:7
Decrement the ring queue counter when the rotary solenoid is activated.
Rotary
Queue
Solenoid
Counter
O:0
CTD
] [COUNT DOWN
(CD)
1
Counter
C5:0(DN)
Preset
5
Accum
0
Rung 2:8
Latch B3/1 when a metal peg is detected on the belt conveyor so that the
component will not be rejected.
Inductive
Metal Peg
Sensor
Present
I:0
B3
] [(L)
7
1
4.3.14
Rung 2:9
When a plastic ring is detected at the reject area, activate the reject
solenoid for 0.5 seconds to push the ring off the belt conveyor and into the
red bin (rejected).
Area
Present
Solenoid
Detect
I:0
B3
T4:3
O:0
] []/[]/[( )
2
1
DN
Actiavte
Reject
output for
Solenoid
0.5 secs.
O:0
TON
] [
TIMER ON DELAY
(EN)
2
Timer
T4:3(DN)
Time Base
0.01
Preset
50
Accum
0
Rung 2:10
Unlatch the metal peg present register when the component has left the reject
area.
Reject Falling
Metal Peg
Area
Edge
Present
Detect Detect
I:0
B3
B3
]/[[OSR](U)
2
21
1
Rung 2:11
END
4.3.15
Allen-Bradley Labwork 5:
Metal Component Detection and Sorting
Objective
The objective of this labwork is to combine the sorting & assembly area
loading routine developed in Labwork 3 together with a routine which, by
using the sensors situated along the belt conveyor, can detect the presence
of a single metal peg and eject the peg into the reject bin.
Procedure
1.
2.
INPUT 7
INDUCTIVE SENSOR
INPUT 5
IR THROUGH BEAM
INPUT 6
CAPACITIVE SENSOR
INPUT 3
IR AT CAPACTIVE AREA
INPUT 2
IR AT REJECT AREA
OUTPUT 2
REJECT SOLENOID
4.3.16
Solution
A ladder diagram solution for this labwork is given in figure 4.3.9.
Note: With this program only ONE component may be passed along the
belt conveyor at any one time. In reality this is an unlikely situation. A
typical conveyor may have hundreds of components on the belt at any
one time. The problems associated with component queues are discussed
in Labwork 7.
Bit
Counter
S:1
C5:0
] [(RES)
15
Metal Peg
Present
B3
(U)
Ring
Assembled
B3
(U)
Rung 2:1
Activate both the chain and belt conveyors.
Chain
Conveyor
O:0
( )
Belt
Conveyor
O:0
( )
Rung 2:2
Energise B3/0 on the rising edge of the sort area detect signal to indicate
that a component has been detected. This is necessary so that the component
will not be detected more than once.
Sort Area Rising
Component
Detect
Edge
Detected
Detect
I:0
B3
B3
] [[OSR]( )
1
20
0
4.3.17
Rung 2:3
If the component in the sort area is a plastic ring (ie. not a metal peg) and
the chute is not full (counter 5:0 not reached preset, c5:0/DN = False),
operate the sort solenoid for 0.5 seconds to push the ring down the chute.
Detected Detect
Full
Solenoid
B3
I:0
C5:0
T4:0
O:0
] []/[]/[]/[( )
0
4
DN
DN
Activate
Sort
output for
Solenoid
0.5 secs
O:0
TON
] [
TIMER ON DELAY
(EN)
0
Timer
T4:0(DN)
Time Base
0.01
Preset
50
Accum
0
Rung 2:4
Increment the ring queue counter when the sort solenoid is activated. The
counter preset is set to 5 to represent the maximum number of rings that will
fit into the chute. When the count reaches the preset value, the counter DN
signal becomes true and is used to disable the sort solenoid.
Sort
Queue
Solenoid
Counter
O:0
CTU
] [COUNT UP
(CU)
0
Counter
C5:0(DN)
Preset
5
Accum
0
Rung 2:5
If the assembly hopper is empty and the ring queue count is greater then 0,
initialise a timer to give a 2 second delay before activating the rotary
solenoid. The timer acts as a delay to allow the first ring in the chute to
settle correctly against the index cam and also as a delay to allow an
assembled component to clear the assembly area.
Assembly
Dispense
Area Full
Delay
I:0
GRT
TON
]/[GREATER THAN
TIMER ON DELAY
(EN)
0
Source A C5:0.ACC
Timer
T4:1(DN)
0
Time Base
0.01
Source B
0
Preset
200
Accum
0
Rung 2:6
Operate the rotary solenoid for 0.5 seconds to dispense a ring into the
assembly hopper when the dispense delay timer is complete (T4:1/DN = True).
Dispense
Rotary
Delay
Solenoid
T4:1
T4:2
O:0
] []/[( )
DN
DN
Activate
Rotary
output for
Solenoid
0.5 secs.
O:0
TON
] [
TIMER ON DELAY
(EN)
1
Timer
T4:2(DN)
Time Base
0.01
Preset
50
Accum
0
Rung 2:7
Decrement the ring queue counter when the rotary solenoid is activated.
Rotary
Queue
Solenoid
Counter
O:0
CTD
] [COUNT DOWN
(CD)
1
Counter
C5:0(DN)
Preset
5
Accum
0
4.3.18
Rung 2:8
Latch B3/1 when a metal peg is detected on the belt conveyor.
Inductive
Metal Peg
Sensor
Present
I:0
B3
] [(L)
7
1
Rung 2:9
When a plastic ring is detected by the capacitive sensor, latch B3/2 to
indicate that the component is an assembled part.
Capacitive
Ring
Sensor
Assembled
I:0
B3
] [(L)
6
2
Rung 2:10
When only a metal peg is detected at the reject area, activate the reject
solenoid for 0.5 seconds to push the peg off the belt conveyor and into the red
bin (rejected).
Area
Present Assembled
Solenoid
Detect
I:0
B3
B3
T4:3
O:0
] [] []/[]/[( )
2
1
2
DN
Actiavte
Reject
output for
Solenoid
0.5 secs.
O:0
TON
] [
TIMER ON DELAY
(EN)
2
Timer
T4:3(DN)
Time Base
0.01
Preset
50
Accum
0
Rung 2:11
Unlatch both the metal peg present and ring assembled registers when the
component has left the reject area.
Reject Falling
Metal Peg
Area
Edge
Present
Detect Detect
I:0
B3
B3
]/[[OSR](U)
2
21
Ring
Assembled
B3
(U)
Rung 2:12
END
4.3.19
Allen-Bradley Labwork 6:
Component / Assembly Detection and Sorting
Objective
There are four objectives to Labwork 6.
1.
2.
3.
4.
Procedure
1.
2.
4.3.20
INPUT 7
INDUCTIVE SENSOR
INPUT 5
IR THROUGH BEAM
INPUT 6
CAPACITIVE SENSOR
INPUT 3
IR AT CAPACTIVE AREA
INPUT 2
IR AT REJECT AREA
Solution
A ladder diagram solution for this labwork is given in figure 4.3.11.
Note: With this program only ONE component may be passed along the
belt conveyor at any one time. In reality this is an unlikely situation. A
typical conveyor may have hundreds of components on the belt at any
one time. The problems associated with component queues are discussed
in Labwork 7.
4.3.21
Bit
Counter
S:1
C5:0
] [(RES)
15
Metal Peg
Present
B3
(U)
Ring
Assembled
B3
(U)
Rung 2:1
Activate both the chain and belt conveyors.
Chain
Conveyor
O:0
( )
Belt
Conveyor
O:0
( )
Rung 2:2
Energise B3/0 on the rising edge of the sort area detect signal to indicate
that a component has been detected. This is necessary so that the component
will not be detected more than once.
Sort Area Rising
Component
Detect
Edge
Detected
Detect
I:0
B3
B3
] [[OSR]( )
1
20
0
Rung 2:3
If the component in the sort area is a plastic ring (ie. not a metal peg) and
the chute is not full (counter 5:0 not reached preset, c5:0/DN = False),
operate the sort solenoid for 0.5 seconds to push the ring down the chute.
Detected Detect
Full
Solenoid
B3
I:0
C5:0
T4:0
O:0
] []/[]/[]/[( )
0
4
DN
DN
Activate
Sort
output for
Solenoid
0.5 secs
O:0
TON
] [
TIMER ON DELAY
(EN)
0
Timer
T4:0(DN)
Time Base
0.01
Preset
50
Accum
0
4.3.22
Rung 2:4
Increment the ring queue counter when the sort solenoid is activated. The
counter preset is set to 5 to represent the maximum number of rings that will
fit into the chute. When the count reaches the preset value, the counter DN
signal becomes true and is used to disable the sort solenoid.
Sort
Queue
Solenoid
Counter
O:0
CTU
] [COUNT UP
(CU)
0
Counter
C5:0(DN)
Preset
5
Accum
0
Rung 2:5
If the assembly hopper is empty and the ring queue count is greater then 0,
initialise a timer to give a 2 second delay before activating the rotary
solenoid. The timer acts as a delay to allow the first ring in the chute to
settle correctly against the index cam and also as a delay to allow an
assembled component to clear the assembly area.
Assembly
Dispense
Area Full
Delay
I:0
GRT
TON
]/[GREATER THAN
TIMER ON DELAY
(EN)
0
Source A C5:0.ACC
Timer
T4:1(DN)
0
Time Base
0.01
Source B
0
Preset
200
Accum
0
Rung 2:6
Operate the rotary solenoid for 0.5 seconds to dispense a ring into the
assembly hopper when the dispense delay timer is complete (T4:1/DN = True).
Dispense
Rotary
Delay
Solenoid
T4:1
T4:2
O:0
] []/[( )
DN
DN
Activate
Rotary
output for
Solenoid
0.5 secs.
O:0
TON
] [
TIMER ON DELAY
(EN)
1
Timer
T4:2(DN)
Time Base
0.01
Preset
50
Accum
0
Rung 2:7
Decrement the ring queue counter when the rotary solenoid is activated.
Rotary
Queue
Solenoid
Counter
O:0
CTD
] [COUNT DOWN
(CD)
1
Counter
C5:0(DN)
Preset
5
Accum
0
Rung 2:8
Latch B3/1 when a metal peg is detected on the belt conveyor.
Inductive
Metal Peg
Sensor
Present
I:0
B3
] [(L)
7
1
Rung 2:9
When a plastic ring is detected by the capacitive sensor, latch B3/2 to
indicate that the component is an assembled part.
Ring
Assembled
I:0
B3
] [(L)
6
2
4.3.23
Rung 2:10
When both a metal peg and plastic ring have been detected on the belt conveyor
set B3/3 to indicate that a correctly assembled part is present.
Metal Peg Ring
Assembled
Present Assembled
Component
B3
B3
B3
] [] [( )
1
2
3
Rung 2:11
When a component is detected at the reject area and the component is not an
assembled part, activate the reject solenoid for 0.5 seconds to push the
component off the belt conveyor and into the red bin (rejected).
Reject Assembled
Reject
Area
Component
Solenoid
Detect
I:0
B3
T4:3
O:0
] []/[]/[( )
2
3
DN
Actiavte
Reject
output for
Solenoid
0.5 secs.
O:0
TON
] [
TIMER ON DELAY
(EN)
2
Timer
T4:3(DN)
Time Base
0.01
Preset
50
Accum
0
Rung 2:12
Unlatch both the metal peg present and ring assembled registers when the
component has left the reject area.
Reject Falling
Metal Peg
Area
Edge
Present
Detect Detect
I:0
B3
B3
]/[[OSR](U)
2
21
Ring
Assembled
B3
(U)
Rung 2:13
END
4.3.24
Allen-Bradley Labwork 7:
Component Queue Handling (complete system control)
Objective
The objective of this labwork is to enhance the detection and sorting
program developed in Labwork 6 to deal with a queue of components
travelling along the belt conveyor and thus achieving complete system
control. This being a far more realistic situation in industry.
Procedure
In order to obtain data on a single product amongst a queue of products,
one of the following approaches is required a)
b)
Solution
A ladder diagram solution to this labwork is shown in figure 4.3.12.
4.3.25
Bit
Counter
S:1
C5:0
] [(RES)
15
FLL
FILL FILE
Source
0
Dest
#B10:0
Length
4
MOV
MOVE
Source
1
Dest
B10:1
0000000000000001
MOV
MOVE
Source
1
Dest
B10:3
0000000000000001
Rung 2:1
Activate both the chain and belt conveyors.
Chain
Conveyor
O:0
( )
Belt
Conveyor
O:0
( )
Rung 2:2
Energise B3/0 on the rising edge of the sort area detect signal to indicate
that a component has been detected. This is necessary so that the component
will not be detected more than once.
Sort Area Rising
Component
Detect
Edge
Detected
Detect
I:0
B3
B3
] [[OSR]( )
1
20
0
Rung 2:3
If the component in the sort area is a plastic ring (ie. not a metal peg) and
the chute is not full (counter 5:0 not reached preset, c5:0/DN = False),
operate the sort solenoid for 0.5 seconds to push the ring down the chute.
Detected Detect
Full
Solenoid
B3
I:0
C5:0
T4:0
O:0
] []/[]/[]/[( )
0
4
DN
DN
Activate
Sort
output for
Solenoid
0.5 secs
O:0
TON
] [
TIMER ON DELAY
(EN)
0
Timer
T4:0(DN)
Time Base
0.01
Preset
50
Accum
0
4.3.26
Rung 2:4
Increment the ring queue counter when the sort solenoid is activated. The
counter preset is set to 5 to represent the maximum number of rings that will
fit into the chute. When the count reaches the preset value, the counter DN
signal becomes true and is used to disable the sort solenoid.
Sort
Queue
Solenoid
Counter
O:0
CTU
] [COUNT UP
(CU)
0
Counter
C5:0(DN)
Preset
5
Accum
0
Rung 2:5
If the assembly hopper is empty and the ring queue count is greater then 0,
initialise a timer to give a 2 second delay before activating the rotary
solenoid. The timer acts as a delay to allow the first ring in the chute to
settle correctly against the index cam and also as a delay to allow an
assembled component to clear the assembly area.
Assembly
Dispense
Area Full
Delay
I:0
GRT
TON
]/[GREATER THAN
TIMER ON DELAY
(EN)
0
Source A C5:0.ACC
Timer
T4:1(DN)
0
Time Base
0.01
Source B
0
Preset
200
Accum
0
Rung 2:6
Operate the rotary solenoid for 0.5 seconds to dispense a ring into the
assembly hopper when the dispense delay timer is complete (T4:1/DN = True).
Dispense
Rotary
Delay
Solenoid
T4:1
T4:2
O:0
] []/[( )
DN
DN
Activate
Rotary
output for
Solenoid
0.5 secs.
O:0
TON
] [
TIMER ON DELAY
(EN)
1
Timer
T4:2(DN)
Time Base
0.01
Preset
50
Accum
0
Rung 2:7
Decrement the ring queue counter when the rotary solenoid is activated.
Rotary
Queue
Solenoid
Counter
O:0
CTD
] [COUNT DOWN
(CD)
1
Counter
C5:0(DN)
Preset
5
Accum
0
Rung 2:8
On the rising edge of the inductive sensor input signal, latch the first
element (B10/0) of the inductive sensor data register (B10:0) to indicate that
a metal peg is present.
Inductive Rising
Sensor
Edge
Detect
I:0
B3
B10
] [[OSR](L)
7
21
0
4.3.27
Rung 2:9
Shift left by 1 bit both the inductive sensor data register and the inductive
sensor pointer register when a component passes through the thru-beam sensor.
Thru-beam
sensor
I:0
BSL
5
File
#B10:0(DN)
Control
R6:0
Length
8
BSL
File
#B10:1(DN)
Control
R6:1
Length
8
Rung 2:10
On the rising edge of the capacitive sensor input signal, latch the first
element (B10/32) of the capacitive sensor data register (B10:2) to indicate
that a plastic ring is present.
Capacitive Rising
Sensor
Edge
Detect
I:0
B3
B10
] [[OSR](L)
6
22
32
Rung 2:11
Shift left by 1 bit both the capacitive sensor data register and the
capacitive sensor pointer register when a component passes through the
capacitive sensor area.
Capacitive
Area
I:0
BSL
3
File
#B10:2(DN)
Control
R6:2
Length
8
BSL
File
#B10:3(DN)
Control
R6:3
Length
8
Rung 2:12
Check both the inductive sensor and capacitive sensor data registers with the
corresponding pointer registers to see if the leading component on the belt
conveyor is an assembled part and set B3/1 accordingly.
Assembled
Component
B10
B10
B10
B10
B3
] [] [] [] [( )
0
16
32
48
1
B10
B10 B10
B10
] [] [ ] [] [
1
17
33
49
B10
B10 B10
B10
] [] [ ] [] [
2
18
34
50
B10
B10 B10
B10
] [] [ ] [] [
3
19
35
51
B10
B10 B10
B10
] [] [ ] [] [
4
20
36
52
4.3.28
Rung 2:13
When a component is detected at the reject area and the component is not an
assembled part, activate the reject solenoid for 0.5 seconds to push the
component off the belt conveyor and into the red bin (rejected).
Reject Assembled
Reject
Area
Component
Solenoid
Detect
I:0
B3
T4:3
O:0
] []/[]/[( )
2
1
DN
Actiavte
Reject
output for
Solenoid
0.5 secs.
O:0
TON
] [
TIMER ON DELAY
(EN)
2
Timer
T4:3(DN)
Time Base
0.01
Preset
50
Accum
0
Rung 2:14
On the falling edge of the reject area sensor input signal (component leaving
reject area), shift right by 1 bit both the inductive sensor and capacitive
sensor pointer registers ready for the next component.
Reject Falling
Area
Edge
Detect Detect
I:0
B3
BSR
2
23
File
#B10:1(DN)
Control
R6:4
Length
8
BSR
File
#B10:3(DN)
Control
R6:5
Length
8
Rung 2:15
END
4.3.29
Mitsubishi F1 Labworks
Mitsubishi F1 Labworks
The following exercises based around the Industrial Control Trainer are
designed to be carried out using the Mitsubishi F1-PLC programmable
logic controller (PLC). The labworks are graded in complexity and set in
a modular form, leading to the development of the complete control
program. Solutions to the labworks are provided in both ladder diagram
format and a code listing.
The following connections have been made to the PLC inputs and
outputs.
PLC Inputs
400
401
402
403
404
405
406
407
PLC Outputs
430
431
432
433
434
Function
IR Reflective at the assembly area
IR Reflective at the sort area
IR Reflective at the reject area
IR Reflective at the capacitive area
IR Reflective to sense a metal peg at the sort area
IR Through beam sensor on the belt conveyor
Capacitive sensor
Inductive sensor
Function
Sort Solenoid
Rotary Solenoid
Reject Solenoid
Chain Conveyor
Belt Conveyor
There are no facilities to provide inputs to the PLC from the Start/Stop
and Emergency Stop push buttons.
4.4.1
Mitsubishi F1 Labwork 1
2.
Procedure
1.
2.
In the sort area there are two infra red (IR) proximity sensors,
namely a) Input Sensor 1 : Proximity Sensor at sort area.
b) Input Sensor 4 : IR reflective sensor to sense the metal peg.
4.4.2
Mitsubishi F1 Labwork 1
Solution
A ladder diagram solution for this labwork is given in figure 4.4.2 and the
Mitsubishi F1 code listing in figure 4.4.3.
4.4.3
Mitsubishi F1 Labwork 1
M70
] [( Y433 )
If I/P 401 goes high but not I/P 404 (i.e. plastic ring detected),
activate the sort solenoid for 0.3 seconds. Once O/P 430 is on, timer
T51 starts timing. When T51 expires it breaks the line to O/P 430 and
retracts the solenoid.
X401
X404
T51
] []/[]/[( Y430 )
Y430
] [
( T51 )
K0.3
END
MNEMONIC
LD
OUT
LD
OR
ANI
ANI
OUT
OUT
K
END
4.4.4
OPERAND
70
433
401
430
404
51
430
51
0.3
Mitsubishi F1 Labwork 2
(b). Ignore plastic rings at the sort area, allowing them to pass in to the
excess bin at the end of the chain conveyor.
Procedure
1.
2.
3.
Solution
A ladder diagram for this labwork is given in figure 4.4.4 and the
Mitsubishi F1 code listing in figure 4.4.5.
Note: It is a good idea to monitor the counter C660 while the program is
running. The F1 PLC allows the count-value and the condition of the
counters o/p contacts to be monitored together.
4.4.5
Mitsubishi F1 Labwork 2
M71
] [ RST 660
M110
]/[( Y433 )
Eject rings down the assembly chute but allow metal pegs to pass, as
in Labwork 1.
X401
X404
T51
] []/[]/[( Y430 )
Y430
] [
( T51 )
K0.3
Each time a ring is ejected down the chute, update the queue counter,
which counts down from 5.
Y430
] [( C660 )
K5
When C660 = 0 (assembly chute full) set M110 on and hence stop the
chain conveyor motor (see rung 2).
C660
] [( M110 )
END
MNEMONIC
LD
RST
LDI
OUT
LD
OR
ANI
ANI
OUT
OUT
K
LD
OUT
K
LD
OUT
END
4.4.6
OPERAND
71
660
110
433
401
430
404
51
430
51
0.3
430
660
5
660
110
Mitsubishi F1 Labwork 3
2.
3.
Procedure
1.
2.
3.
4.
4.4.7
Mitsubishi F1 Labwork 3
Note: Time delays need to be built into the program in the following
areas a)
'Hold on' time of rotary solenoid to allow the ring to fall into the
assembly hopper.
b)
c)
Solution
A ladder diagram solution for this labwork is given in figure 4.4.7 and the
Mitsubishi F1 code listing in figure 4.4.8. At this stage, we do not intend
the more advanced "Functional Instructions" available on the F1 to be
used. These will be required later (Labworks 7 and 8). Thus, it will be
found necessary to start the experiment with a ring already occupying the
assembly hopper.
Note: Again, it may be instructive to monitor C660.
4.4.8
Mitsubishi F1 Labwork 3
M71
] [ RST 660
M70
] [( Y434 )
M110
]/[( Y433 )
Eject rings down the assembly chute but allow metal pegs to pass, as
in Labwork 1.
X401
X404
T51
] []/[]/[( Y430 )
Y430
] [
( T51 )
K0.3
Each time a ring is ejected down the chute, update the queue counter,
which counts down from 5.
Y430
] [( C660 )
K5
Y431
] [
When C660 = 0 (assembly chute full) set M110 on and hence stop the
chain conveyor motor (see rung 2).
C660
] [( M110 )
When the previous ring has been removed from the assembly hopper,
wait 1 second
X400
]/[( T53 )
K1
T53
] [ PLS 105
M105
T52
] []/[( Y431 )
Y431
] [
( T52 )
K0.5
O/P 431 is also used to hold M471 high for reversal of the counting.
Y431
]/[( M471 )
END
4.4.9
Mitsubishi F1 Labwork 3
MNEMONIC
LD
RST
LD
OUT
LDI
OUT
LD
OR
ANI
ANI
OUT
OUT
K
LD
OR
OUT
K
LD
OUT
LDI
OUT
K
LD
PLS
LD
OR
ANI
OUT
OUT
K
LD
OUT
END
4.4.10
OPERAND
71
660
70
434
110
433
401
430
404
51
430
51
0.3
430
431
660
5
660
110
400
53
1
53
105
105
431
52
431
52
0.6
431
471
Mitsubishi F1 Labwork 4
Mitsubishi F1 Labwork 4:
Plastic Ring Detection and Sorting.
Objective
The objective of this labwork is to use the belt conveyor and standard
sensor arrangements to detect the presence of a single plastic ring and to
eject this into the reject bin.
Procedure
1.
2.
a)
on
b)
c)
d)
e)
4.4.11
Mitsubishi F1 Labwork 4
By logically gating the results from one pass of these sensors, the type of
object can be determined and therefore sorted / rejected. With the
standard pre-set arrangement of sensors the signal feedback sequence is
shown in figure 4.4.9.
INPUT 407
INDUCTIVE SENSOR
INPUT 405
IR THROUGH BEAM
INPUT 406
CAPACITIVE SENSOR
INPUT 403
IR AT CAPACTIVE AREA
INPUT 402
IR AT REJECT AREA
OUTPUT 402
REJECT SOLENOID
This signal sequence can easily be observed on the LED's by turning the
ICT Unit on and manually passing a ring along the belt conveyor.
Solution
A ladder diagram solution for this labwork is given in figure 4.4.10 and
the Mitsubishi F1 code listing in figure 4.4.11
Note: With this program only ONE component may be passed along the
belt conveyor at any one time. In reality this is an unlikely situation. A
typical conveyor may have hundreds of components on the belt at any
one time. The problems associated with component queues are discussed
on Labwork 7.
4.4.12
Mitsubishi F1 Labwork 4
M70
] [( Y434 )
X407
] [ S 200
X402
] [ S 202
M200
M202
]/[] [( Y430 )
( T50 )
K0.3
Once the ring has moved away from the reject area sensor, reset the
data storage auxiliary relays.
T50
] [ R 202
R 202
END
MNEMONIC
LD
OUT
LD
S
LD
S
LDI
AND
OUT
OUT
K
LD
R
R
END
4.4.13
OPERAND
70
434
407
200
402
202
200
202
432
50
0.3
50
200
202
Mitsubishi F1 Labwork 5
Mitsubishi F1 Labwork 5:
Metal Component Detection and Sorting
Objective
The objective is to use the belt conveyor and standard sensor arrangement
to detect the presence of a single metal component and eject this into the
reject bin.
Procedure
1.
2.
INPUT 407
INDUCTIVE SENSOR
INPUT 405
IR THROUGH BEAM
INPUT 406
CAPACITIVE SENSOR
INPUT 403
IR AT CAPACTIVE AREA
INPUT 402
IR AT REJECT AREA
OUTPUT 432
REJECT SOLENOID
This signal sequence can easily be observed on the circuit board LED's by
turning the ICT unit on and manually passing a metal component along
the belt conveyor.
4.4.14
Mitsubishi F1 Labwork 5
Solution
A ladder diagram solution for this labwork is given in figure 4.4.13 and a
Mitsubishi F1 code listing in figure 4.4.14
Note: With this program only ONE component may be passed along the
belt conveyor at any one time. In reality this is an unlikely situation. A
typical conveyor may have hundreds of components on the belt at any
one time. The problems associated with component queues are discussed
on Labwork 7.
M70
] [( Y434 )
X407
] [ S 200
X406
] [ S 201
X402
] [ S 202
M200
M201
M202
] []/[] [( Y432 )
M200
]/[
( T50 )
K0.3
Once the component has moved away from the reject area sensor, reset
the data storage auxiliary relays.
T50
] [ R 200
R 201
R 202
END
4.4.15
Mitsubishi F1 Labwork 5
MNEMONIC
LD
OUT
LD
S
LD
S
LD
S
LD
ANI
ORI
AND
OUT
OUT
K
LD
R
R
R
END
4.4.16
OPERAND
70
434
407
200
406
201
402
202
200
201
200
202
432
50
0.3
50
200
201
202
Mitsubishi F1 Labwork 6
Mitsubishi F1 Labwork 6:
Component / Assembly Detection and Sorting
Objective
There are three objectives to Labwork 6.
1.
2.
3.
Procedure
1.
2.
The signal sequences can be easily observed on the circuit board LED's
by turning the ICT unit on and manually passing the products along the
belt conveyor.
4.4.17
Mitsubishi F1 Labwork 6
INPUT 7
INDUCTIVE SENSOR
INPUT 5
IR THROUGH BEAM
INPUT 6
CAPACITIVE SENSOR
INPUT 3
IR AT CAPACTIVE AREA
INPUT 2
IR AT REJECT AREA
Figure 4.4.15. Sensor Signal Sequence for an Assembled Product
Solution
A ladder diagram solution for this labwork is given in figure 4.4.16 and
the Mitsubishi F1 code listings in figure 4.4.17.
Note: With this program only ONE component may be passed along the
belt conveyor at any one time. In reality this is an unlikely situation. A
typical conveyor may have hundreds of components on the belt at any
one time. The problems associated with component queues are discussed
on Labwork 7.
4.4.18
Mitsubishi F1 Labwork 6
M70
] [( Y434 )
X407
] [ S 200
X406
] [ S 201
X402
] [ S 202
M200
M201
M202
] []/[] [( Y432 )
M200
]/[
( T50 )
K0.3
Once the component has moved away from the reject area sensor, reset
the data storage auxiliary relays.
T50
] [ R 200
R 201
R 202
M200
M201
M202
] [] [] [( T51 )
K0.3
Accept good assembly and then reset the data storage auxiliary relays.
T51
] [ R 200
R 201
R 202
END
4.4.19
Mitsubishi F1 Labwork 6
MNEMONIC
LD
OUT
LD
S
LD
S
LD
S
LD
ANI
ORI
AND
OUT
OUT
K
LD
R
R
R
LD
AND
AND
OUT
K
LD
R
R
R
END
4.4.20
OPERAND
70
434
407
200
406
201
402
202
200
201
200
202
432
50
0.3
50
200
201
202
200
201
202
51
0.3
51
200
201
202
Mitsubishi F1 Labwork 7
Mitsubishi F1 Labwork 7:
Component Queue Handling.
Objective
To enhance the detection and sorting program developed in Labwork 6,
to deal with an assorted queue of components travelling along the Belt
Conveyor. This is a far more realistic industrial control program than that
represented in Labwork 6.
Procedure
In order to determine the nature of individual items amongst a queue of
products from the assembly stage of the process, one of the following
approaches is required -
1.
2.
4.4.21
Mitsubishi F1 Labwork 7
In our program Shift Register M100 represents the nature of each item in
the queue, and M200 records the total number of items.
Basically a Shift Register consists of M100 M101 M102 M103 M104 M105 M106 M107
Input
Data
Data Flow On "Shift" Execution
Individual
Auxiliary
Relays
Solution
A ladder diagram solution which will sort a random queue of components
and reject any unassembled items is shown in figure 4.4.18. The
associated code listing is shown in figure 4.4.19.
To summarise -
1.
2.
Input from associated IR sensor on I/P 403 stores this data in shift
register M100.
3.
In M200 only one relay can ever be ON (see rung no. 3). I/P 403
and I/P 402 shunt this ON state up and down the register to tally
with the number of items in the queue. Hence the number of items
in the queue is indicated by which relay in M200 is on.
4.4.22
Mitsubishi F1 Labwork 7
4.
The program compares the two shift registers each time I/P 402 is
triggered (the reject area sensor) and hence decides whether to
accept or reject each item.
M100 M101 M102 M103 M104 M105 M106 M107
M100
M200
In this example there are five items in the queue (M205 is ON). The
first, fourth and fifth items are assembled. The second, third and
sixth items are unassembled.
The decoding logic in the program (rung number 12), checks out
the contents of that relay in M100 which is opposite the only relay
in M200 which is on. In this case M105 is ON, so the item is an
assembled part, therefore the reject solenoid is not activated.
4.4.23
Mitsubishi F1 Labwork 7
M71
] [ RST 100
RST 200
M70
] [( Y434 )
]/[]/[]/[]/[]/[]/[]/[]/[( M200 )
X406
] [( M100 )
Shift registers M100 and M200 are then shifted accordingly to 'store'
the data regarding the number and status of items in the queue.
X403
PLS 130
M130
] [( F671
K200
M135
] [
( F672
K8
( F670
K130
by
in the
M201
M101
X402
] []/[] [( Y432 )
M202
M102
] []/[
M203
M103
] []/[
M204
M104
] []/[
M205
M105
] []/[
M206
M106
] []/[
4.4.24
Mitsubishi F1 Labwork 7
X402
] [ S 220
Wait for 0.7 seconds to allow object to clear the reject area.
M220
] [( T54 )
K0.7
When timer T54 has expired, energise M477 to enable reverse shifting
and pulse M135 to execute the shift function (see rung 6).
T54
] [( M477 )
PLS 135
M477
] [( T55 )
K0.1
Reset M220
T55
] [ R 220
END
MNEMONIC
LD
RST
RST
LD
OUT
LD
ANI
ANI
ANI
ANI
ANI
ANI
OUT
LD
OUT
LD
SFT
PLS
4.4.25
OPERAND
71
100
200
70
434
70
201
202
203
204
205
206
200
406
100
403
100
130
Mitsubishi F1 Labwork 7
ADDRESS
018
019
020
021
022
023
024
025
026
027
028
029
030
031
032
033
034
035
036
037
038
039
040
041
042
043
044
045
046
047
048
049
050
051
052
053
054
055
056
057
058
MNEMONIC
LD
OR
OUT
K
OUT
K
OUT
K
LD
ANI
LD
ANI
ORB
LD
ANI
ORB
LD
ANI
ORB
LD
ANI
ORB
LD
ANI
ORB
AND
OUT
LD
S
LD
OUT
K
LD
OUT
PLS
LD
OUT
K
LD
R
END
4.4.26
OPERAND
130
135
671
200
672
8
670
130
201
101
202
102
203
103
204
104
205
105
206
106
402
432
402
220
220
54
0.7
54
477
135
477
55
0.1
55
220
Mitsubishi F1 Labwork 8
Mitsubishi F1 Labwork 8:
Complete System Control.
Objective
The control of the complete ICT involves the following 1.
2.
Procedure
To achieve this overall program merge together the solutions for
Labwork 3 and 7 and debug this into the final control program. The
solution to Labwork 3 will need to be amended by the inclusion of a
"Functional Instruction" plus a few other alterations, before this may be
achieved.
Solution
A ladder diagram solution for this Labwork is shown in figure 4.4.20
and the Mitsubishi F1 code listing in figure 4.4.21.
4.4.27
Mitsubishi F1 Labwork 8
M71
] [ RST 100
RST 200
RST 660
Continuously operate the chain and belt conveyor motors and reset M210
to allow the queue counter to count back 1.
M70
] [( Y433 )
( Y434 )
R 210
M70
] [(
F671 )
K0
F672 )
K660
F670 )
K40
M571 is off when chute is full, M110 disables the sort solenoid when
the chute is full.
M571
]/[( M110 )
X401
M110
X404
T51
] []/[]/[]/[(
Y430
] [
(
solenoid for
Y430 )
T51 )
K0.3
Compare C660 with 4. Does the assembly chute contain any rings?
M70
] [( F671 )
K4
( F672 )
K660
( F670 )
K40
4.4.28
Mitsubishi F1 Labwork 8
While the chute contains rings, pulse M111 on for 1 program scan.
M572
X400
M573
] [
Delay the activation of the rotary solenoid for 1 second to allow the
previous ring to clear the assembly hopper.
M111
T52
] []/[-( M120 )
M120
] [
( T53 )
K1.0
Activate the rotary solenoid for 0.6 seconds when the 1 second delay
has elapsed. Also set M210 on.
T53
] [( Y431 )
( T52 )
K0.6
S 210
M210
] [( M471 )
Use C660 to record the assembly chute queue count. This counts down
when the sort solenoid is activated and up when the rotary solenoid is
activated
Y430
M110
] []/[( C660 )
K5
Y431
] [
]/[]/[]/[]/[]/[]/[]/[]/[( M200 )
X406
] [( M100 )
Shift registers M100 and M200 are then shifted accordingly to 'store'
the data regarding the number and status of items in the queue.
X403
PLS 130
4.4.29
Mitsubishi F1 Labwork 8
M130
] [( F671
K200
M135
] [
( F672
K8
( F670
K130
by
in the
M201
M101
X402
] []/[] [( Y432 )
M202
M102
] []/[
M203
M103
] []/[
M204
M104
] []/[
M205
M105
] []/[
M206
M106
] []/[
X402
] [ S 220
Wait for 0.7 seconds to allow object to clear the reject area.
M220
] [( T54 )
K0.7
When timer T54 has expired, energise M477 to enable reverse shifting
and pulse M135 to execute the shift function (see rung 6).
T54
] [( M477 )
PLS 135
M477
] [( T55 )
K0.1
Reset M220
T55
] [ R 220
END
4.4.30
Mitsubishi F1 Labwork 8
MNEMONIC
LD
RST
RST
RST
LD
OUT
OUT
R
LD
OUT
K
OUT
K
OUT
K
LDI
OUT
LD
ANI
OR
ANI
ANI
OUT
OUT
K
LD
OUT
K
OUT
K
OUT
K
LD
OR
ANI
PLS
LD
OR
ANI
OUT
OUT
K
LD
OUT
OUT
K
S
LD
OUT
LD
ANI
OR
OUT
K
OPERAND
71
100
200
660
70
433
434
210
70
671
0
672
660
670
40
571
110
401
110
430
404
51
430
51
0.3
70
671
4
672
660
670
40
572
573
400
111
111
120
52
120
53
1
53
431
52
0.6
210
210
471
430
110
431
660
5
ADDRESS
054
055
056
057
058
059
060
061
062
063
064
065
066
067
068
069
070
071
072
073
074
075
076
077
078
079
080
081
082
083
084
085
086
087
088
089
090
091
092
093
094
095
096
097
098
099
100
101
102
103
104
105
106
107
4.4.31
MNEMONIC
LD
ANI
ANI
ANI
ANI
ANI
ANI
OUT
LD
OUT
LD
SFT
PLS
LD
OR
OUT
K
OUT
K
OUT
K
LD
ANI
LD
ANI
ORB
LD
ANI
ORB
LD
ANI
ORB
LD
ANI
ORB
LD
ANI
ORB
AND
OUT
LD
S
LD
OUT
K
LD
OUT
PLS
LD
OUT
K
LD
R
END
OPERAND
70
201
202
203
204
205
206
200
406
100
403
100
130
130
135
671
200
672
8
670
130
201
101
202
102
203
103
204
104
205
105
206
106
402
432
402
220
220
54
0.7
54
477
135
477
55
0.1
55
220
Function
IR Reflective at the assembly area
IR Reflective at the sort area
IR Reflective at the reject area
IR Reflective at the capacitive area
IR Reflective to sense a metal peg at the sort area
IR Through beam sensor on the belt conveyor
Capacitive sensor
Inductive sensor
Function
Sort Solenoid
Rotary Solenoid
Reject Solenoid
Chain Conveyor
Belt Conveyor
There are no facilities to provide inputs to the PLC from the Start/Stop
and Emergency Stop push buttons.
4.5.1
2.
Procedure
1.
2.
In the sort area there are two infra red (I/R) proximity sensors a) Input Sensor 1 : Proximity sensor at sort area.
b) Input Sensor 4 : I/R reflective sensor to sense the metal peg.
4.5.2
Solution
A ladder diagram solution for this labwork is given in figure 4.5.2.
4.5.3
M8000
Y3
0 ( )
RUN
CHAIN
MODE
X1
2 [PLS M0
]
SORT
PART
AREA
SORT
AREA
M0
X4
T0
Y0
5 //( )
PART METALSORT
SORT
SORT PEG SOLND
SOLND
AREA
ON
Y0
K5
(T0 )
SORT
SORT
SOLND
SOLND
ON
13 [END ]
4.5.4
(b). Ignore the plastic rings at the sort area, allowing them to pass on
into the excess bin at the end of the chain conveyor.
Procedure
1.
2.
3.
Solution
A ladder diagram for this labwork is given in figure 4.5.3.
4.5.5
M8002
K
0 [MOV 0
D0
]
FIRST
QUEUE
SCAN
COUNT
M8000
Y3
6 ( )
RUN
CHAIN
MODE
X1
8 [PLS M0
]
SORT
PART
AREA
SORT
AREA
M0
X4
M1
T0
Y0
11 ///( )
PART METAL QUEUESORT
SORT
SORT PEG
FULL SOLND
SOLND
AREA
ON
Y0
K5
(T0 )
SORT
SORT
SOLND
SOLND
ON
T0
20 [INC D0
]
SORT
QUEUE
SOLND
COUNT
ON
M8000
K
24 [CMP D0
5
M10 ]
RUN
QUEUE
GRATR
MODE
COUNT
M11
M1
32 ( )
EQUAL
QUEUE
FULL
34 [END ]
4.5.6
2.
3.
Procedure
1.
2.
Activate the belt conveyor so that the pegs will travel along the belt
conveyor, picking up the ring waiting in the assembly hopper on the
way.
3.
4.
5.
4.5.7
Note: Time delays need to be built into the program in the following
areas a)
'Hold on' time of rotary solenoid to allow the ring to fall into the
assembly hopper.
b)
When there are no plastic rings in the queue and assembly hopper is
empty, a time delay must be incorporated to allow for a sorted ring
to settle against the index cam.
c)
Areas B and C above, can be incorporated into one timer by following the
statement: If the assembly hopper is empty and there are rings in the
queue, wait for 2 seconds before activating the rotary solenoid.
Solution
A ladder diagram solution for this labwork is given in figure 4.5.5.
4.5.8
M8002
K
0 [MOV 0
D0
]
FIRST
QUEUE
SCAN
COUNT
M8000
Y3
6 ( )
RUN
CHAIN
MODE
Y4
( )
BELT
X1
9 [PLS M0
]
SORT
PART
AREA
SORT
AREA
M0
X4
M1
T0
Y0
12 ///( )
PART METAL QUEUESORT
SORT
SORT PEG
FULL SOLND
SOLND
AREA
ON
Y0
K5
(T0 )
SORT
SORT
SOLND
SOLND
ON
T0
21 [INC D0
]
SORT
QUEUE
SOLND
COUNT
ON
M8000
K
K
25 [ZCP 1
4
D0
M10 ]
RUN
QUEUE QUEUE
MODE
COUNT EMPTY
4.5.9
M10
X0
T1
K20
35 ///(T1 )
QUEUE HOPPR DSPNS
DSPNS
EMPTY FULL DELAY
DELAY
M12
M1
41 ( )
QUEUE
QUEUE
IS
FULL
FULL
T1
T2
Y1
43 /( )
DSPNSROTRY
ROTRY
DELAYSOLND
SOLND
ON
Y1
K5
(T2 )
ROTRY
ROTRY
SOLND
SOLND
ON
T2
50 [DEC D0
]
ROTRY
QUEUE
SOLND
COUNT
ON
54 [END ]
4.5.10
Procedure
1.
2.
a)
b)
c)
d)
e)
4.5.11
By logically gating the results from one pass of these sensors, the type of
object can be determined and therefore sorted / rejected. With the
standard pre-set arrangement of sensors the signal feedback sequence for
a single plastic ring is shown in figure 4.5.6.
Solution
A ladder diagram solution for this labwork is given in figure 4.5.7.
Note: With this program only ONE component may be passed along the
belt conveyor at any one time. In reality this is an unlikely situation. A
typical conveyor may have hundreds of components on the belt at any
one time. The problems associated with component queues are discussed
in labwork 7.
4.5.12
M8002
K
0 [MOV 0
D0
]
FIRST
QUEUE
SCAN
COUNT
[RST M3
]
METAL
PEG
PRSNT
Use M8000 to continuously activate both the belt
M8000
Y3
7 ( )
RUN
CHAIN
MODE
Y4
( )
BELT
X1
10 [PLS M0
]
SORT
PART
AREA
SORT
AREA
M0
X4
M1
T0
Y0
13 ///( )
PART METAL QUEUESORT
SORT
SORT PEG
FULL SOLND
SOLND
AREA
ON
Y0
K5
(T0 )
SORT
SORT
SOLND
SOLND
ON
T0
22 [INC D0
]
SORT
QUEUE
SOLND
COUNT
ON
M8000
K
K
26 [ZCP 1
4
D0
M10 ]
RUN
QUEUE QUEUE
MODE
COUNT EMPTY
M10
X0
T1
K20
36 ///(T1 )
QUEUE HOPPR DSPNS
DSPNS
EMPTY FULL DELAY
DELAY
4.5.13
M12
M1
42 ( )
QUEUE
QUEUE
IS
FULL
FULL
T1
T2
Y1
44 /( )
DSPNSROTRY
ROTRY
DELAYSOLND
SOLND
ON
Y1
K5
(T2 )
ROTRY
ROTRY
SOLND
SOLND
ON
T2
51 [DEC D0
]
ROTRY
QUEUE
SOLND
COUNT
ON
X7
55 [SET M3
]
INDCT
METAL
SENSR
PEG
PRSNT
X2
M3
T3
Y2
57 //( )
REJCT METALREJCT
REJCT
AREA PEG SOLND
SOLND
PRSNTON
Y2
K5
(T3 )
REJCT
REJCT
SOLND
SOLND
ON
M2.
X2
65 /[PLS M2
]
REJCT
LEFT
AREA
REJCT
AREA
M2 is energised.
M2
68 [RST M3
]
LEFT
METAL
REJCT
PEG
AREA
PRSNT
70 [END ]
4.5.14
Procedure
1.
2.
4.5.15
Solution
A ladder diagram solution for this labwork is given in figure 4.5.9.
Note: With this program only ONE component may be passed along the
belt conveyor at any one time. In reality this is an unlikely situation. A
typical conveyor may have hundreds of components on the belt at any
one time. The problems associated with component queues are discussed
in labwork 7.
scan.
M8002
K
0 [MOV 0
D0
]
FIRST
QUEUE
SCAN
COUNT
[RST M3
]
METAL
PEG
PRSNT
[RST M4
]
RING
ASMBD
M8000
Y3
8 ( )
RUN
CHAIN
MODE
Y4
( )
BELT
X1
11 [PLS M0
]
SORT
PART
AREA
SORT
AREA
4.5.16
M0
X4
M1
T0
Y0
14 ///( )
PART METAL QUEUESORT
SORT
SORT PEG
FULL SOLND
SOLND
AREA
ON
Y0
K5
(T0 )
SORT
SORT
SOLND
SOLND
ON
T0
23 [INC D0
]
SORT
QUEUE
SOLND
COUNT
ON
M8000
K
K
27 [ZCP 1
4
D0
M10 ]
RUN
QUEUE QUEUE
MODE
COUNT EMPTY
M10
X0
T1
K20
37 ///(T1 )
QUEUE HOPPR DSPNS
DSPNS
EMPTY FULL DELAY
DELAY
M12
M1
43 ( )
QUEUE
QUEUE
IS
FULL
FULL
T1
T2
Y1
45 /( )
DSPNSROTRY
ROTRY
DELAYSOLND
SOLND
ON
Y1
K5
(T2 )
ROTRY
ROTRY
SOLND
SOLND
ON
T2
52 [DEC D0
]
ROTRY
QUEUE
SOLND
COUNT
ON
4.5.17
X7
56 [SET M3
]
INDCT
METAL
SENSR
PEG
PRSNT
X6
58 [SET M4
]
CPTVE
RING
SENSR
ASMBD
X2
M3
M4
T3
Y2
60 //( )
REJCT METAL RING REJCT
REJCT
AREA PEG
ASMBDSOLND
SOLND
PRSNT
ON
Y2
K5
(T3 )
REJCT
REJCT
SOLND
SOLND
ON
M2.
X2
69 /[PLS M2
]
REJCT
LEFT
AREA
REJCT
AREA
M2
72 [RST M3
]
LEFT
METAL
REJCT
PEG
AREA
PRSNT
[RST M4
]
RING
ASMBD
75 [END ]
4.5.18
The sorting of the plastic rings on the chain conveyor and assembly
hopper loading (as in labwork 3).
2.
3.
4.
Procedure
1.
2.
4.5.19
Aluminium Peg
INPUT 7
INDUCTIVE SENSOR
INPUT 5
IR THROUGH BEAM
INPUT 6
CAPACITIVE SENSOR
INPUT 3
IR AT CAPACITIVE AREA
INPUT 2
IR AT REJECT AREA
Solution
A ladder diagram solution for this labwork is given in figure 4.5.11.
Note: With this program only ONE component may be passed along the
belt conveyor at any one time. In reality this is an unlikely situation. A
typical conveyor may have hundreds of components on the belt at any
one time. The problems associated with component queues are discussed
in labwork 7.
4.5.20
scan.
M8002
K
0 [MOV 0
D0
]
FIRST
QUEUE
SCAN
COUNT
[RST M3
]
METAL
PEG
PRSNT
[RST M4
]
RING
ASMBD
M8000
Y3
8 ( )
RUN
CHAIN
MODE
Y4
( )
BELT
X1
11 [PLS M0
]
SORT
PART
AREA
SORT
AREA
M0
X4
M1
T0
Y0
14 ///( )
PART METAL QUEUESORT
SORT
SORT PEG
FULL SOLND
SOLND
AREA
ON
Y0
K5
(T0 )
SORT
SORT
SOLND
SOLND
ON
T0
23 [INC D0
]
SORT
QUEUE
SOLND
COUNT
ON
4.5.21
M8000
K
K
27 [ZCP 1
4
D0
M10 ]
RUN
QUEUE QUEUE
MODE
COUNT EMPTY
M10
X0
T1
K20
37 ///(T1 )
QUEUE HOPPR DSPNS
DSPNS
EMPTY FULL DELAY
DELAY
M12
M1
43 ( )
QUEUE
QUEUE
IS
FULL
FULL
T1
T2
Y1
45 /( )
DSPNSROTRY
ROTRY
DELAYSOLND
SOLND
ON
Y1
K5
(T2 )
ROTRY
ROTRY
SOLND
SOLND
ON
T2
52 [DEC D0
]
ROTRY
QUEUE
SOLND
COUNT
ON
X7
56 [SET M3
]
INDCT
METAL
SENSR
PEG
PRSNT
X6
58 [SET M4
]
CPTVE
RING
SENSR
ASMBD
4.5.22
X2
M3
T3
Y2
60 //( )
REJCTMETALREJCT
REJCT
AREA PEG SOLND
SOLND
PRSNTON
M4
K5
/
(T3 )
RING
REJCT
ASMBD
SOLND
ON
Y2
REJCT
SOLND
M2.
X2
70 /[PLS M2
]
REJCT
LEFT
AREA
REJCT
AREA
M2
73 [RST M3
]
LEFT
METAL
REJCT
PEG
AREA
PRSNT
[RST M4
]
RING
ASMBD
76 [END ]
4.5.23
Procedure
Data retrieved by the sensors on the belt conveyor as a component passes
through them must be stored so that when the component reaches the
reject area the appropriate action can be taken. One method of achieving
this is to store the data in a shift register and use a second shift register to
'point' to the data of the leading component. When the component reaches
the reject area, the two shift registers are then logically 'ANDed' together
to determine whether the component needs to be rejected.
Basically, a shift register is a group of registers along which any pattern
of 'ON' and 'OFF' states can be moved by executing either a shift left
(SFLT) or a shift right (SFRT) instruction. In the example given below, a
shift register has been made up from a series of auxiliary relays. Note that
new data enters the shift register via the leading relay.
Note: The shift register takes its name from the least significant auxiliary
relay
4.5.24
Solution
A ladder diagram solution for this labwork is given in figure 4.5.12.
The use of shift registers to deal with a queue of components travelling
along the belt conveyor has been implemented as follows:
1.
Four shift registers have been used. Shift register M20 has been
designated as an inductive sensor pointer register and is initialised
with an 'ON' state in auxiliary relay M20. This is repeated for shift
register M40 and acts as a capacitive sensor pointer register. Two
further shift registers, M30 and M50, will hold the data retrieved
from the inductive and capacitive sensors.
2.
The data retrieved from the component passing the inductive sensor
is loaded into the first element of shift register M30 (e.g. 'ON' for a
metal peg, 'OFF' for a plastic ring). When the component passes
through the through beam sensor, both the inductive sensor pointer
(M20) and data (M30) shift registers are shifted left by 1 bit.
3.
4.
MW2
Capacitive Sensor
Pointer Register
Capacitive Sensor
Data Register
MW4
MW6
4.5.25
MW8
In the example given on the previous page there are three items in
queue (M23 and M43 are ON). The first is a plastic ring, the
second is a correctly assembled component and the third is a metal
peg.
5.
When the component reaches the reject area, the result of the 'AND'
instruction is used to determine whether to reject the component. In
the example, the result would be '0' thus the control program will
reject the component.
6.
When the component has left the reject area by either being
accepted or rejected, the inductive sensor and capacitive sensor
pointer registers are shifted right by 1 bit to point to the next
component along the belt conveyor. In the example, the '1' in both
M23 and M43 would be shifted to M22 and M42. The result of a
logical 'AND' on these registers would now be '1'. Thus, when the
component reaches the reject area, it will be allowed to pass the
reject area and slide into the accept hopper at the end of the belt
conveyor.
The rung '127' in the ladder solution executes the logical 'AND' and the
result is reflected in auxiliary relay M6.
4.5.26
M8002
0 [ZRST M0
M59 ]
FIRST
PART
SCAN
SORT
AREA
[MOV 0
D0
]
QUEUE
COUNT
M21
M22
M23
M24
M25
M20
11 /////( )
INDTV
PINTR
RGSTR
M41
M42
M43
M44
M45
M40
17 /////( )
CAPTV
PINTR
RGSTR
M8000
Y3
23 ( )
RUN
CHAIN
MODE
Y4
( )
BELT
X1
26 [PLS M0
]
SORT
PART
AREA
SORT
AREA
M0
X4
M1
T0
Y0
29 ///( )
PART METAL QUEUESORT
SORT
SORT PEG
FULL SOLND
SOLND
AREA
ON
Y0
K5
(T0 )
SORT
SORT
SOLND
SOLND
ON
4.5.27
T0
38 [INC D0
]
SORT
QUEUE
SOLND
COUNT
ON
M8000
K
K
42 [ZCP 1
4
D0
M10 ]
RUN
QUEUE QUEUE
MODE
COUNT EMPTY
M10
X0
T1
K20
52 ///(T1 )
QUEUE HOPPR DSPNS
DSPNS
EMPTY FULL DELAY
DELAY
M12
M1
58 ( )
QUEUE
QUEUE
IS
FULL
FULL
T1
T2
Y1
60 /( )
DSPNSROTRY
ROTRY
DELAYSOLND
SOLND
ON
Y1
K5
(T2 )
ROTRY
ROTRY
SOLND
SOLND
ON
T2
67 [DEC D0
]
ROTRY
QUEUE
SOLND
COUNT
ON
X7
71 [PLS M2
]
INDCT
INDTV
SENSR
PULSE
M2
74 [SET M30 ]
INDTV
INDTV
PULSE
DATA
RGSTR
4.5.28
[SFTL M30
M31
5
INDTV
DATA
RGSTR
[RST
[SFTL M50
M51
5
CAPTV
DATA
RGSTR
[RST
4.5.29
M3
]
THRU
BEAM
PULSE
1
]
1
]
M30 ]
INDTV
DATA
RGSTR
M4
]
CAPTV
PULSE
M50 ]
CAPTV
DATA
RGSTR
M5
]
CAPTV
AREA
PULSE
1
]
1
]
M50 ]
CAPTV
DATA
RGSTR
energise M6 accordingly.
M21
M31
M41
M51
M6
127 ( )
ASMBD
PART
M22
M32 M42
M52
M23
M33 M43
M53
M24
M34 M44
M54
M25
M35 M45
M55
X2
M6
T3
Y2
157 //( )
REJCT ASMBDREJCT
REJCT
AREA PART SOLND
SOLND
ON
Y2
K5
(T3 )
REJCT
REJCT
SOLND
SOLND
ON
area.
X2
165 [SET M7
]
REJCT
PART
AREA
AT
REJCT
When the component has left the reject area, shift
X2
M7
K
K
AREA AT
REJCT
K
K
[SFTR M46
M41
5
1
]
[RST M7
]
PART
AT
REJCT
188 [END ]
4.5.30
Siemens S5 Labworks
Siemens S5 Labworks
The following exercises based around the Industrial Control Trainer are
designed to be carried out using the Siemens programmable logic
controller (PLC) S5-90U range. The labworks are graded in complexity
and set in a modular form, leading to the development of the complete
control program. Solutions to the labworks are provided, where possible,
in ladder diagram format and a copy of which can be found on the
accompanying ICT1 labworks disks.
In order to view / edit and download these PLC programs you will need
to use the Siemens S5 PC programming software. If you do not have this
facility, it may be purchased from Bytronic.
The following connections have been made to the PLC inputs and
outputs.
PLC Inputs
32.0
32.1
32.2
32.3
32.4
32.5
32.6
32.7
PLC Outputs
32.0
32.1
32.2
32.3
32.4
Function
IR Reflective at the assembly area
IR Reflective at the sort area
IR Reflective at the reject area
IR Reflective at the capacitive area
IR Reflective to sense a metal peg at the sort area
IR Through beam sensor on the belt conveyor
Capacitive sensor
Inductive sensor
Function
Sort Solenoid
Rotary Solenoid
Reject Solenoid
Chain Conveyor
Belt Conveyor
There are no facilities to provide inputs to the PLC from the Start/Stop
and Emergency Stop push buttons.
4.6.1
Siemens S5 Labwork 1
2.
Procedure
1.
2.
In the sort area there are two infra red (IR) proximity sensors,
namely a) Input Sensor 1 : Proximity sensor at sort area.
b) Input Sensor 4 : IR reflective sensor to sense the metal peg.
4.6.2
Siemens S5 Labwork 1
I/P 32.1
I/P 32.4
O/P 32.0
I/P 32.1
I/P 32.4
O/P 32.0
Solution
A ladder diagram solution for this labwork is given in figure 4.6.2.
4.6.3
Siemens S5 Labwork 1
Chain
Conveyor
Q032.3
( )
SEGMENT 2
Activate the sort solenoid for 0.5 seconds when a plastic ring is detected on
the chain conveyor.
Sort Area Metal Peg
Detect
Detect
I032.1
I032.4
TIMERWORD F000.0
/ EXTENDED PULSE
(EN)
TIMER: 001
Sort
Solenoid
Q032.0
(TQ)
PRS: Constant
050.0
4.6.4
Siemens S5 Labwork 2
(b). Ignore the plastic rings at sort area, allowing them to pass on to the
excess bin at the end of the chain conveyor.
Procedure
1.
2.
3.
Solution
A ladder diagram for this labwork is given in figure 4.6.3.
4.6.5
Siemens S5 Labwork 2
COUNTER: 001
Ring Queue
Counter
SEGMENT 2
Latch F100.0 so that any initiating will only occur on the first execution
pass.
First
Pass
Complete
F100.0
(L)
SEGMENT 3
Activate the chain conveyor motor.
Chain
Conveyor
Q032.3
( )
SEGMENT 4
Activate the sort solenoid for 0.5 seconds when a plastic ring is detected on
the chain conveyor and the ring queue count is not full (less than 5).
Sort Area Metal Peg Ring Queue
Detect
Detect
Full
I032.1
I032.4
F001.0
TIMERWORD F000.0
// EXTENDED PULSE
(EN)
TIMER: 001
Sort
Solenoid
Q032.0
(TQ)
PRS: Constant
050.0
4.6.6
Siemens S5 Labwork 2
SEGMENT 5
Increment the ring queue counter when the sort solenoid is activated.
Sort
Solenoid
Q032.0
COUNTERWORD F000.0
COUNT UP
(EN)
COUNTER: 001
Ring Queue
Counter
F000.1
(CC)
SEGMENT 6
Compare the ring queue counter with 5 (queue full) and set F1.0 to disable
ring sorting if necessary.
Ring Queue
Full
COMPAREWORD
F001.0
A = B
( )
A: C001
Ring Queue
Counter
B: Constant
+5 D
4.6.7
Siemens S5 Labwork 3
2.
3.
Procedure
1.
2.
Activate the belt conveyor so that the pegs will travel along the belt
conveyor, picking up the ring waiting in the assembly hopper on the
way.
3.
4.
5.
4.6.8
Siemens S5 Labwork 3
I/P 32.0
I/P 32.4
O/P 32.0
O/P 32.1
I/P 32.0
Note: Time delays need to be built into the program in the following
areas a)
b)
When there are no plastic rings in the queue and the assembly
hopper is empty, a time delay must be incorporated to allow for a
sorted ring to settle against the index cam
c)
Areas B and C above can be incorporated into one timer by following the
statement: If the assembly hopper is empty and there are rings in the
queue, wait for 2 seconds before activating the rotary solenoid.
Solution
A ladder diagram solution for this labwork is given in figure 4.6.5.
4.6.9
Siemens S5 Labwork 3
COUNTER: 001
Queue
Counter
SEGMENT 2
Latch F100.0 so that any initiating will only occur on the first execution
pass.
First
Pass
Complete
F100.0
(L)
SEGMENT 3
Activate both the chain conveyor and belt conveyor motors.
Chain
Conveyor
Q032.3
( )
Belt
Conveyor
Q032.4
( )
SEGMENT 4
Activate the sort solenoid for 0.5 seconds when a plastic ring is detected on
the chain conveyor and the ring queue count is not full (less than 5).
Sort Area Metal Peg Ring Queue
Detect
Detect
Full
I032.1
I032.4
F001.0
TIMERWORD F000.0
// EXTENDED PULSE
(EN)
TIMER: 001
Sort
Solenoid
Q032.0
(TQ)
PRS: Constant
050.0
4.6.10
Siemens S5 Labwork 3
SEGMENT 5
Increment the ring queue counter when the sort solenoid is activated.
Sort
Solenoid
Q032.0
COUNTERWORD F000.0
COUNT UP
(EN)
COUNTER: 001
Queue
Counter
F000.1
(CC)
SEGMENT 6
Compare the ring queue counter with 5 (queue full) and set F1.0 to disable
ring sorting if necessary.
Ring Queue
Full
COMPAREWORD
F001.0
A = B
( )
A: C001
Queue
Counter
B: Constant
+5 D
SEGMENT 7
When the assembly hopper is empty and a ring is in the queue, initiate a timer
to give a 2 second delay before activating the rotary solenoid.
Queue
Assembly
Counter
Area Full
C001
I032.0
TIMERWORD F000.0
/ ON DELAY
(EN)
TIMER: 002
Dispense
Delay
Complete
F001.1
(TQ)
PRS: Constant
200.0
4.6.11
Siemens S5 Labwork 3
SEGMENT 8
Activate the rotary solenoid for 0.5 seconds when the 2 second delay has
expired to index the ring into the assembly hopper.
Dispense
Delay
Complete
F001.1
TIMERWORD F000.0
EXTENDED PULSE
(EN)
TIMER: 003
Rotary
Solenoid
Q032.1
(TQ)
PRS: Constant
050.0
SEGMENT 9
Decrement the ring queue counter when the rotary solenoid is activated.
Rotary
Solenoid
Q032.1
COUNTERWORD F000.0
COUNT DOWN
(EN)
COUNTER: 001
Queue
Counter
F000.1
(CC)
4.6.12
Siemens S5 Labwork 4
Siemens S5 Labwork 4:
Plastic Ring Detection and Sorting
Objective
The objective of this labwork is to combine the sorting & assembly area
loading routine developed in labwork 3 together with a routine which, by
using the sensors situated along the belt conveyor, can detect the presence
of a single plastic ring and eject the ring into the reject bin.
Procedure
1.
2.
a)
b)
c)
d)
e)
4.6.13
Siemens S5 Labwork 4
By logically gating the results from one pass of these sensors, the type of
object can be determined and therefore sorted / rejected. With the
standard pre-set arrangement of sensors the signal feedback sequence is
shown in figure 4.6.6.
I/P 32.7
INDUCTIVE SENSOR
I/P 32.5
IR THROUGH BEAM
I/P 32.6
CAPACITIVE SENSOR
I/P 32.3
IR AT CAPACTIVE AREA
I/P 32.2
IR AT REJECT AREA
O/P 32.2
REJECT SOLENOID
Solution
A ladder diagram solution for this labwork is given in figure 4.6.7.
Note: With this program only ONE component may be passed along the
belt conveyor at any one time. In reality this is an unlikely situation. A
typical conveyor may have hundreds of components on the belt at any
one time. The problems associated with component queues are discussed
in Labwork 7.
4.6.14
Siemens S5 Labwork 4
COUNTER: 001
Queue
Counter
SEGMENT 2
Unlatch the metal peg present flag on the first execution pass.
First
Metal Peg
Pass
Present
Complete
F100.0
F001.2
/(U)
SEGMENT 3
Latch F100.0 so that any initiating will only occur on the first execution
pass.
First
Pass
Complete
F100.0
(L)
SEGMENT 4
Activate both the chain conveyor and belt conveyor motors.
Chain
Conveyor
Q032.3
( )
Belt
Conveyor
Q032.4
( )
4.6.15
Siemens S5 Labwork 4
SEGMENT 5
Activate the sort solenoid for 0.5 seconds when a plastic ring is detected on
the chain conveyor and the ring queue count is not full (less than 5).
Sort Area Metal Peg Ring Queue
Detect
Detect
Full
I032.1
I032.4
F001.0
TIMERWORD F000.0
// EXTENDED PULSE
(EN)
TIMER: 001
Sort
Solenoid
Q032.0
(TQ)
PRS: Constant
050.0
SEGMENT 6
Increment the ring queue counter when the sort solenoid is activated.
Sort
Solenoid
Q032.0
COUNTERWORD F000.0
COUNT UP
(EN)
COUNTER: 001
Queue
Counter
F000.1
(CC)
SEGMENT 7
Compare the ring queue counter with 5 (queue full) and set F1.0 to disable
ring sorting if necessary.
Ring Queue
Full
COMPAREWORD
F001.0
A = B
( )
A: C001
Queue
Counter
B: Constant
+5 D
4.6.16
Siemens S5 Labwork 4
SEGMENT 8
When the assembly hopper is empty and a ring is in the queue, initiate a timer
to give a 2 second delay before activating the rotary solenoid.
Queue
Assembly
Counter
Area Full
C001
I032.0
TIMERWORD F000.0
/ ON DELAY
(EN)
TIMER: 002
Dispense
Delay
Complete
F001.1
(TQ)
PRS: Constant
200.0
SEGMENT 9
Activate the rotary solenoid for 0.5 seconds when the 2 second delay has
expired to index the ring into the assembly hopper.
Dispense
Delay
Complete
F001.1
TIMERWORD F000.0
EXTENDED PULSE
(EN)
TIMER: 003
Rotary
Solenoid
Q032.1
(TQ)
PRS: Constant
050.0
SEGMENT 10
Decrement the ring queue counter when the rotary solenoid is activated.
Rotary
Solenoid
Q032.1
COUNTERWORD F000.0
COUNT DOWN
(EN)
COUNTER: 001
Queue
Counter
F000.1
(CC)
4.6.17
Siemens S5 Labwork 4
SEGMENT 11
Jump to Function Block 1 (alngbelt) to determine the type of component
traveling along the belt conveyor and reject if necessary.
JUMP TO SUBROUTINE
FB001
alngbelt
Pole Belt
Conveyor
F000.0
Sensors
(EN)
F000.1
(RT)
FB001
SEGMENT 1
Latch F1.2 when a metal peg is detected on the belt conveyor so that the
component will not be rejected.
NAME: alngbelt
Inductive
Metal Peg
Sensor
Present
I032.7
F001.2
(L)
SEGMENT 2
When a plastic ring is detected at the reject area, activate the reject
solenoid for 0.5 seconds to push the ring off the belt conveyor and into the
red bin (rejected).
Reject
Metal Peg
Area
Present
Detect
I032.2
F001.2
TIMERWORD F000.0
/ EXTENDED PULSE
(EN)
TIMER: 004
Reject
Solenoid
Q032.2
(TQ)
PRS: Constant
050.0
SEGMENT 3
Initiate a one shot output on the true to false transition (component leaving
the reject area) of the reject area sensor.
Reject
Part Left
Area
Reject
Detect
Area
I032.2
F001.4
ONE SHOT T -> F
( )
PS: F002.0
Falling
Edge
Detect
SEGMENT 4
Unlatch the metal peg present flag when the component has left the reject
area.
Part Left
Metal Peg
Reject
Present
Area
F001.4
F001.2
(U)
4.6.18
Siemens S5 Labwork 5
Siemens S5 Labwork 5:
Metal Component Detection and Sorting
Objective
The objective of this labwork is to combine the sorting & assembly area
loading routine developed in labwork 3 together with a routine which, by
using the sensors situated along the belt conveyor, can detect the presence
of a single metal peg and eject the peg into the reject bin.
Procedure
1.
2.
I/P 32.7
INDUCTIVE SENSOR
I/P 32.5
IR THROUGH BEAM
I/P 32.6
CAPACITIVE SENSOR RELAYS
I/P 32.3
IR AT CAPACTIVE AREA RELAYS
I/P 32.2
IR AT REJECT AREA RELAYS
O/P 32.2
REJECT SOLENOID RELAYS
4.6.19
Siemens S5 Labwork 5
Solution
A ladder diagram solution for this labwork is given in Figure 4.6.9.
Note: With this program only ONE component may be passed along the
belt conveyor at any one time. In reality this is an unlikely situation. A
typical conveyor may have hundreds of components on the belt at any
one time. The problems associated with component queues are discussed
in Labwork 7.
COUNTER: 001
Queue
Counter
SEGMENT 2
Unlatch both the metal peg present and ring assembled flags on the first
execution pass.
First
Metal Peg
Pass
Present
Complete
F100.0
F001.2
/(U)
Ring
Assembled
F001.3
(U)
SEGMENT 3
Latch F100.0 so that any initiating will only occur on the first execution
pass.
First
Pass
Complete
F100.0
(L)
4.6.20
Siemens S5 Labwork 5
SEGMENT 4
Activate both the chain conveyor and belt conveyor motors.
Chain
Conveyor
Q032.3
( )
Belt
Conveyor
Q032.4
( )
SEGMENT 5
Activate the sort solenoid for 0.5 seconds when a plastic ring is detected on
the chain conveyor and the ring queue count is not full (less than 5).
Sort Area Metal Peg Ring Queue
Detect
Detect
Full
I032.1
I032.4
F001.0
TIMERWORD F000.0
// EXTENDED PULSE
(EN)
TIMER: 001
Sort
Solenoid
Q032.0
(TQ)
PRS: Constant
050.0
SEGMENT 6
Increment the ring queue counter when the sort solenoid is activated.
Sort
Solenoid
Q032.0
COUNTERWORD F000.0
COUNT UP
(EN)
COUNTER: 001
Queue
Counter
F000.1
(CC)
4.6.21
Siemens S5 Labwork 5
SEGMENT 7
Compare the ring queue counter with 5 (queue full) and set F1.0 to disable
ring sorting if necessary.
Ring Queue
Full
COMPAREWORD
F001.0
A = B
( )
A: C001
Queue
Counter
B: Constant
+5 D
SEGMENT 8
When the assembly hopper is empty and a ring is in the queue, initiate a timer
to give a 2 second delay before activating the rotary solenoid.
Queue
Assembly
Counter
Area Full
C001
I032.0
TIMERWORD F000.0
/ ON DELAY
(EN)
TIMER: 002
Dispense
Delay
Complete
F001.1
(TQ)
PRS: Constant
200.0
SEGMENT 9
Activate the rotary solenoid for 0.5 seconds when the 2 second delay has
expired to index the ring into the assembly hopper.
Dispense
Delay
Complete
F001.1
TIMERWORD F000.0
EXTENDED PULSE
(EN)
TIMER: 003
Rotary
Solenoid
Q032.1
(TQ)
PRS: Constant
050.0
4.6.22
Siemens S5 Labwork 5
SEGMENT 10
Decrement the ring queue counter when the rotary solenoid is activated.
Rotary
Solenoid
Q032.1
COUNTERWORD F000.0
COUNT DOWN
(EN)
COUNTER: 001
Queue
Counter
F000.1
(CC)
SEGMENT 11
Jump to Function Block 1 (alngbelt) to determine the type of component
traveling along the belt conveyor and reject if necessary.
JUMP TO SUBROUTINE
FB001
alngbelt
Pole Belt
Conveyor
F000.0
Sensors
(EN)
F000.1
(RT)
FB001
SEGMENT 1
Latch F1.2 when a metal peg is detected on the belt conveyor so that the
component will not be rejected.
NAME: alngbelt
Inductive
Metal Peg
Sensor
Present
I032.7
F001.2
(L)
SEGMENT 2
When a plastic ring is detected by the capacitive sensor, latch F1.3 to
indicate that the component is an assembled part.
Capacitive
Ring
Sensor
Assembled
I032.6
F001.3
(L)
4.6.23
Siemens S5 Labwork 5
SEGMENT 3
When only a metal peg is detected at the reject area, activate the reject
solenoid for 0.5 seconds to push the peg off the belt conveyor and into the
red bin (rejected).
Reject
Metal Peg
Ring
Area
Present
Assembled
Detect
I032.2
F001.2
F001.3
TIMERWORD F000.0
/ EXTENDED PULSE
(EN)
TIMER: 004
Reject
Solenoid
Q032.2
(TQ)
PRS: Constant
050.0
SEGMENT 4
Initiate a one shot output on the true to false transition (component leaving
the reject area) of the reject area sensor.
Reject
Part Left
Area
Reject
Detect
Area
I032.2
F001.4
ONE SHOT T -> F
( )
PS: F002.0
Falling
Edge
Detect
SEGMENT 5
Unlatch both the metal peg present and ring assembled flags when the component
has left the reject area.
Part Left
Metal Peg
Reject
Present
Area
F001.4
F001.2
(U)
Ring
Assembled
F001.3
(U)
4.6.24
Siemens S5 Labwork 6
Siemens S5 Labwork 6:
Component / Assembly Detection and Sorting
Objective
There are four objectives to labwork 6.
1.
2.
3.
4.
Procedure
1.
2.
4.6.25
Siemens S5 Labwork 6
INPUT 32.7
INDUCTIVE SENSOR
INPUT 32.5
IR THROUGH BEAM
INPUT 32.6
CAPACITIVE SENSOR
INPUT 32.3
IR AT CAPACITIVE AREA
INPUT 32.2
IR AT REJECT AREA
Solution
A ladder diagram solution for this labwork is given in figure 4.6.11.
Note: With this program only ONE component may be passed along the
belt conveyor at any one time. In reality this is an unlikely situation. A
typical conveyor may have hundreds of components on the belt at any
one time. The problems associated with component queues are discussed
in Labwork 7.
4.6.26
Siemens S5 Labwork 6
COUNTER: 001
Queue
Counter
SEGMENT 2
Unlatch both the metal peg present and ring assembled flags on the first
execution pass.
First
Metal Peg
Pass
Present
Complete
F100.0
F001.2
/(U)
Ring
Assembled
F001.3
(U)
SEGMENT 3
Latch F100.0 so that any initiating will only occur on the first execution
pass.
First
Pass
Complete
F100.0
(L)
SEGMENT 4
Activate both the chain conveyor and belt conveyor motors.
Chain
Conveyor
Q032.3
( )
Belt
Conveyor
Q032.4
( )
4.6.27
Siemens S5 Labwork 6
SEGMENT 5
Activate the sort solenoid for 0.5 seconds when a plastic ring is detected on
the chain conveyor and the ring queue count is not full (less than 5).
Sort Area Metal Peg Ring Queue
Detect
Detect
Full
I032.1
I032.4
F001.0
TIMERWORD F000.0
// EXTENDED PULSE
(EN)
TIMER: 001
Sort
Solenoid
Q032.0
(TQ)
PRS: Constant
050.0
SEGMENT 6
Increment the ring queue counter when the sort solenoid is activated.
Sort
Solenoid
Q032.0
COUNTERWORD F000.0
COUNT UP
(EN)
COUNTER: 001
Queue
Counter
F000.1
(CC)
SEGMENT 7
Compare the ring queue counter with 5 (queue full) and set F1.0 to disable
ring sorting if necessary.
Ring Queue
Full
COMPAREWORD
F001.0
A = B
( )
A: C001
Queue
Counter
B: Constant
+5 D
4.6.28
Siemens S5 Labwork 6
SEGMENT 8
When the assembly hopper is empty and a ring is in the queue, initiate a timer
to give a 2 second delay before activating the rotary solenoid.
Queue
Assembly
Counter
Area Full
C001
I032.0
TIMERWORD F000.0
/ ON DELAY
(EN)
TIMER: 002
Dispense
Delay
Complete
F001.1
(TQ)
PRS: Constant
200.0
SEGMENT 9
Activate the rotary solenoid for 0.5 seconds when the 2 second delay has
expired to index the ring into the assembly hopper.
Dispense
Delay
Complete
F001.1
TIMERWORD F000.0
EXTENDED PULSE
(EN)
TIMER: 003
Rotary
Solenoid
Q032.1
(TQ)
PRS: Constant
050.0
SEGMENT 10
Decrement the ring queue counter when the rotary solenoid is activated.
Rotary
Solenoid
Q032.1
COUNTERWORD F000.0
COUNT DOWN
(EN)
COUNTER: 001
Queue
Counter
F000.1
(CC)
4.6.29
Siemens S5 Labwork 6
SEGMENT 11
Jump to Function Block 1 (alngbelt) to determine the type of component
traveling along the belt conveyor and reject if necessary.
JUMP TO SUBROUTINE
FB001
alngbelt
Pole Belt
Conveyor
F000.0
Sensors
(EN)
F000.1
(RT)
FB001
SEGMENT 1
Latch F1.2 when a metal peg is detected on the belt conveyor so that the
component will not be rejected.
NAME: alngbelt
Inductive
Metal Peg
Sensor
Present
I032.7
F001.2
(L)
SEGMENT 2
When a plastic ring is detected by the capacitive sensor, latch F1.3 to
indicate that the component is an assembled part.
Capacitive
Ring
Sensor
Assembled
I032.6
F001.3
(L)
SEGMENT 3
When both a metal peg and plastic ring have been detected on the belt
conveyor, set F1.5 to indicate that a correctly assembled part is present.
Metal Peg
Ring
Assembled
Present
Assembled
Component
F001.2
F001.3
F001.5
( )
4.6.30
Siemens S5 Labwork 6
SEGMENT 4
When a component is detected at the reject area and the component is not an
assembled part, activate the reject solenoid for 0.5 seconds to push the
component off the belt conveyor and into the red bin (rejected).
Reject
Assembled
Area
Component
Detect
I032.2
F001.5
TIMERWORD F000.0
/ EXTENDED PULSE
(EN)
TIMER: 004
Reject
Solenoid
Q032.2
(TQ)
PRS: Constant
050.0
SEGMENT 5
Initiate a one shot output on the true to false transition (component leaving
the reject area) of the reject area sensor.
Reject
Part Left
Area
Reject
Detect
Area
I032.2
F001.4
ONE SHOT T -> F
( )
PS: F002.0
Falling
Edge
Detect
SEGMENT 6
Unlatch both the metal peg present and ring assembled flags when the component
has left the reject area.
Part Left
Metal Peg
Reject
Present
Area
F001.4
F001.2
(U)
Ring
Assembled
F001.3
(U)
4.6.31
Siemens S5 Labwork 7
Siemens S5 Labwork 7:
Component Queue Handling (complete system control)
Objective
The objective of this labwork is to enhance the detection and sorting
program developed in labwork 6 to deal with an assorted queue of
components travelling along the belt conveyor. This being a far more
realistic situation found in industry. Having completed this labwork, you
will have achieved full control of the ICT system.
Procedure
In order to obtain data on a single product amongst a queue of products
one of the following approaches is required a)
b)
Solution
A ladder diagram solution to this labwork is shown in figure 4.6.12.
4.6.32
Siemens S5 Labwork 7
Initialise
F000.1
(RT)
SEGMENT 2
Latch F100.0 so that any initiating will only occur on the first execution
pass.
First
Pass
Complete
F100.0
(L)
SEGMENT 3
Activate both the chain conveyor and belt conveyor motors.
Chain
Conveyor
Q032.3
( )
Belt
Conveyor
Q032.4
( )
SEGMENT 4
Activate the sort solenoid for 0.5 seconds when a plastic ring is detected on
the chain conveyor and the ring queue count is not full (less than 5).
Sort Area Metal Peg Ring Queue
Detect
Detect
Full
I032.1
I032.4
F001.0
TIMERWORD F000.0
// EXTENDED PULSE
(EN)
TIMER: 001
Sort
Solenoid
Q032.0
(TQ)
PRS: Constant
050.0
4.6.33
Siemens S5 Labwork 7
SEGMENT 5
Increment the ring queue counter when the sort solenoid is activated.
Sort
Solenoid
Q032.0
COUNTERWORD F000.0
COUNT UP
(EN)
COUNTER: 001
Queue
Counter
F000.1
(CC)
SEGMENT 6
Compare the ring queue counter with 5 (queue full) and set F1.0 to disable
ring sorting if necessary.
Ring Queue
Full
COMPAREWORD
F001.0
A = B
( )
A: C001
Queue
Counter
B: Constant
+5 D
SEGMENT 7
When the assembly hopper is empty and a ring is in the queue, initiate a timer
to give a 2 second delay before activating the rotary solenoid.
Queue
Assembly
Counter
Area Full
C001
I032.0
TIMERWORD F000.0
/ ON DELAY
(EN)
TIMER: 002
Dispense
Delay
Complete
F001.1
(TQ)
PRS: Constant
200.0
4.6.34
Siemens S5 Labwork 7
SEGMENT 8
Activate the rotary solenoid for 0.5 seconds when the 2 second delay has
expired to index the ring into the assembly hopper.
Dispense
Delay
Complete
F001.1
TIMERWORD F000.0
EXTENDED PULSE
(EN)
TIMER: 003
Rotary
Solenoid
Q032.1
(TQ)
PRS: Constant
050.0
SEGMENT 9
Decrement the ring queue counter when the rotary solenoid is activated.
Rotary
Solenoid
Q032.1
COUNTERWORD F000.0
COUNT DOWN
(EN)
COUNTER: 001
Queue
Counter
F000.1
(CC)
SEGMENT 10
Jump to Function Block 1 (alngbelt) to determine the type of component
traveling along the belt conveyor and reject if necessary.
JUMP TO SUBROUTINE
FB001
alngbelt
Pole Belt
Conveyor
F000.0
Sensors
(EN)
F000.1
(RT)
PB001
SEGMENT 1
Clear the ring queue counter (counter 1).
COUNTERWORD F000.0
CLEAR
(EN)
COUNTER: 001
Queue
Counter
4.6.35
Siemens S5 Labwork 7
SEGMENT 2
Clear the inductive sensor data register.
MOVEWORD F000.0
A -> B
(EN)
A: Constant
+0 D
B: FW010
Inductive
Data
Register
SEGMENT 3
Initialise the inductive sensor pointer register.
MOVEWORD F000.0
A -> B
(EN)
A: Constant
0100 H
B: FW012
Inductive
Pointer
Register
SEGMENT 4
Clear the capacitive sensor data register.
MOVEWORD F000.0
A -> B
(EN)
A: Constant
+0 D
B: FW020
Capacitive
Data
Register
4.6.36
Siemens S5 Labwork 7
SEGMENT 5
Initialise the capacitive sensor pointer register.
MOVEWORD F000.0
A -> B
(EN)
A: Constant
0100 H
B: FW022
Capacitive
Pointer
Register
FB001
SEGMENT 1
Initiate a one shot output on the false to true transition of the
inductive sensor (metal peg detected on the belt conveyor).
NAME: alngbelt
Inductive
Inductive
Sensor
One Shot
Output
I032.7
F002.1
ONE SHOT F -> T
( )
PS: F002.0
SEGMENT 2
On the one shot output of the inductive sensor, latch the first bit of the
inductive sensor data register to indicate that a metal peg is present.
Inductive
One Shot
Output
F002.1
F010.0
(L)
SEGMENT 3
Initiate a one shot output on the true to false transition of the thru-beam
sensor (component leaving inductive sensor area).
Thru-beam
Left
Sensor
Inductive
Area
I032.5
F002.3
ONE SHOT T -> F
( )
PS: F002.2
4.6.37
Siemens S5 Labwork 7
SEGMENT 4
On the one shot output of the thru-beam sensor, shift left by 1 bit both the
inductive sensor data register and the inductive sensor pointer register
(segment 5).
Left
Inductive
Area
F002.3
BIT OPERATIONWORD F000.0
SHIFT LEFT
(EN)
A: FW010
Inductive
Data
Register
F000.1
(LB)
BITS TO SHIFT:
01
SEGMENT 5
Left
Inductive
Area
F002.3
BIT OPERATIONWORD F000.0
SHIFT LEFT
(EN)
A: FW012
Inductive
Pointer
Register
F000.1
(LB)
BITS TO SHIFT:
01
SEGMENT 6
Initiate a one shot output on the false to true transition of the capacitive
sensor (plastic ring detected on a metal peg).
Capacitive
Capacitive
Sensor
One Shot
Output
I032.6
F002.5
ONE SHOT F -> T
( )
PS: F002.4
SEGMENT 7
On the one shot output of the capacitive sensor, latch the first bit of the
capacitive sensor data register to indicate that an assembled component is
present.
Capacitive
One Shot
Output
F002.5
F020.0
(L)
4.6.38
Siemens S5 Labwork 7
SEGMENT 8
Initiate a one shot output on the true to false transition of the capacitive
area sensor (component leaving capacitive sensor area).
Capacitive
Left
Area
Capacitive
Sensor
Area
I032.3
F002.7
ONE SHOT T -> F
( )
PS: F002.6
SEGMENT 9
On the one shot output of the capacitive area sensor, shift left by 1 bit
both the capacitive sensor data register and the capacitive sensor pointer
register (segment 10).
Left
Capacitive
Area
F002.7
BIT OPERATIONWORD F000.0
SHIFT LEFT
(EN)
A: FW020
Capacitive
Data
Register
F000.1
(LB)
BITS TO SHIFT:
01
SEGMENT 10
Left
Capacitive
Area
F002.7
BIT OPERATIONWORD F000.0
SHIFT LEFT
(EN)
A: FW022
Capacitive
Pointer
Register
F000.1
(LB)
BITS TO SHIFT:
01
4.6.39
Siemens S5 Labwork 7
SEGMENT 11
Check both the inductive sensor and capacitive sensor data registers with the
corresponding pointer registers to determine whether the leading component on
the belt conveyor is an assembled component and set F1.2 accordingly.
Assembled
Component
F010.0
F012.0
F020.0
F022.0
F001.2
( )
F010.1
F012.1 F020.1
F022.1
F010.2
F012.2 F020.2
F022.2
F010.3
F012.3 F020.3
F022.3
F010.4
F012.4 F020.4
F022.4
SEGMENT 12
When a component is detected at the reject area and the component is not an
assembled part, activate the reject solenoid for 0.5 seconds to push the
component off the belt conveyor and into the red bin (rejected).
Reject
Assembled
Area
Component
Detect
I032.2
F001.2
TIMERWORD F000.0
/ EXTENDED PULSE
(EN)
TIMER: 004
Reject
Solenoid
Q032.2
(TQ)
PRS: Constant
050.0
4.6.40
Siemens S5 Labwork 7
SEGMENT 13
Initiate a one shot output on the true to false transition (component leaving
the reject area) of the reject area sensor.
Reject
Part Left
Area
Reject
Detect
Area
I032.2
F001.4
ONE SHOT T -> F
( )
PS: F003.0
SEGMENT 14
On the one shot output of the reject sensor, shift right by 1 bit both the
inductive sensor and capacitive sensor pointer registers (segment 15) ready
for the next component.
Part Left
Reject
Area
F001.4
BIT OPERATIONWORD F000.0
SHIFT RIGHT UNSIGNED(EN)
A: FW012
Inductive
Pointer
Register
F000.1
(LB)
BITS TO SHIFT:
01
SEGMENT 15
Part Left
Reject
Area
F001.4
BIT OPERATIONWORD F000.0
SHIFT RIGHT UNSIGNED(EN)
A: FW022
Capacitive
Pointer
Register
F000.1
(LB)
BITS TO SHIFT:
01
4.6.41
PLC Inputs
I0.0
I0.1
I0.2
I0.3
I0.4
I0.5
I0.6
I0.7
PLC Outputs
Q0.0
Q0.1
Q0.2
Q0.3
Q0.4
Function
IR Reflective at the assembly area
IR Reflective at the sort area
IR Reflective at the reject area
IR Reflective at the capacitive area
IR Reflective to sense a metal peg at the sort area
IR Through beam sensor on the belt conveyor
Capacitive sensor
Inductive sensor
Function
Sort Solenoid
Rotary Solenoid
Reject Solenoid
Chain Conveyor
Belt Conveyor
There are no facilities to provide inputs to the PLC from the Start/Stop
and Emergency Stop push buttons.
4.7.1
Note: The Siemens S7-200 PLC provides the capability to either set the
state of the outputs to known values upon a transition to STOP
mode, or to leave the outputs in the state they were prior to the
transition to STOP mode.
It is recommended that this capability is configured so the outputs
are turned off and that none of the actuators on the ICT1 are left
activated when the transition to STOP mode is made. This can be
achieved by following these simple steps:
1.
2.
3.
4.
5.
If any output bits are set to 1, use the cursor keys to position
the cursor over the 1 and press 0 to reset the bit.
6.
Finally, when all output bits have been set to 0, select SET F2 to enter the output table.
4.7.2
2.
Procedure
1.
2.
In the sort area there are two infra red (I/R) proximity sensors a) Input Sensor 1 : Proximity sensor at sort area.
b) Input Sensor 4 : I/R reflective sensor to sense the metal peg.
4.7.3
Solution
A ladder diagram solution for this labwork is given in figure 4.7.2.
4.7.4
Always
Chain
On
Conveyor
SM0.0
Q0.3
(
)
Sort
Component
Area
At Sort
Detect
Area
I0.1
M0.0
P (
)
chute.
Component Metal
Sort
Sort
At Sort
Peg
Solenoid
Solenoid
Area
Detect
On Time
M0.0
I0.4
T40
Q0.0
/ / (
)
Sort
Sort
Solenoid
Solenoid
On Time
Q0.0
TON
T40
IN
K5PT
( MEND )
4.7.5
(b). Ignore the plastic rings at sort area, allowing them to pass on into
the excess bin at the end of the chain conveyor.
Procedure
1.
2.
3.
Solution
A ladder diagram for this labwork is given in figure 4.7.3.
4.7.6
Always
Chain
On
Conveyor
SM0.0
Q0.3
(
)
Sort
Component
Area
At Sort
Detect
Area
I0.1
M0.0
P (
)
component is not a metal peg and the ring queue count is not
full, activate the sort solenoid for 0.5 seconds to push the
Component Metal
Ring
Sort
Sort
At Sort
Peg
Queue
Solenoid
Solenoid
Area
Detect
Counter
On Time
M0.0
I0.4
C0
T40
Q0.0
/ / / (
)
Sort
Sort
Solenoid
Solenoid
On Time
Q0.0
TON
T40
IN
K5PT
Increment the ring queue count when the sort solenoid has
(SM0.1).
Sort
Ring
Solenoid
Queue
On Time
Counter
T40
CTU
C0
CU
First
Scan
K5PV
SM0.1
( MEND )
4.7.7
2.
3.
Procedure
1.
2.
Activate the belt conveyor so that the pegs will travel along the belt
conveyor, picking up the ring waiting in the assembly hopper on the
way.
3.
4.
5.
4.7.8
Note: Time delays need to be built into the program in the following
areas a)
b)
When there are no plastic rings in the queue and assembly hopper is
empty, a time delay must be incorporated to allow for a sorted ring
to settle against the index cam.
c)
Areas B and C above, can be incorporated into one timer by following the
statement: If the assembly hopper is empty and there are rings in the
queue, wait for 2 seconds before activating the rotary solenoid.
Solution
A ladder diagram solution for this labwork is given in figure 4.7.5.
4.7.9
Always
Chain
On
Conveyor
SM0.0
Q0.3
(
)
Belt
Conveyor
Q0.4
(
)
Sort
Component
Area
At Sort
Detect
Area
I0.1
M0.0
P (
)
component is not a metal peg and the ring queue count is not
full, activate the sort solenoid for 0.5 seconds to push the
Component Metal
Ring
Sort
Sort
At Sort
Peg
Queue
Solenoid
Solenoid
Area
Detect
Counter
On Time
M0.0
I0.4
C48
T40
Q0.0
/ / / (
)
Sort
Sort
Solenoid
Solenoid
On Time
Q0.0
TON
T40
IN
K5PT
4.7.10
Increment the ring queue count when the sort solenoid has
Sort
Ring
Solenoid
Queue
On Time
Counter
T40
CTUD
C48
CU
Rotary
Solenoid
On Time
K5PV
T42
CD
First
Scan
SM0.1
assembly area.
Ring
Assembly Dispense
Dispense
Queue
Area
Delay
Delay
Counter
Full
C48
K1
I0.0
T41
TON
T41
>= W / / IN
K20PT
assembly hopper.
Dispense Rotary
Rotary
Delay
Solenoid
Solenoid
On Time
T41
T42
Q0.1
/ (
)
Rotary
Rotary
Solenoid
Solenoid
On Time
Q0.1
TON
T42
IN
K5PT
( MEND )
4.7.11
Procedure
1.
2.
a)
b)
c)
d)
e)
4.7.12
By logically gating the results from one pass of these sensors, the type of
object can be determined and therefore sorted / rejected. With the
standard pre-set arrangement of sensors the signal feedback sequence for
a single plastic ring is shown in figure 4.7.6.
Solution
A ladder diagram solution for this labwork is given in figure 4.7.7.
Note: With this program only ONE component may be passed along the
belt conveyor at any one time. In reality this is an unlikely situation. A
typical conveyor may have hundreds of components on the belt at any
one time. The problems associated with component queues are discussed
in labwork 7.
4.7.13
First
Metal Peg
Scan
Present
SM0.1
M0.1
K1
(
R
)
Always
Chain
On
Conveyor
SM0.0
Q0.3
(
)
Belt
Conveyor
Q0.4
(
)
Sort
Component
Area
At Sort
Detect
Area
I0.1
M0.0
P (
)
component is not a metal peg and the ring queue count is not
full, activate the sort solenoid for 0.5 seconds to push the
Component Metal
Ring
Sort
Sort
At Sort
Peg
Queue
Solenoid
Solenoid
Area
Detect
Counter
On Time
M0.0
I0.4
C48
T40
Q0.0
/ / / (
)
Sort
Sort
Solenoid
Solenoid
On Time
Q0.0
TON
T40
IN
K5PT
4.7.14
Increment the ring queue count when the sort solenoid has
Sort
Ring
Solenoid
Queue
On Time
Counter
T40
CTUD
C48
CU
Rotary
Solenoid
On Time
K5PV
T42
CD
First
Scan
SM0.1
assembly area.
Ring
Assembly Dispense
Dispense
Queue
Area
Delay
Delay
Counter
Full
C48
K1
I0.0
T41
TON
T41
>= W / / IN
K20PT
assembly hopper.
Dispense Rotary
Rotary
Delay
Solenoid
Solenoid
On Time
T41
T42
Q0.1
/ (
)
Rotary
Rotary
Solenoid
Solenoid
On Time
Q0.1
TON
T42
IN
K5PT
Inductive
Metal Peg
Sensor
Present
I0.7
M0.1
K1
(
S
)
4.7.15
10
11
for 0.5 seconds to eject the component into the reject bin.
Reject
Metal Peg Reject
Reject
Area
Present
Solenoid
Solenoid
Detect
On Time
I0.2
M0.1
T43
Q0.2
/ / (
)
Reject
Reject
Solenoid
Solenoid
On Time
Q0.2
TON
T43
IN
K5PT
Reject
Metal Peg
Area
Present
Detect
I0.2
M0.1
K1
N (
R
)
( MEND )
4.7.16
Procedure
1.
2.
4.7.17
Solution
A ladder diagram solution for this labwork is given in figure 4.7.9.
Note: With this program only ONE component may be passed along the
belt conveyor at any one time. In reality this is an unlikely situation. A
typical conveyor may have hundreds of components on the belt at any
one time. The problems associated with component queues are discussed
in labwork 7.
First
Metal Peg
Scan
Present
SM0.1
M0.1
K2
(
R
)
Always
Chain
On
Conveyor
SM0.0
Q0.3
(
)
Belt
Conveyor
Q0.4
(
)
Sort
Component
Area
At Sort
Detect
Area
I0.1
M0.0
P (
)
component is not a metal peg and the ring queue count is not
full, activate the sort solenoid for 0.5 seconds to push the
Component Metal
Ring
Sort
Sort
At Sort
Peg
Queue
Solenoid
Solenoid
Area
Detect
Counter
On Time
M0.0
I0.4
C48
T40
Q0.0
/ / / (
)
Sort
Sort
Solenoid
Solenoid
On Time
Q0.0
TON
T40
IN
K5PT
4.7.18
Increment the ring queue count when the sort solenoid has
Sort
Ring
Solenoid
Queue
On Time
Counter
T40
CTUD
C48
CU
Rotary
Solenoid
On Time
K5PV
T42
CD
First
Scan
SM0.1
assembly area.
Ring
Assembly Dispense
Dispense
Queue
Area
Delay
Delay
Counter
Full
C48
K1
I0.0
T41
TON
T41
>= W / / IN
K20PT
assembly hopper.
Dispense Rotary
Rotary
Delay
Solenoid
Solenoid
On Time
T41
T42
Q0.1
/ (
)
Rotary
Rotary
Solenoid
Solenoid
On Time
Q0.1
TON
T42
IN
K5PT
Inductive
Metal Peg
Sensor
Present
I0.7
M0.1
K1
(
S
)
4.7.19
10
11
12
assembled part.
Capacitve
Ring
Sensor
Assembled
I0.6
M0.2
K1
(
S
)
reject bin.
Reject
Metal Peg Ring
Reject
Reject
Area
Present
Assembled Solenoid
Solenoid
Detect
On Time
I0.2
M0.1
M0.2
T43
Q0.2
/ / (
)
Reject
Reject
Solenoid
Solenoid
On Time
Q0.2
TON
T43
IN
K5PT
Reject
Metal Peg
Area
Present
Detect
I0.2
M0.1
K2
N (
R
)
( MEND )
4.7.20
The sorting of the plastic rings on the chain conveyor and assembly
hopper loading (as in labwork 3).
2.
3.
4.
Procedure
1.
2.
4.7.21
Aluminium Peg
Detected Using the Inductive Sensor (INPUT 7)
INPUT 7
INDUCTIVE SENSOR
INPUT 5
IR THROUGH BEAM
INPUT 6
CAPACITIVE SENSOR
INPUT 3
IR AT CAPACITIVE AREA
INPUT 2
IR AT REJECT AREA
Solution
A ladder diagram solution for this labwork is given in figure 4.7.11.
Note: With this program only ONE component may be passed along the
belt conveyor at any one time. In reality this is an unlikely situation. A
typical conveyor may have hundreds of components on the belt at any
one time. The problems associated with component queues are discussed
in labwork 7.
4.7.22
First
Metal Peg
Scan
Present
SM0.1
M0.1
K2
(
R
)
Always
Chain
On
Conveyor
SM0.0
Q0.3
(
)
Belt
Conveyor
Q0.4
(
)
Sort
Component
Area
At Sort
Detect
Area
I0.1
M0.0
P (
)
component is not a metal peg and the ring queue count is not
full, activate the sort solenoid for 0.5 seconds to push the
Component Metal
Ring
Sort
Sort
At Sort
Peg
Queue
Solenoid
Solenoid
Area
Detect
Counter
On Time
M0.0
I0.4
C48
T40
Q0.0
/ / / (
)
Sort
Sort
Solenoid
Solenoid
On Time
Q0.0
TON
T40
IN
K5PT
4.7.23
Increment the ring queue count when the sort solenoid has
Sort
Ring
Solenoid
Queue
On Time
Counter
T40
CTUD
C48
CU
Rotary
Solenoid
On Time
K5PV
T42
CD
First
Scan
SM0.1
assembly area.
Ring
Assembly Dispense
Dispense
Queue
Area
Delay
Delay
Counter
Full
C48
K1
I0.0
T41
TON
T41
>= W / / IN
K20PT
assembly hopper.
Dispense Rotary
Rotary
Delay
Solenoid
Solenoid
On Time
T41
T42
Q0.1
/ (
)
Rotary
Rotary
Solenoid
Solenoid
On Time
Q0.1
TON
T42
IN
K5PT
Inductive
Metal Peg
Sensor
Present
I0.7
M0.1
K1
(
S
)
4.7.24
10
11
12
assembled part.
Capacitve
Ring
Sensor
Assembled
I0.6
M0.2
K1
(
S
)
Reject
Metal Peg Reject
Reject
Area
Present
Solenoid
Solenoid
Detect
On Time
I0.2
M0.1
T43
Q0.2
/ / (
)
Ring
Reject
Assembled
Solenoid
On Time
M0.2
TON
T43
/
IN
Reject
Solenoid
K5PT
Q0.2
Reject
Metal Peg
Area
Present
Detect
I0.2
M0.1
K2
N (
R
)
( MEND )
4.7.25
Procedure
Data retrieved by the sensors on the belt conveyor as a component passes
through them must be stored so that when the component reaches the
reject area the appropriate action can be taken. One method of achieving
this is to store the data in a shift register and use a second shift register to
'point' to the data of the leading component. When the component reaches
the reject area, the two shift registers are then logically 'ANDed' together
to determine whether the component needs to be rejected.
Basically, a shift register is a 16 bit word which, by using either the shift
left (SLW) or shift right (SRW) instructions, the pattern of 0's and 1's can
be moved along the word.
4.7.26
Solution
A ladder diagram solution for this labwork is given in figure 4.7.12.
The use of shift registers to deal with a queue of components travelling
along the belt conveyor has been implemented as follows:
1.
Four shift registers have been used. Shift register MW2 has been
designated as an inductive sensor pointer register and is initialised
with an 'ON' state in register M3.0. This is repeated for shift
register MW6 which acts as a capacitive sensor pointer register.
Two further shift registers, MW4 and MW8, will hold the data
retrieved from the inductive and capacitive sensors.
2.
The data retrieved from the component passing the inductive sensor
is loaded into the first element of shift register MW4 (e.g. 'ON' for
a metal peg, 'OFF' for a plastic ring). When the component passes
through the through beam sensor, both the inductive sensor pointer
(MW2) and data (MW4) shift registers are shifted left by 1 bit.
3.
4.
MW2
Capacitive Sensor
Pointer Register
Capacitive Sensor
Data Register
MW4
MW6
4.7.27
MW8
In the example given on the previous page there are three items in
queue (M3.3 and M7.3 are ON). The first is a plastic ring, the
second is a correctly assembled component and the third is a metal
peg.
5.
When the component reaches the reject area, the result of the 'AND'
instruction is used to determine whether to reject the component. In
the example, the result would be '0' thus the control program will
reject the component.
6.
When the component has left the reject area by either being
accepted or rejected, the inductive sensor and capacitive sensor
pointer registers are shifted right by 1 bit to point to the next
component along the belt conveyor. In the example, the '1' in both
M3.3 and M7.3 would be shifted to M3.2 and M7.2. The result of a
logical 'AND' on these registers would now be '1'. Thus, when the
component reaches the reject area, it will be allowed to pass and
slide into the accept hopper at the end of the belt conveyor.
First
Component
Scan
At Sort
Area
SM0.1
M0.0
K80
(
R
)
Inductive
Pntr Frst
Element
M3.0
K1
(
S
)
Capacitve
Pntr Frst
Element
M7.0
K1
(
S
)
Always
Chain
On
Conveyor
SM0.0
Q0.3
(
)
Belt
Conveyor
Q0.4
(
)
4.7.28
Sort
Component
Area
At Sort
Detect
Area
I0.1
M0.0
P (
)
component is not a metal peg and the ring queue count is not
full, activate the sort solenoid for 0.5 seconds to push the
Component Metal
Ring
Sort
Sort
At Sort
Peg
Queue
Solenoid
Solenoid
Area
Detect
Counter
On Time
M0.0
I0.4
C48
T40
Q0.0
/ / / (
)
Sort
Sort
Solenoid
Solenoid
On Time
Q0.0
TON
T40
IN
K5PT
Increment the ring queue count when the sort solenoid has
Sort
Ring
Solenoid
Queue
On Time
Counter
T40
CTUD
C48
CU
Rotary
Solenoid
On Time
K5PV
T42
CD
First
Scan
SM0.1
4.7.29
assembly area.
Ring
Assembly Dispense
Dispense
Queue
Area
Delay
Delay
Counter
Full
C48
K1
I0.0
T41
TON
T41
>= W / / IN
K20PT
assembly hopper.
Dispense Rotary
Rotary
Delay
Solenoid
Solenoid
On Time
T41
T42
Q0.1
/ (
)
Rotary
Rotary
Solenoid
Solenoid
On Time
Q0.1
TON
T42
IN
K5PT
Inductive
Inductive
Sensor
Data Frst
Element
I0.7
M5.0
K1
(
S
)
Through
SHL_W
Beam
Sensor
I0.5
Inductive
Inductive
P Pointer EN
Pointer
Register
Register
MW2IN
OUTMW2
K1N
SHL_W
Inductive
Inductive
Data
EN
Data
Register
Register
MW4IN
OUTMW4
K1N
4.7.30
10
11
12
13
Capacitve
Capacatve
Sensor
Data Frst
Element
I0.6
M9.0
K1
(
S
)
Capacitve
SHL_W
Area
Detect
I0.3
Capacitve
Capacitve
P Pointer EN
Pointer
Register
Register
MW6IN
OUTMW6
K1N
SHL_W
Capacitve
Capacitve
Data
EN
Data
Register
Register
MW8IN
OUTMW8
K1N
Always
WAND_W
On
SM0.0
Inductive
Inductive
Pointer EN
AND
Register
Result
MW2IN1
OUTMW10
Inductive
Data
Register
MW4IN2
WAND_W
Capacitve
Capacitve
Pointer EN
AND
Register
Result
MW6IN1
OUTMW12
Capacitve
Data
Register
MW8IN2
Inductive
Capacitve
Assembled
AND
AND
Component
Result
Result
MW10
K1
MW12
K1
M0.3
>= W >= W (
)
4.7.31
14
15
16
Reject
Assembled Reject
Reject
Area
Component Solenoid
Solenoid
Detect
On Time
I0.2
M0.3
T43
Q0.2
/ / (
)
Reject
Reject
Solenoid
Solenoid
On Time
Q0.2
TON
T43
IN
K5PT
Reject
SHR_W
Area
Detect
I0.2
Inductive
Inductive
N Pointer EN
Pointer
Register
Register
MW2IN
OUTMW2
K1N
SHR_W
Capacitve
Capacitve
Pointer EN
Pointer
Register
Register
MW6IN
OUTMW6
K1N
( MEND )
4.7.32
Switched Faults
Switched Faults
As new systems emerge with the application of micro chip technology
and dedicated controllers, so there becomes a need for individuals
having the necessary fault finding skills. To develop these skills the
Industrial Control Trainer electronics has been designed in a fully test
pointed modular format and includes 16 individually selectable switched
faults.
The switched faults are typical of those found in a real industrial
application. Generally, an electrical fault is due to either 1.
2.
3.
4.
5.
Component failure.
Electrical short circuit to supply.
Electrical short circuit to ground.
Crossed signal wires either due to a short or incorrect
commissioning.
Open circuit due to a broken wire, burnt circuit track, or a
bad connection.
The Student can be set a fault finding task by simply observing the
correct operation of the Industrial Control Trainer. Switch in any
combination (out of 65535 combinations) of faults, the effect of each
fault is shown in figure 5.1 on the following page. Using a standard kit
of test equipment in conjunction with the test points and circuit
diagrams shown in the following section, the faults may be successfully
diagnosed.
5.1
Switched Faults
No.
Fault
Effect
F1
F2
F3
F4
F5
F6
F7
F8
F9
F10
F11
F12
F13
F14
F15
F16
5.2
Circuit Diagrams
Circuit Diagrams
In the following section the circuit diagrams for the Industrial Control
Trainer interface board, output driver board and signal conditioning board
are supplied. Two versions are supplied for both the output driver and
signal conditioning boards, one with switched faults and one without.
The circuit diagrams have the following figure numbers Figure:
6.1
6.2
6.3
6.4
6.5
6.1
Circuit Diagrams
6.2
Circuit Diagrams
6.3
Circuit Diagrams
6.4
Circuit Diagrams
6.5
Circuit Diagrams
6.6
Circuit Diagrams
6.7
Checklist
Checklist
Fault
Checklist
Either conveyors do
not work
7.1
Checklist
Fault
Checklist
Correctly assembled
components are being
rejected
Solenoids do not
operate
Infra-red sensor
permanently on
Infra-red through
beam sensor
permanently on
For further assistance with any problems with respect to the Industrial
Control Trainer, please do not hesitate to contact the Bytronic technical
department.
7.2
1.
2.
3.
Route the connecting lead from the Gauging Head Module along
the wiring harness towards the interface PCB. Connect the lead to
the terminal labelled GAUGING HEAD OPTION located along the
top edge of the interface PCB.
4.
8.1
Connection Instructions
Once the installation of the Gauging Head Module is complete, the
module can be connected via the interface board on the conveyor unit to
any microcontroller that has the following specifications:
1.
2.
3.
8.2
Software Calibration
In order to determine the diameter of the measured peg, the analogue
feedback signal must be scaled to represent a dimension in millimetres.
This is achieved by measuring the 30mm diameter peg, recording the
analogue value and then repeating the process with the 32.5mm peg.
Assuming that the response from the LPDT sensor is linear, a value for
every increment in the size of peg (0.5mm) can then be calculated.
For example:
Peg 30.0mm =
Peg 32.5mm =
Difference
=
1506
-1247
259
8.3
An LPDT.
An Inductive Proximity Sensor.
Clamp solenoid control.
The above elements are discussed in detail in this section. Those readers
who are not interested in the details of the electronics can proceed to the
Gauging Head Labworks section of this manual.
8.4
Specifications
Standard Resistance Values
Resistance Tolerance
Linearity Tolerance
Resolution
Output Smoothness
Contact Resistance Variation
Power Rating
Electrical Stroke
Mechanical Stroke
Insulation Resistance
Dielectric Strength
Friction
Stopper Strength
Resistance Temperature Coefficient
Weight
13FLP25A
500R 1K, 2K, 5K, 10K ()
20%
1.5%
Essentially Infinite
Below 0.1% against voltage
Below 2% C.R.V.
0.4W
25.40.5mm
25.4 +3/-0 mm
Over 1,000M at 500 V.D.C.
1 minute at 500 V.A.C.
Below 100gf (1N)
2kgf (20N)
400p.p.m./C
Approx. 15g
8.5
NPN transistor
PNP transistor
NAMUR current output
Mild steel
Stainless steel
Brass
Aluminium
Copper
8.6
1
0.7 - 0.8
0.4 - 0.5
0.3 - 0.4
0.3 - 0.4
SPECIFICATION
ALLEN-BRADLEY
871C-DH4NP12-E2
12mm
200mA
15mA
.1mA
10 - 30 VDC
1V
5%
10%
4mm
Yes
Yes
400Hz
PNP
-25C to +55C
Nema Type 4, 13 / IP67
Barrel Diameter
Load Current
Supply Current
Leakage Current
Operating Voltage Range
Voltage Drop
Repeatability
Hysteresis
Sensing Distance *
Protection : Short Circuit
Reverse Polarity
Oscillator Frequency
Output Configuration
Temperature Range
Enclosure Range
8.7
8.8
Title
Peg Detection and Measuring.
Gauging Head Calibration.
Analogue Dimension Conversion.
Peg Acception / Rejection.
Full System Control.
All labworks have been written with the presumption that the ICT and
Gauging Head Module have been connected to the host controller as
described in the Getting Started section of this manual.
9.1
Procedure
A flow diagram of the procedure can be found in figure 9.1 and follows
the basic steps shown below.
1.
2.
Use the gauging head area detect signal to detect the presence of a
metal peg.
3.
4.
Solution
A solution for this labwork can be found on the labworks disk included
with this manual in the following files:
GHLAB1.BAS
GHLAB1.ACH
GHLAB1.PGR
PC Compatibles (QBASIC)
Allen-Bradley SLC500
Siemens S5-95U
9.2
START
No
Is the sensor
signal high?
Yes
Clear the peg size
record register
9.3
3
1
No
Is new value
greater than
old?
Yes
Store now value in
record register
No
Has 1.5
second timer
elapsed
Yes
9.4
Procedure
A flow diagram of the procedure can be found in figure 9.2 and follows
the basic steps shown below.
1.
2.
Prompt the user to place the 30mm diameter size peg onto the belt
conveyor (activate spare O/P 0 when using a PLC).
3.
4.
Prompt the user to place the 32.5mm diameter size peg onto the
belt conveyor (activate spare O/P 1 when using a PLC).
5.
6.
Note: When using a PLC, replace the 2.5 in the formula for 25. This is
needed because PLC's cannot store floating point numbers.
9.5
Solution
A solution for this labwork can be found on the labworks disk included
with this manual in the following files:
GHLAB2.BAS
GHLAB2.ACH
GHLAB2.PGR
PC Compatibles (QBASIC)
Allen-Bradley SLC500
Siemens S5-95U
START
No
Is the sensor
signal high?
Yes
1
9.6
No
Is the sensor
signal high?
Yes
Read the peak
analogue dimension as
done in labwork 1
END
9.7
Procedure
A flow diagram of the procedure can be found in figure 9.3 and follows
the basic steps shown below.
1.
2.
3.
Where:
30mm Peg Size is the first value read in by the calibration routine.
Analogue Value is the value of the measured peg.
CALIBCONST is the calibration constant calculated by the
calibration routine.
Note: When using a PLC, substitute the 30 at the beginning of the
formula with 300. The formula will return the dimension of
the peg in millimetres multiplied by a factor of 10 and is
required as PLC's cannot store floating point numbers.
9.8
Solution
A solution for this labwork can be found on the labworks disk included
with this manual in the following files:
GHLAB3.BAS
GHLAB3.ACH
GHLAB3.PGR
PC Compatibles (QBASIC)
Allen-Bradley SLC500
Siemens S5-95U
START
No
Exit?
Yes
END
9.9
Procedure
A flow diagram of the procedure can be found in figure 9.4 and follows
the basic steps shown below.
1.
2.
When a metal peg enters the gauging area, activate the clamping
solenoid to measure the peg and convert the analogue reading into a
dimension value using the routine developed in labwork 3.
4.
When the metal peg enters the reject area, compare the dimension
of the peg against two registers which contain a minimum and
maximum peg diameter size to accept. If the peg diameter is
outside of those chosen, activate the reject solenoid to eject the peg
into the reject bin.
Solution
A solution for this labwork can be found on the labworks disk included
with this manual in the following files:
GHLAB4.BAS
GHLAB4.ACH
GHLAB4.PGR
9.10
PC Compatibles (QBASIC)
Allen-Bradley SLC500
Siemens S5-95U
No
Is peg within
the tolerance
band?
Yes
Activate the reject
solenoid to eject the peg
into the reject bin
Exit?
No
Yes
END
9.11
Procedure
Combine the two routines so that:
1.
2.
The metal pegs and plastic rings travelling along the chain
conveyor are sorted into the assembly chute and feeder chute using
the sort solenoid.
3.
The plastic rings are queued and loaded into the assembly hopper
by using the rotary solenoid.
5.
The metal pegs and plastic rings are assembled on the belt
conveyor.
6.
7.
8.
9.12
Solution
A solution for this labwork can be found on the labworks disk included
with this manual in the following files:
GHLAB5.BAS
GHLAB5.ACH
GHLAB5.PGR
PC Compatibles (QBASIC)
Allen-Bradley SLC500
Siemens S5-95U
PLC Enhancement
If the PLC is mounted on a Bytronic PLC mounting frame, use the
minimum and maximum size potentiometers located on the control panel
to supply the sizes for the acceptable tolerance range. These two
potentiometers will have been connected to two spare analogue inputs
and their connections can be found in the PLC Mounting Frame
documentation.
A solution for this enhancement can be found on the labworks disk
included with this manual in the following files:
GHLAB5E.ACH
GHLAB5E.PGR
9.13
Allen-Bradley SLC500
Siemens S5-95U
Date :
Wired By :
Checked By :
PLC Terminal
Cable Specification
A1.1
ICT Terminal
Appendix 2:
Computer Header Configuration
40 WAY
HEADER PIN
31
33
35
37
38
36
34
32
23
25
27
29
30
28
26
24
15
17
19
21
22
20
18
16
39, 40
PORT
FUNCTION
A0
A1
A2
A3
A4
A5
A6
A7
B0
B1
B2
B3
B4
B5
B6
B7
C0
C1
C2
C3
C4
C5
C6
C7
GND
Sort Solenoid
Rotary Solenoid
Reject Solenoid
Chain Conveyor Motor
Belt Conveyor Motor
Optional Gauging Head Solenoid
Spare O/P
Spare O/P
IR Reflective at Assembly Area
IR Reflective at Sort Area
IR Reflective at Reject Area
IR Reflective at Capacitive Area
IR Reflective to Sense Metal Peg
IR Through Beam on Belt Conveyor
Capacitive Sensor
Inductive Sensor
LSB of Analogue Motor Control
Analogue Motor Control
Analogue Motor Control
Analogue Motor Control
Analogue Motor Control
Analogue Motor Control
Analogue Motor Control
MSB of Analogue Motor Control
Signal Ground
26 WAY
HEADER PIN
2
5
17
PORT
FUNCTION
ADC-CH0
ADC-CH1
GND
A2.1
Appendix 3:
ICT Standard Sensor Arrangement
The standard sensor arrangement set by Bytronic and used extensively in
the labworks is shown in figure A3.1.
Inductive Sensor
Belt Conveyor
Capacitive Sensor
Reject Solenoid
A3.1
Inductive Sensor
Adjust
Height
Keep Sensing
Distance < 5mm
Figure A3.2. Inductive Sensor Adjustment.
b)
c)
Adjust the clearance between the sensing face and the metal
component to less than 5mm. Check the operation of the sensor by
turning the ICT on and observing the inductive sensor indicator.
b)
Place a single plastic ring on the conveyor. Adjust the height of the
through beam sensor so that it senses the component as shown
below.
Plastic Ring
Belt Conveyor
Adjust
Height
A3.2
b)
c)
Adjust the height of the sensor so that the plastic ring is in the
centre of the sensing face. Using the mounting thread adjust the
sensor so that the plastic ring is within the sensing range.
Keep Sensing
Distance < 3mm
Plastic Ring
Metal Peg
Belt Conveyor
Adjust
Height
Figure A3.4. Capacitive Sensor Adjustment.
b)
b)
Adjust the range of the infra red reflective sensor to detect the
object by turning VR4.
Appendix 4:
Aluminium Peg Size Codes
Peg
Number of Rings
Diameter (mm)
30mm
30.5mm
31mm
31.5mm
32mm
32.5mm
No Rings
33mm
A4.1