You are on page 1of 264

Documentation

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

To increase sensitivity, turn the potentiometer clockwise. Turn the


potentiometer anti-clockwise to decrease sensitivity.
If any further problems are encountered, refer to the Checklist section of
this manual. If problems persist, contact Bytronics technical department.

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

The ICT Electronics.................................................. 3.1


Universal Interface.......................................................................3.1
Output Driver Board....................................................................3.2
Signal Conditioning Board ..........................................................3.3
Inductive Sensor.................................................................3.3
Capacitive Sensor...............................................................3.5
Photoelectric Sensors .........................................................3.6

Bytronic International Ltd.

Industrial Control Trainer Manual

Table of Contents

Labworks .................................................................. 4.1


Microcomputer Labworks ...........................................................4.2.1
Labwork 1 : Sorting Routine ................................................4.2.2
Labwork 2 : Queue Counting ...............................................4.2.5
Labwork 3 : Operation Timing.............................................4.2.7
Labwork 4 : Plastic Ring Detection and Sorting ..................4.2.11
Labwork 5 : Metal Component Detection and Sorting.........4.2.15
Labwork 6 : Component/Assembly Detection and Sorting..4.2.19
Labwork 7 : Queue Handling (complete system control).....4.2.24
Allen-Bradley SLC500/Micrologix 1000 Labworks ...................4.3.1
Labwork 1 : Sorting Routine ................................................4.3.2
Labwork 2 : Queue Counting ...............................................4.3.5
Labwork 3 : Operation Timing.............................................4.3.7
Labwork 4 : Plastic Ring Detection and Sorting ..................4.3.11
Labwork 5 : Metal Component Detection and Sorting.........4.3.16
Labwork 6 : Component/Assembly Detection and Sorting..4.3.20
Labwork 7 : Queue Handling (complete system control).....4.3.25
Mitsubishi F1 Labworks..............................................................4.4.1
Labwork 1 : Sorting Routine ................................................4.4.2
Labwork 2 : Queue Counting ...............................................4.4.5
Labwork 3 : Operation Timing.............................................4.4.7
Labwork 4 : Plastic Ring Detection and Sorting ..................4.4.11
Labwork 5 : Metal Component Detection and Sorting.........4.4.14
Labwork 6 : Component/Assembly Detection and Sorting..4.4.17
Labwork 7 : Component Queue Handling............................4.4.21
Labwork 8 : Complete System Control ................................4.4.27
Mitsubishi FXo Labworks ...........................................................4.5.1
Labwork 1 : Sorting Routine ................................................4.5.2
Labwork 2 : Queue Counting ...............................................4.5.5
Labwork 3 : Operation Timing.............................................4.5.7
Labwork 4 : Plastic Ring Detection and Sorting ..................4.5.11
Labwork 5 : Metal Component Detection and Sorting.........4.5.15
Labwork 6 : Component/Assembly Detection and Sorting..4.5.19
Labwork 7 : Queue Handling (complete system control).....4.5.24

Bytronic International Ltd.

Industrial Control Trainer Manual

Table of Contents

Siemens S5 Labworks .................................................................4.6.1


Labwork 1 : Sorting Routine ................................................4.6.2
Labwork 2 : Queue Counting ...............................................4.6.5
Labwork 3 : Operation Timing.............................................4.6.8
Labwork 4 : Plastic Ring Detection and Sorting ..................4.6.13
Labwork 5 : Metal Component Detection and Sorting.........4.6.19
Labwork 6 : Component/Assembly Detection and Sorting..4.6.25
Labwork 7 : Queue Handling (complete system control).....4.6.32
Siemens S7-200 Labworks ..........................................................4.7.1
Labwork 1 : Sorting Routine ................................................4.7.3
Labwork 2 : Queue Counting ...............................................4.7.6
Labwork 3 : Operation Timing.............................................4.7.8
Labwork 4 : Plastic Ring Detection and Sorting ..................4.7.12
Labwork 5 : Metal Component Detection and Sorting.........4.7.17
Labwork 6 : Component/Assembly Detection and Sorting..4.7.21
Labwork 7 : Queue Handling (complete system control).....4.7.26

Switched Faults........................................................ 5.1


Circuit Diagrams ...................................................... 6.1
Checklist ................................................................... 7.1
The Gauging Head Module...................................... 8.1
Installing the Gauging Head ........................................................8.1
Connection Instructions........................................................8.2
Gauging Head Principles of Operation........................................8.3
Software Calibration.............................................................8.3
The Gauging Head Electronics....................................................8.4
The Linear Potentiometric Displacement Transducer ..........8.4
Inductive Proximity Sensor ..................................................8.5
Clamp Solenoid Control.......................................................8.7

Bytronic International Ltd.

Industrial Control Trainer Manual

Table of Contents

Gauging Head Labworks......................................... 9.1


Labwork 1 : Peg Detection and Measuring .................................9.2
Labwork 2 : Calibration...............................................................9.5
Labwork 3 : Analogue Dimension Conversion ...........................9.8
Labwork 4 : Peg Acception / Rejection.......................................9.10
Labwork 5 : Full System Control ................................................9.12

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

Bytronic International Ltd.

Industrial Control Trainer Manual

Table of Contents

Figures

Bytronic International Ltd.

2.1
2.2
2.3
2.4
2.5
2.6
2.7
2.8
2.9
2.10
2.11

PC Microcomputer to ICT1 Set-up..................................2.2


MPCT7 PLC Output Wiring - 15 Way D Socket .........2.6
MPCT7 PLC Input Wiring - 15 Way D Plug................2.7
Mitsubishi F1 PLC Wiring Details ..................................2.8
Mitsubishi FXo PLC Wiring Details ...............................2.8
Allen-Bradley SLC500 Wiring Details............................2.9
Allen-Bradley MicroLogix 1000 Wiring Details.............2.9
Siemens S5-90U Wiring Details......................................2.10
Siemens S7-200 Wiring Details.......................................2.10
The ICT1 PLC Inputs and Outputs ..................................2.11
MPCT8 Analogue Input Wiring - 9 Way D Plug..........2.14

3.1
3.2
3.3
3.4
3.5
3.6
3.7

Types of Drive Circuit .....................................................3.2


Diagram of the Basic Principle of an Inductive Sensor...3.4
Diagram of a Non-Screened Inductive Sensor.................3.5
Diagram of a Screened Inductive Sensor.........................3.5
Diagram of the Basic Principles of a Capacitive Sensor .3.6
Configurations of Photoelectric Sensors .........................3.7
Diagram of an Infra-Red Reflective Sensor.....................3.8

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

Signal Sequences at the Sorting Area ..............................4.2.3


Program Listing for Labwork 1 .......................................4.2.4
Program Listing for Labwork 2 .......................................4.2.6
Timing Diagram for the Assembly Area .........................4.2.8
Program Listing for Labwork 3 .......................................4.2.9
Sensor Signal Sequence for a Plastic Ring ......................4.2.12
Program Listing for Labwork 4 .......................................4.2.13
Sensor Signal Sequence for a Metal Peg .........................4.2.15
Program Listing for Labwork 5 .......................................4.2.16
Sensor Signal Sequence for an Assembled Product ........4.2.20
Program Listing for Labwork 6 .......................................4.2.21
Program Listing for Labwork 7 .......................................4.2.25

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

Signal Sequences at the Sorting Area ..............................4.3.3


Ladder Diagram Solution for Labwork 1.........................4.3.4
Ladder Diagram Solution for Labwork 2.........................4.3.6
Timing Diagram for the Assembly Area .........................4.3.8
Ladder Diagram Solution for Labwork 3.........................4.3.9
Sensor Signal Sequence for a Plastic Ring ......................4.3.12
Ladder Diagram Solution for Labwork 4.........................4.3.13
Sensor Signal Sequence for a Metal Component.............4.3.16
Ladder Diagram Solution for Labwork 5.........................4.3.17
Sensor Signal Sequence for an Assembled Product ........4.3.21
Ladder Diagram Solution for Labwork 6.........................4.3.22
Ladder Diagram Solution for Labwork 7.........................4.3.26

Industrial Control Trainer Manual

Table of Contents

Bytronic International Ltd.

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

Signal Sequences at the Sorting Area ..............................4.4.3


Ladder Diagram Solution for Labwork 1.........................4.4.4
Code Listing for Labwork 1.............................................4.4.4
Ladder Diagram Solution for Labwork 2.........................4.4.6
Code Listing for Labwork 2.............................................4.4.6
Timing Diagram for the Assembly Area .........................4.4.8
Ladder Diagram Solution for Labwork 3.........................4.4.9
Code Listing for Labwork 3.............................................4.4.10
Sensor Signal Sequence for a Plastic Ring ......................4.4.12
Ladder Diagram Solution for Labwork 4.........................4.4.13
Code Listing for Labwork 4.............................................4.4.13
Sensor Signal Sequence for a Metal Component.............4.4.14
Ladder Diagram Solution for Labwork 5.........................4.4.15
Code Listing for Labwork 5.............................................4.4.16
Sensor Signal Sequence for an Assembled Product ........4.4.18
Ladder Diagram Solution for Labwork 6.........................4.4.19
Code Listing for Labwork 6.............................................4.4.20
Ladder Diagram Solution for Labwork 7.........................4.4.24
Code Listing for Labwork 7.............................................4.4.25
Ladder Diagram Solution for Labwork 8.........................4.4.28
Code Listing for Labwork 8.............................................4.4.31

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

Signal Sequences at the Sorting Area ..............................4.5.3


Ladder Diagram Solution for Labwork 1.........................4.5.4
Ladder Diagram Solution for Labwork 2.........................4.5.6
Timing Diagram for the Assembly Area .........................4.5.8
Ladder Diagram Solution for Labwork 3.........................4.5.9
Sensor Signal Sequence for a Plastic Ring ......................4.5.12
Ladder Diagram Solution for Labwork 4.........................4.5.13
Sensor Signal Sequence for a Metal Component.............4.5.15
Ladder Diagram Solution for Labwork 5.........................4.5.16
Sensor Signal Sequence for an Assembled Product ........4.5.20
Ladder Diagram Solution for Labwork 6.........................4.5.21
Ladder Diagram Solution for Labwork 7.........................4.5.27

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

Signal Sequences at the Sorting Area ..............................4.6.3


Ladder Diagram Solution for Labwork 1.........................4.6.4
Ladder Diagram Solution for Labwork 2.........................4.6.6
Timing Diagram for the Assembly Area .........................4.6.9
Ladder Diagram Solution for Labwork 3.........................4.6.10
Sensor Signal Sequence for a Plastic Ring ......................4.6.14
Ladder Diagram Solution for Labwork 4.........................4.6.15
Sensor Signal Sequence for a Metal Component.............4.6.19
Ladder Diagram Solution for Labwork 5.........................4.6.20
Sensor Signal Sequence for an Assembled Product ........4.6.26
Ladder Diagram Solution for Labwork 6.........................4.6.27
Ladder Diagram Solution for Labwork 7.........................4.6.33

Industrial Control Trainer Manual

Table of Contents

Bytronic International Ltd.

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

Signal Sequences at the Sorting Area ..............................4.7.4


Ladder Diagram Solution for Labwork 1.........................4.7.5
Ladder Diagram Solution for Labwork 2.........................4.7.7
Timing Diagram for the Assembly Area .........................4.7.9
Ladder Diagram Solution for Labwork 3.........................4.7.10
Sensor Signal Sequence for a Plastic Ring ......................4.7.13
Ladder Diagram Solution for Labwork 4.........................4.7.14
Sensor Signal Sequence for a Metal Component.............4.7.17
Ladder Diagram Solution for Labwork 5.........................4.7.18
Sensor Signal Sequence for an Assembled Product ........4.7.22
Ladder Diagram Solution for Labwork 6.........................4.7.23
Ladder Diagram Solution for Labwork 7.........................4.7.28

5.1

Switched Faults List and Effects .....................................5.2

6.1
6.2
6.3
6.4
6.5

ICT Interface Board Circuit Diagram ..............................6.2


Output Driver Board Full Circuit Diagram......................6.4
Output Driver Board Without Switched Faults ...............6.5
Signal Conditioning Board Full Circuit Diagram............6.6
Signal Conditioning Board Without Switched Faults .....6.7

8.1
8.2
8.3
8.4
8.5
8.6

Installing the Gauging Head Module...............................8.2


The Linear Potentiometric Displacement Transducer .....8.4
General Specifications of the LPDT................................8.5
Diagram of the Basic Principle of an Inductive Sensor...8.6
General Specifications of the Inductive Sensor ...............8.7
Gauging Head Circuit Diagram .......................................8.8

9.1
9.2
9.3
9.4

Flow Diagram for Labwork 1 ..........................................9.3


Flow Diagram for Labwork 2 ..........................................9.6
Flow Diagram for Labwork 3 ..........................................9.9
Flow Diagram for Labwork 4 ..........................................9.11

A3.1
A3.2
A3.3
A3.4

ICT Standard Sensor Arrangement............................... A3.1


Inductive Sensor Adjustment........................................ A3.2
IR Through Beam Sensor Adjustment.......................... A3.2
Capacitive Sensor Adjustment...................................... A3.3

Industrial Control Trainer Manual

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.

Bytronic International Ltd.

1.1

Industrial Control Trainer Manual

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.

Connecting the ICT1 to a PC Compatible Microcomputer


The ICT1 requires a minimum of 2 x 8 bit TTL ports. Bytronic can
supply the following suitable interfaces :
BYTRONIC INTERFACE
MPIBM1
PC Internal Interface
MPIBM3

AD/DA Digital Interface

MPIBM4

AD/DA Digital Interface

MPIBM6

AD/DA Digital Interface

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.

Connecting Procedure for the ICT1 to a PC.

Bytronic International Ltd

1.

Install the PC Interface Card, following the instructions given in the


accompanying manual.

2.

Ensure that both the Microcomputer and ICT1 power is OFF.

2.1

Industrial Control Trainer Manual

Getting Started

3.

Now connect the PC Interface to the 40 way header on the ICT1,


using a MPCT4 Connecting Cable (see figure 2.1).

4.

If you have a Gauging Head Module fitted, connect the 26 way


ribbon cable connector supplied with the interface card to the 26
way IDC header on the ICT Universal Interface. This provides the
feedback signals for both the analogue dimension reading and the
inductive sensor fitted to the Gauging Head.

5.

On the ICT Universal Interface set emergency stop to OFF (i.e.


switch not depressed) and the start/stop to STOP (i.e. depressed).
This is not essential but it does prevent spurious activation of the
outputs when the power is switched on.

6.

Re-check the connection arrangement to ensure correct


operation. Only after checking the connections, should power be
supplied to the ICT unit.

7.

Turn on the microcomputer system and then the Industrial Control


Trainer Power Supply.
Note: The ICT requires 12V d.c. @ 3Amps minimum, but with the
Gauging Head Module fitted this is increased to 12V d.c. @
5Amps.

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.

Figure 2.1. PC Microcomputer to ICT1 Set-Up.

Bytronic International Ltd

2.2

Industrial Control Trainer Manual

Getting Started

The PC Interactive Program


The Interactive Program supplied with the ICT1 (ICT.EXE) is to be used
when the ICT1 is connected to a PC compatible microcomputer as
discussed in the previous sections.
The program allows manual control of the actuators and feedback
monitoring of the digital inputs as well as a full control program to
assemble the metal pegs and plastic rings that are initially loaded onto the
chain conveyor.
A further feature is also included which utilises the Gauging Head. When
chosen, the minimum and maximum peg diameter sizes to accept must be
entered. Control of the ICT is then executed and the Gauging Head
measures the diameter of any correctly assembled pegs that travel along
the belt conveyor. Pegs that are outside of the minimum and maximum
tolerance bands are rejected when the part reaches the reject area.
If, at any time, you reset the ICT1, do not forget to reset the ICT software
by pressing F6.
In addition to the main program, a set-up program is included which
provides the following utilities.
i.

Selection of an alternative interface card base address.

ii. Selection of the type of analogue interface card installed.


iii. Gauging Head calibration.
All three utilities have visual instructions and are simple to follow.
Access to these set-up utilities can be gained by executing the
SETUP.EXE program file found on the ICT1 interactive program disk.

Bytronic International Ltd

2.3

Industrial Control Trainer Manual

Connecting the ICT1 to a Programmable Logic Controller

Connecting the ICT to a Programmable Logic Controller


A Programmable Logic Controller (PLC) may be quickly connected to
the ICT1 by using the D connectors on the ICT1 Universal Interface.
The 15 way D plug is for the PLC outputs, the 15 way D socket is for
the PLC inputs and the 9 way D connector is for analogue control of the
belt conveyor and for the optional Gauging Head dimension feedback
signal.

ICT1 to PLC Connecting Procedure


1.

If you have purchased the ICT as a package with a pre-wired PLC


from Bytronic, with the power turned off to both the PLC and the
ICT, connect the MPCT9 (or MPCT10 for Gauging Head option)
connecting cables between the PLC and the ICT Universal Interface
Board.

2.

If you have not purchased the ICT as a pre-wired package, refer to


the wiring details in figure 2.2 and figure 2.3. To help you we have
determined the wiring diagrams for some of the popular PLCs. The
PLC diagrams are as follows:
Figure 2.4
2.5
2.6
2.7
2.8
2.9

Bytronic International Ltd

Mitsubishi F1
Mitsubishi FXo
Allen-Bradley SLC500
Allen-Bradley MicroLogix 1000
Siemens S5-90U
Siemens S7-200

3.

The belt conveyor may be either controlled by a digital output, the


speed being pre-set by VR4 on the ICT output driver board or
alternatively controlled using a PLC analogue output. Refer to the
analogue motor control section of this section for details.

4.

Recheck the connection arrangement to ensure correct interface


operation.

5.

On the Industrial Control Trainer set the Emergency Stop "OFF"


(i.e. switch not depressed) and the Start/Stop to "STOP" (i.e. switch
depressed).

2.4

Industrial Control Trainer Manual

Connecting the ICT1 to a Programmable Logic Controller

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.

PLC Pack Software


If you have purchased your ICT1 as a PLC package, the PLC will come
with a control program pre-loaded. In the case of the Allen-Bradley
SLC500, Mitsubishi F1 and Siemens S5-90 & S5-95U PLCs, this
program will also be supplied on EPROM for use as backup purposes
(refer to the manufacturers documentation on EPROM insertion
procedures).
The pre-loaded program provided is the solution for Labwork 7 which:
i.

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.

Bytronic International Ltd

2.5

Industrial Control Trainer Manual

Connecting the ICT1 to a Programmable Logic Controller

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.

Bytronic International Ltd

2.6

Industrial Control Trainer Manual

Connecting the ICT1 to a Programmable Logic Controller

PLC Input/Output Wiring Details


PLC inputs and outputs should be connected to the two 15 way D
connectors. To do so you may use Bytronic MPCT7 cables or construct
your own using the following information.
MPCT7
Cable
Colour

Function

Pin

Red

PLC Output Supply

S1

Orange

PLC Output Supply

S2

Orange/Black

24V dc from PLC

S3

Red/White

O/P 8 : Not Used

S4

Blue/White

O/P 6 : Not Used

S5

Green/Black

O/P 4 : Belt Conveyor

S6

Black/White

O/P 2 : Reject Solenoid

S7

White/Black

O/P 0 : Sort Solenoid

S8

Pin

Function

MPCT7
Cable
Colour

S9

GND

Black

S10

GND

Green

S11

O/P 9 : Not Used

Red/Black

S12

O/P 7 : Not Used

Blue/Black

S13

O/P 5 : Gauging Head


Solenoid

S14

O/P 3 : Chain Conveyor

Green/White

S15

O/P 1 : Rotary Solenoid

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.

Figure 2.2. MPCT7 PLC Output Wiring - 15 Way D Socket.

Bytronic International Ltd

2.7

Industrial Control Trainer Manual

Connecting the ICT1 to a Programmable Logic Controller

MPCT7
Cable
Colour

Function

Pin

Brown

24V dc from PLC

P9

Blue

I/P 11 : Not Used

P10

Yellow/Red

I/P 9 : Not Used

P11

I/P 7 : Inductive Sensor

P12

Pin

Function

MPCT7
Cable
Colour

P1

GND

Black

P2

I/P 12 : Not Used

Red

P3

I/P 10 : Not Used

Orange

P4
Red/Blue
Cyan
Purple
White

P5

Through Beam
Detect
Capacitive
I/P 3 :
Area Detect
I/P 5 :

P13
P6
P14
P7

I/P 1 : Sort Area Detect

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.

Figure 2.3. MPCT7 PLC Input Wiring - 15 Way D Plug

Bytronic International Ltd

2.8

Industrial Control Trainer Manual

Connecting the ICT1 to a Programmable Logic Controller

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

DIGITAL INPUTS (400 - 413)

MITSUBISHI F1 BASE UNIT F1-20MR-ES


DIGITAL OUTPUTS (430 - 437)
430

431

432

433

434

435

436

437

S1, S2
S8

S15

S7

S14

S6

Figure 2.4. Mitsubishi F1 PLC Wiring Details.

P1, S9, S10


S3, P9

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

com0 Y0 com1 Y1 com2 Y2

S8
S1, S2

S15

Y3

S7

S6
S14

Figure 2.5. Mitsubishi FXo PLC Wiring Details

Bytronic International Ltd

2.9

Industrial Control Trainer Manual

Connecting the ICT1 to a Programmable Logic Controller

S1, S2

S8

S15

S7

S14

S6

VACVACOUT0 OUT1 OUT2 OUT3


OUT4 OUT5 OUT6 OUT7
VDC1
VDC1

DIGITAL OUTPUTS

Allen Bradley SLC500 1747-L20C


DIGITAL INPUTS
120/240
VAC

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

Figure 2.6. Allen-Bradley SLC500 Wiring Details

OV

P15
P8

com I/0

P14

P13

P7

P6

I/2

I/3 com I/4

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

Allen Bradley MicroLogix 1000


1761-L16BWB

24V 0V
External
24V Power
Supply

S8
S3, P9

S15

S7

S14

S6

S1, S2

P1, S9, S10

Figure 2.7. Allen Bradley MicroLogix 1000 PLC Wiring Details

Bytronic International Ltd

2.10

Industrial Control Trainer Manual

Connecting the ICT1 to a Programmable Logic Controller

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

Figure 2.8. Siemens 90U PLC Wiring Details

External
24V Power
Supply

S1, S2

S15
S8

L+

0.0

S6

S7

0.1

P1, S9, S10

S14

0.2

0.3

0.4

S3, P9

0.5

L+

0V 24V

SIEMENS S7-200 CPC212

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

Figure 2.9. Siemens S7-200 Micro PLC

Bytronic International Ltd

2.11

Industrial Control Trainer Manual

Bytronic International Ltd

2.12

I/R Thru Beam Sensor


PLC Input No.

Assembly Area Sensor


PLC Input No.

Chain Conveyor
PLC Output No.

Capacitive Area Sensor


PLC Input No.

Capacitive Sensor
PLC Input No.

Sort Area Sensor


PLC Input No.

Reject Area Sensor


PLC Input No.

Reject Solenoid
PLC Output No.

Rotary Solenoid
PLC Output No.

Inductive Sensor
PLC Input No.

Belt Conveyor
PLC Output No.

Metal Peg Detect


PLC Input No.

Sort Solenoid
PLC Output No.

Connecting the ICT1 to a Programmable Logic Controller

Industrial Control Trainer Manual

Analogue Connection Options

Analogue Connection Options


The speed of the belt conveyor may be controlled from a PC digital
output port or a PLC with either a 0-5V or 0-20mA analogue output.
Both of these options are discussed in more detail in the following
subsections.

PC Analogue Motor Control


If you are using a Bytronic PC Interface Card, Port C is used to provide
an 8 bit digital output. This is converted on the ICT output driver board
by a digital to analogue converter DAC8000 to provide a 0-5V control
signal. This signal is then fed into a L165 power op amp which in turn
drives the belt conveyor motor. When you connect the 40 way MPCT4
cable between the PC and ICT as described in the previous sections, the
analogue motor control feature is available. Finally, set switch S2 on the
output driver board to the DAC position. The PC interactive program
allows you to demonstrate the analogue control feature by selecting
software option F4.

PLC Analogue Motor Control


Speed control of the belt conveyor may be achieved from a PLC by
connecting a 0-5V or 0-20mA analogue output to pin 1 of the 9 way D
connector on the ICT Universal Interface.
Also, one of two wire links labelled 0-5V and 0-20mA situated by the 26
way IDC header on the interface card needs to be installed depending
upon your control signal type. Finally, set switch S2 on the output driver
board to the type of control required.
Note: The emergency stop button must be OFF (i.e. red LED off) and
the start/stop button ON (i.e. green LED on) to allow the belt
conveyor to be controlled by the analogue output.
In the event of incorrect operation turn the power off. Check connections
and re-test. If the problem persists, contact Bytronics Technical
Department.

Bytronic International Ltd

2.13

Industrial Control Trainer Manual

Gauging Head Connections

Gauging Head Connections.


The optional Gauging Head module requires 3 control signals. A digital
output to control the clamping action of the solenoid. A digital input to
monitor the component present sensor and an analogue input with an
input resolution of at least 0 to 5V to read the analogue feedback signal
used to determine the dimension of the measured component.

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.

Bytronic International Ltd

2.14

Industrial Control Trainer Manual

Gauging Head Connections

MPCT8
Cable
Colour

Function

Pin

OUT 1 : Not Used

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

PLC analogue input


module with at least
0 to 5V input range

Figure 2.11. MPCT8 PLC Analogue Input Wiring - 9 way D Plug

Bytronic International Ltd

2.15

Industrial Control Trainer Manual

The ICT Electronics

The ICT Electronics.


The three main functions of the Industrial Control Trainer electronics
have been segregated into separate printed circuit boards (PCB's)
namely:
Board 1 - Universal Interface
Board 2 - Output Driver Board
Board 3 - Signal Conditioning Board
The following three sub-sections give a brief explanation of these
boards. The full details are shown in the circuit diagrams section of this
manual.

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.

Bytronic International Ltd.

Full OPTO Isolation


On Board 5V Regulator
Power Reversal Protection and Supply Fuse.
Emergency Stop Button.
Stop/Start Button.

3.1

Industrial Control Trainer Manual

Output Driver Board

Output Driver Board.


Due to the universal nature of the ICT it has been assumed that the
controller cannot switch high currents. Therefore power driver circuitry
has been added which represents a wide range of methods to switch high
currents as shown in figure 3.1.
DRIVEN DEVICE
Belt Conveyer Motor
Chain Conveyer Motor
Rotary Assembly Solenoid
Reject Actuator
Sort Actuator
3 Spare Outputs

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

Figure 3.1. Types of Drive Circuit.

The remaining board features are 1.


2.
3.
4.
5.
6.
7.

Bytronic International Ltd.

Digital to analogue converter for microcomputer control of the


belt speed.
I/O reduction logic to reduce the number of controller inputs
required.
Analogue belt conveyor motor control circuitry compatible with
any of the following industrial standards: 0-5v, 0-20mA.
One shot reject solenoid circuit to prevent overheating.
8 x switched faults as discussed later in this manual.
In line fuses on both conveyor motors (250mA, 20mm long, anti
surge).
Fully test pointed as shown in the circuit diagrams.

3.2

Industrial Control Trainer Manual

Signal Conditioning Board

Signal Conditioning Board.


A fundamental requirement in almost all types of automated machine is
to detect the presence or absence of a work piece or object. The Bytronic
ICT has a wide range of non contact sensors as listed below and are
discussed in more detail in the following subsections.
a)
b)
c)
d)

Inductive Sensor
Capacitive Sensor
Infra Red (IR) Through Beam.
Infra Red (IR) Reflective Type

The signal conditioning board features are 1.


2.
3.
4.
5.

LED indicators for all sensors.


All circuitry has sensitivity adjustments to set the range of the
infra red Sensors.
I/O reduction logic to reduce the number of controller inputs
required.
8 x switched faults as discussed later in this manual.
Fully test pointed as shown in the circuit diagrams.

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)

Bytronic International Ltd.

NPN transistor
PNP transistor
NAMUR current output

3.3

Industrial Control Trainer Manual

Signal Conditioning Board

Figure 3.2. Diagram of the Basic Principle of an Inductive Sensor.

Inductive sensors are compact and capable of operating in dirty


environments, even submersed in fluid. The key dimension of an
inductive sensor is its diameter. For example A 4mm diameter sensor has a range of 1mm but a 40mm diameter
sensor has a range of 20 mm
This is due to the size of oscillator in the face of the unit.
Other factors affecting the sensing range are the target material and the
sensing tip style. The optimum sensing distance is obtained with a steel
target. The manufacturer of the sensor will specify a percentage of the
range for other materials.
A typical list is shown below Mild steel
Cast iron
Stainless steel
Brass
Aluminium
Copper

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.

Bytronic International Ltd.

3.4

Industrial Control Trainer Manual

Signal Conditioning Board

Figure 3.3. Diagram of a Non-Screened Inductive Sensor.

Figure 3.4. Diagram of a Screened Inductive Sensor.

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)

Bytronic International Ltd.

NPN transistor
PNP transistor
NAMUR current output

3.5

Industrial Control Trainer Manual

Signal Conditioning Board

Figure 3.5. Diagram of the Basic Principles of a Capacitive Sensor.

A capacitive sensor detects any solid, fluid or granulated substance


whether or not it is conductive or non conductive. The sensing range
depends on the physical and electrical characteristics of the medium to
be detected. However, conductors, solid or fluid are detected at a greater
distance than light or porous insulators. The repeatability is irrespective
of the nature of the detected medium.

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.

These are shown in figure 3.6 on the following page.

Bytronic International Ltd.

3.6

Industrial Control Trainer Manual

Signal Conditioning Board

1. Through Scan

2. Retro Reflective

3. Diffuse

Figure 3.6. Configurations of Photoelectric Sensors.

Bytronic International Ltd.

3.7

Industrial Control Trainer Manual

Signal Conditioning Board

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.

Figure 3.7. Diagram of an Infra-Red Reflective Sensor.

With this type of sensor the sensing range is approximately 2 - 15mm.


However, the major draw back to diffuse sensors is that the sensing
distance is dependent upon the reflectiveness of the object.
High ambient light levels can also trigger this type of sensor. If this
occurs trim the range of the sensor or alternatively move the unit into a
shaded area.

Bytronic International Ltd.

3.8

Industrial Control Trainer Manual

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.

Bytronic International Ltd.

4.1

Industrial Control Trainer Manual

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

The microcomputer labwork solutions were developed using Microsoft


QBASIC on an IBM compatible microcomputer and a Bytronic interface
card. The solutions to the labworks can be found on the ICT Interactive
program disk in the directory LABS.

Bytronic International Ltd.

4.2.1

Industrial Control Trainer Manual

Microcomputer Labwork 1

Microcomputer Labwork 1 : Sorting Routine


Objective
There are two objectives to Labwork 1 1.

Detection of the plastic component travelling along the chain


conveyor and ejection into the assembly chute.

2.

Detection of the metal component travelling along the chain


conveyor and non-ejection into the assembly chute. Allowing the
component to pass the sorting area and be deflected off the chain
conveyor, down the feeder chute.

Component detection and sorting according to component / product type


is a common requirement throughout industrial control. From areas such
as packing lines to automated assembly and food processing.

Procedure
1.

Activate the chain conveyor.

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.

Sensor 1 is a proximity sensor that detects the presence of any object.


Sensor 4 is set up to detect at a higher level than the plastic ring,
therefore it only detects the metal pegs passing.
These two sensors may be logically gated, as shown in figure 4.2.1, to
produce a sorting signal for the sort solenoid so as to eject the plastic
rings down the assembly chute.

Bytronic International Ltd.

4.2.2

Industrial Control Trainer Manual

Microcomputer Labwork 1

Figure 4.2.1. Signal Sequences at the Sorting Area.

Solution
A program listing solution for this labwork is given in figure 4.2.2.

Bytronic International Ltd.

4.2.3

Industrial Control Trainer Manual

Microcomputer Labwork 1

Figure 4.2.2. Program Listing for Labwork 1.


BaseAddress = 640

'Factory setting for interface card

PortA = BaseAddress + 4
PortB = BaseAddress + 5

'Initialise Port A address


'Initialise Port B address

OUT (BaseAddress + 7), 130

'Initialise ports: A = Output, B = Input

CONST False = 0
CONST True = NOT False

'Initialise Boolean expressions

SortSensorOn = False
SortSolenoidOn = TIMER

'Initialise control program variables

OUT PortA, 8

'Start chain conveyor.

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$ = " "

'Repeat loop until <SPACE> is pressed

OUT PortA, 0

'Turn off all outputs

Bytronic International Ltd.

4.2.4

Industrial Control Trainer Manual

Microcomputer Labwork 2

Microcomputer Labwork 2 : Queue Counting


Objective
The requirement for counting is an obvious necessity in almost all areas
of plant and process control.
The objective of this labwork is to enhance Labwork 1 to include a queue
counter for the assembly chute. This is essential because the assembly
chute has a maximum queue length of 5 plastic rings. Once the queue has
been filled, two alternative actions can be taken. Namely either (a).

Stop the chain conveyor.

(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.

Activate the chain conveyor.

2.

Sort the metal and plastic components using sensors 1 and 4 as


done in Labwork 1.

3.

On detecting and ejecting a plastic ring down the assembly chute,


increment a counter. When the counter exceeds 5 take either action
(a) or (b) mentioned in the objectives.

Solution
A program listing solution for this labwork is given in figure 4.2.3.

Bytronic International Ltd.

4.2.5

Industrial Control Trainer Manual

Microcomputer Labwork 2

Figure 4.2.3. Program Listing for Labwork 2


BaseAddress = 640

'Factory setting for interface card

PortA = BaseAddress + 4
PortB = BaseAddress + 5

'Initialise Port A address


'Initialise Port B address

OUT (BaseAddress + 7), 130

'Initialise ports: A = Output, B = Input

CONST False = 0
CONST True = NOT False

'Initialise Boolean expressions

SortSensorOn = False
SortSolenoidOn = TIMER

'Initialise ring sorting variables

QueueCount% = 0

'Initialise the ring queue count variable

OUT PortA, 8

'Start chain conveyor.

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

'Energise sort solenoid.


'De-energise sort solenoid.

LOOP UNTIL INKEY$ = " "

'Repeat loop until <SPACE> is pressed

OUT PortA, 0

'Turn off all outputs

Bytronic International Ltd.

4.2.6

Industrial Control Trainer Manual

Microcomputer Labwork 3

Microcomputer Labwork 3 : Operation Timing


Objective
The objectives of this labwork are to 1.

Combine the sorting routine developed in Labwork 1 and the queue


counting of Labwork 2 together with assembly area loading using
the rotary indexing unit.

2.

Generate a queue count decrement as the plastic rings are taken


from the queue into the assembly area.

3.

Introduce essential time delays to take account of system lags.

Procedure
1.

Activate the chain conveyor.

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.

Generate a queue count as in Labwork 2.

5.

Use the IR reflective sensor (input 0) situated by the assembly


hopper to detect when the hopper is empty. When the hopper is
empty, activate the rotary solenoid (output 1) to index a ring into
the hopper and decrement the queue count accordingly.

A typical sequence of events is shown in the timing diagram figure 4.2.4.

Bytronic International Ltd.

4.2.7

Industrial Control Trainer Manual

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

Figure 4.2.4. Timing Diagram for the Assembly Area.

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)

To allow correct operation of the assembly hopper, a delay must be


incorporated to allow the component being assembled to clear the
assembly hopper before a ring is indexed.

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.

Bytronic International Ltd.

4.2.8

Industrial Control Trainer Manual

Microcomputer Labwork 3

Figure 4.2.5. Program Listing for Labwork 3.


BaseAddress = 640

'Factory setting for interface card

PortA = BaseAddress + 4
PortB = BaseAddress + 5

'Initialise Port A address


'Initialise Port B address

OUT (BaseAddress + 7), 130

'Initialise ports: A = Output, B = Input

CONST False = 0
CONST True = NOT False

'Initialise Boolean expressions

SortSensorOn = False
SortSolenoidOn = TIMER

'Initialise ring sorting variables

QueueCount% = 0

'Initialise the ring queue count variable

DispenseDelay = TIMER
HopperEmpty = False
RingDispensed = False
RotarySolenoidOn = TIMER

'Initialise ring dispensing variables

OUT PortA, 24

'Start both the chain and belt conveyors.

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

'Energise sort solenoid.


'De-energise sort solenoid.

'***** Dispense the rings into the assembly hopper *****


IF QueueCount% > 0 THEN
'Is there any rings in the queue?
IF (INP(PortB) AND 1) <> 1 AND HopperEmpty = False THEN
'Detect the falling edge of the assembly area full signal.
HopperEmpty = True
DispenseDelay = TIMER + 2
'Wait for 2 seconds before dispensing a ring.
END IF
END IF

Bytronic International Ltd.

4.2.9

Industrial Control Trainer Manual

Microcomputer Labwork 3

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
LOOP UNTIL INKEY$ = " "

'Repeat loop until <SPACE> is pressed

OUT PortA, 0

'Turn off all outputs

Bytronic International Ltd.

4.2.10

Industrial Control Trainer Manual

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.

Execute the procedure given in Labwork 3.

2.

Along the length of the belt conveyor a range of sensors are


mounted to detect the presence and material of objects travelling
down the conveyor.
The sensors are -

Bytronic International Ltd.

a)

Inductive metal sensor with a range of approximately 5mm


on a steel target.

b)

Infra red (IR) through beam proximity sensor which is used to


detect the presence of any object.

c)

Capacitive sensor which detects almost any material. In the


present position this sensor is used to detect the presence of a
plastic ring assembled onto a metal peg component.

d)

IR reflective sensor attached to the capacitive sensor bracket


which detects the presence of any object passing.

e)

IR reflective sensor attached to the reject solenoid bracket to


detect the presence of any object passing. This can be used in
conjunction with the reject solenoid to eject items into the
reject bin.

4.2.11

Industrial Control Trainer Manual

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.

Bytronic International Ltd.

4.2.12

Industrial Control Trainer Manual

Microcomputer Labwork 4

Figure 4.2.7. Program Listing for Labwork 4.


BaseAddress = 640
PortA = BaseAddress + 4
PortB = BaseAddress + 5
OUT (BaseAddress + 7), 130

'Factory setting for interface card


'Initialise Port A address
'Initialise Port B address
'Initialise ports: A = Output, B = Input

CONST False = 0
CONST True = NOT False

'Initialise Boolean expressions

SortSensorOn = False
SortSolenoidOn = TIMER
QueueCount% = 0
DispenseDelay = TIMER
HopperEmpty = False
RingDispensed = False
RotarySolenoidOn = TIMER

'Initialise ring sorting variables

PegPresent = False

'Initialise peg detection variable

RejectSensorOn = False
RejectSolenoidOn = TIMER

'Initialise component rejection variables

OUT PortA, 24

'Start both the chain and belt conveyors

'Initialise the ring queue count variable


'Initialise ring dispensing variables

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

'Energise sort solenoid


'De-energise sort solenoid

'***** Dispense the rings into the assembly hopper *****


IF QueueCount% > 0 THEN
'Is there any rings in the queue?
IF (INP(PortB) AND 1) <> 1 AND HopperEmpty = False THEN
'Detect the falling edge of the assembly area full signal
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

Bytronic International Ltd.

4.2.13

Industrial Control Trainer Manual

Microcomputer Labwork 4

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
'***** Component detection on the belt conveyor *****
IF (INP(PortB) AND 128) = 128 THEN PegPresent = True
'Set the peg present variable when a peg is
'detected by the inductive sensor
'***** Component rejection / acception *****
IF (INP(PortB) AND 4) = 4 AND RejectSensorOn = False THEN
'Detect the rising edge of the reject
'area sensor (component at reject area)
RejectSensorOn = True
IF PegPresent = False THEN
'If a metal peg was not detected then
RejectSolenoidOn = TIMER + .5
'set the reject solenoid on time for
'0.5 seconds
END IF
END IF
IF (INP(PortB) AND 4) <> 4 AND RejectSensorOn = True THEN
'Detect the falling edge of the reject
'area sensor (component left reject area)
'and reset the peg present variable
RejectSensorOn = False
PegPresent = 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

Bytronic International Ltd.

'Energise the reject solenoid


'De-energise the reject solenoid

'Repeat loop until <SPACE> is pressed

'Turn off all outputs

4.2.14

Industrial Control Trainer Manual

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.

Execute the procedure given in Labwork 3.

2.

Use the signals from the feedback sensors discussed in Labwork 4


to detect the presence of a single metal component. With the
standard pre-set arrangement of sensors the feedback sequence is
show in figure 4.2.8.

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.

Bytronic International Ltd.

4.2.15

Industrial Control Trainer Manual

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.

Figure 4.2.9. Program Listing For Labwork 5


BaseAddress = 640
PortA = BaseAddress + 4
PortB = BaseAddress + 5
OUT (BaseAddress + 7), 130

'Factory setting for interface card


'Initialise Port A address
'Initialise Port B address
'Initialise ports: A = Output, B = Input

CONST False = 0
CONST True = NOT False

'Initialise Boolean expressions

SortSensorOn = False
SortSolenoidOn = TIMER

'Initialise ring sorting variables

QueueCount% = 0

'Initialise the ring queue count variable

DispenseDelay = TIMER
HopperEmpty = False
RingDispensed = False
RotarySolenoidOn = TIMER

'Initialise ring dispensing variables

PegPresent = False
RingAssembled = False

'Initialise component detection variables

RejectSensorOn = False
RejectSolenoidOn = TIMER

'Initialise component rejection variables

OUT PortA, 24

'Start both the chain and belt conveyors

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

Bytronic International Ltd.

'Energise sort solenoid


'De-energise sort solenoid

4.2.16

Industrial Control Trainer Manual

Microcomputer Labwork 5

'***** Dispense the rings into the assembly hopper *****


IF QueueCount% > 0 THEN
'Is there any rings in the queue?
IF (INP(PortB) AND 1) <> 1 AND HopperEmpty = False THEN
'Detect the falling edge of the assembly area full signal
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
'***** Component detection on the belt conveyor *****
IF (INP(PortB) AND 128) = 128 THEN PegPresent = True
'Set the peg present variable when a
'peg is detected by the inductive sensor
IF (INP(PortB) AND 64) = 64 THEN RingAssembled = True
'Set the ring assembled variable when an
'assembled ring is detected by the capacitive sensor

'***** Component rejection / acception *****


IF (INP(PortB) AND 4) = 4 AND RejectSensorOn = False THEN
'Detect the rising edge of the reject
'area sensor (component at reject area)
RejectSensorOn = True
IF PegPresent = True AND RingAssembled = False THEN
'If only a metal peg was detected then
'Set the reject solenoid on time for 0.5 seconds
RejectSolenoidOn = TIMER + .5
END IF
END IF
IF (INP(PortB) AND 4) <> 4 AND RejectSensorOn = True THEN
'Detect the falling edge of the reject area sensor
'(component left reject area) and reset both the peg
'present and ring assembled variables.
RejectSensorOn = False
PegPresent = False
RingAssembled = False

Bytronic International Ltd.

4.2.17

Industrial Control Trainer Manual

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

Bytronic International Ltd.

'Energise the reject solenoid


'De-energise the reject solenoid

'Repeat loop until <SPACE> is pressed

'Turn off all outputs

4.2.18

Industrial Control Trainer Manual

Microcomputer Labwork 6

Microcomputer Labwork 6:
Component / Assembly Detection and Sorting
Objective
There are four objectives to Labwork 6.
1.

The sorting of plastic rings on the chain conveyor and assembly


hopper loading (as in Labwork 3).

2.

Detection of a plastic ring travelling along the belt conveyor and


ejecting it into the reject bin.

3.

Detection of a metal peg travelling along the belt conveyor and


ejecting it into the reject bin.

4.

Detection of an assembled component travelling along the belt


conveyor and accepting it.

Procedure

Bytronic International Ltd.

1.

Execute the procedure given in Labwork 3.

2.

Use the feedback sensors discussed in Labwork 4 to determine the


type of component travelling along the belt conveyor. The sequence
for the unassembled metal peg and plastic ring were discussed in
Labworks 4 & 5. The signal sequence for an assembled product is
shown in figure 4.2.10.

4.2.19

Industrial Control Trainer Manual

Microcomputer Labwork 6

Detected Using the Capacitive Sensor (INPUT 6)


Plastic Ring
Aluminium Peg
Detected Using the Inductive Sensor (INPUT 7)

Figure 4.2.10. Sensor Signal Sequence for an Assembled Product

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.

Bytronic International Ltd.

4.2.20

Industrial Control Trainer Manual

Microcomputer Labwork 6

Figure 4.2.11. Program Listing for Labwork 6

BaseAddress = 640

'Factory setting for interface card

PortA = BaseAddress + 4
PortB = BaseAddress + 5

'Initialise Port A address


'Initialise Port B address

OUT (BaseAddress + 7), 130

'Initialise ports: A = Output, B = Input

CONST False = 0
CONST True = NOT False

'Initialise Boolean expressions

SortSensorOn = False
SortSolenoidOn = TIMER

'Initialise ring sorting variables

QueueCount% = 0

'Initialise the ring queue count variable

DispenseDelay = TIMER
HopperEmpty = False
RingDispensed = False
RotarySolenoidOn = TIMER

'Initialise ring dispensing variables

PegPresent = False
RingAssembled = False

'Initialise component detection variables

RejectSensorOn = False
RejectSolenoidOn = TIMER

'Initialise component rejection variables

OUT PortA, 24

'Start both the chain and belt conveyors

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

'Energise sort solenoid


'De-energise sort solenoid

'***** Dispense the rings into the assembly hopper *****

Bytronic International Ltd.

4.2.21

Industrial Control Trainer Manual

Microcomputer Labwork 6

IF QueueCount% > 0 THEN


'Is there any rings in the queue?
IF (INP(PortB) AND 1) <> 1 AND HopperEmpty = False THEN
'Detect the falling edge of the assembly area full signal
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
'***** Component detection on the belt conveyor *****
IF (INP(PortB) AND 128) = 128 THEN PegPresent = True
'Set the peg present variable when a
'peg is detected by the inductive sensor
IF (INP(PortB) AND 64) = 64 THEN RingAssembled = True
'Set the ring assembled variable when an assembled
'ring is detected by the capacitive sensor

'***** Component rejection / acception *****


IF (INP(PortB) AND 4) = 4 AND RejectSensorOn = False THEN
'Detect the rising edge of the reject
'area sensor (component at reject area)
RejectSensorOn = True
IF PegPresent = False OR RingAssembled = False THEN
'If an assembled component was not detected then
'set the reject solenoid on time for 0.5 seconds
RejectSolenoidOn = TIMER + .5
END IF
END IF
IF (INP(PortB) AND 4) <> 4 AND RejectSensorOn = True THEN
'Detect the falling edge of the reject area sensor
'(component left reject area) and reset both the
'peg present and ring assembled variables
RejectSensorOn = False
PegPresent = False

Bytronic International Ltd.

4.2.22

Industrial Control Trainer Manual

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

Bytronic International Ltd.

'Energise the reject solenoid


'De-energise the reject solenoid

'Repeat loop until <SPACE> is pressed

'Turn off all outputs

4.2.23

Industrial Control Trainer Manual

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.

The decision on the component type may be made at a single point


along the length of the conveyor. This can be achieved by putting
the capacitive sensor directly opposite the inductive probe. This
data must then be stored in an array so that a decision to pass or
reject can be made.

2.

With a standard sensor arrangement, as used in the previous labs, as


a component passes a sensing area, the data may be stored against
the component number in shift registers.

Solution
A program listing solution for this labwork is given in figure 4.2.12.

Bytronic International Ltd.

4.2.24

Industrial Control Trainer Manual

Microcomputer Labwork 7

Figure 4.2.12. Program Listing for Labwork 7


BaseAddress = 640

'Factory setting for interface card

PortA = BaseAddress + 4
PortB = BaseAddress + 5

'Initialise Port A address


'Initialise Port B address

OUT (BaseAddress + 7), 130

'Initialise ports: A = Output, B = Input

CONST False = 0
CONST True = NOT False

'Initialise Boolean expressions

SortSensorOn = False
SortSolenoidOn = TIMER

'Initialise ring sorting variables

QueueCount% = 0

'Initialise the ring queue count variable

DispenseDelay = TIMER
HopperEmpty = False
RingDispensed = False
RotarySolenoidOn = TIMER

'Initialise ring dispensing variables

InductiveData = 0
InductivePointer = 1
CapacitiveData = 0
CapacitivePointer = 1
InductiveSensorOn = False
ThruBeamSensorOn = False
CapacitiveSensorOn = False
CapacitiveAreaOn = False
AssembledComponent = False

'Initialise component detection variables

RejectSensorOn = False
RejectSolenoidOn = TIMER

'Initialise component rejection variables

OUT PortA, 24

'Start both the chain and belt conveyors

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

'Energise sort solenoid


'De-energise sort solenoid

'***** Dispense the rings into the assembly hopper *****


IF QueueCount% > 0 THEN
'Is there any rings in the queue?
IF (INP(PortB) AND 1) <> 1 AND HopperEmpty = False THEN
'Detect the falling edge of the assembly area full signal

Bytronic International Ltd.

4.2.25

Industrial Control Trainer Manual

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

IF (INP(PortB) AND 32) = 32 THEN


ThruBeamSensorOn = True
ELSE
IF ThruBeamSensorOn = True THEN
'Detect the falling edge of the thru-beam sensor (component
'leaving inductive area) and then multiply the data and
'pointer variables by 2 to obtain a binary 1 bit sift to the left
ThruBeamSensorOn = False
InductiveData = InductiveData * 2
InductivePointer = InductivePointer * 2
END IF
END IF
'***** Assembled ring detect *****
IF (INP(PortB) AND 64) = 64 THEN
'Detect the rising edge of the capacitive sensor
'and log that an assembled ring has been detected
IF CapacitiveSensorOn = False THEN
CapacitiveSensorOn = True
CapacitiveData = CapacitiveData + 1
END IF
ELSE

Bytronic International Ltd.

4.2.26

Industrial Control Trainer Manual

Microcomputer Labwork 7

CapacitiveSensorOn = False
END IF

'Reset the edge detection variable

IF (INP(PortB) AND 8) = 8 THEN


CapacitiveAreaOn = True
ELSE
IF CapacitiveAreaOn = True THEN
'Detect the falling edge of the capacitive area sensor (component
'leaving capacitive area) and then multiply the data and pointer
'variables by 2 to obtain a binary 1 bit shift to the left
CapacitiveAreaOn = False
CapacitiveData = CapacitiveData * 2
CapacitivePointer = CapacitivePointer * 2
END IF
END IF
'***** Leading component identification *****
IF (InductiveData AND InductivePointer) = InductivePointer THEN
'Metal peg present?
IF (CapacitiveData AND CapacitivePointer) = CapacitivePointer THEN
'Plastic ring present?
AssembledComponent = True
'Yes, so leading component is an assembled part
ELSE
AssembledComponent = False
'No, leading component is a single metal peg
END IF
ELSE
AssembledComponent = False
'No, leading component is a single plastic ring
END IF

'***** Component rejection / acception *****


IF (INP(PortB) AND 4) = 4 AND RejectSensorOn = False THEN
'Detect the rising edge of the reject area sensor
RejectSensorOn = True
IF AssembledComponent = False THEN
'If an assembled component was not detected then
'Set the reject solenoid on time for 0.5 seconds
RejectSolenoidOn = TIMER + .5
END IF
END IF
IF (INP(PortB) AND 4) <> 4 AND RejectSensorOn = True THEN
'Detect the falling edge of the reject area sensor and divide both
'pointer variables by 2 to obtain a binary 1 bit shift to the right
'Also, prevent both data registers from overflowing by clearing
'unwanted data
RejectSensorOn = False
InductivePointer = InductivePointer / 2
CapacitivePointer = CapacitivePointer / 2
InductiveData = (InductiveData AND 255)
CapacitiveData = (CapacitiveData AND 255)
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

Bytronic International Ltd.

'Energise the reject solenoid


'De-energise the reject solenoid

'Repeat loop until <SPACE> is pressed

'Turn off all outputs

4.2.27

Industrial Control Trainer Manual

Allen-Bradley SLC500 / MicroLogix 1000 Labworks

Allen-Bradley SLC500 / MicroLogix 1000 Labworks.


The following exercises based around the Industrial Control Trainer are
designed to be carried out using either an Allen-Bradley SLC500 or a
MicroLogix 1000 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 ladder diagram format and a copy of which is on the
accompanying ICT1 labworks disk.
In order to view / edit and download these PLC programs you will need
to use either the Allen-Bradley APS or MicroLogix 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
I:0/0
I:0/1
I:0/2
I:0/3
I:0/4
I:0/5
I:0/6
I:0/7
PLC Outputs
O:0/0
O:0/1
O:0/2
O:0/3
O:0/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.

Bytronic International Ltd.

4.3.1

Industrial Control Trainer Manual

Allen-Bradley SLC500 / MicroLogix 1000 Labwork 1

Allen-Bradley Labwork 1 : Sorting Routine


Objective
There are two objectives to Labwork 1 1.

Detection of the plastic component travelling along the chain


conveyor and ejection into the assembly chute.

2.

Detection of the metal component travelling along the chain


conveyor and non-ejection into the assembly chute. Allowing the
component to pass the sorting area and be deflected off the chain
conveyor, down the feeder chute.

Component detection and sorting according to component / product type


is a common requirement throughout industrial control. From areas such
as packing lines to automated assembly and food processing.

Procedure
1.

Activate the chain conveyor.

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.

Sensor 1 is a proximity sensor that detects the presence of any object.


Sensor 4 is set up to detect at a higher level than the plastic ring,
therefore it only detects the metal pegs passing.
These two sensors may be logically gated as shown in figure 4.3.1 to
produce a sorting signal for the sort solenoid to eject the plastic rings
down the assembly chute.

Bytronic International Ltd.

4.3.2

Industrial Control Trainer Manual

Allen-Bradley SLC500 / MicroLogix 1000 Labwork 1

Figure 4.3.1. Signal Sequences at the Sorting Area.

Solution
A ladder diagram solution for this labwork is given in figure 4.3.2.

Bytronic International Ltd.

4.3.3

Industrial Control Trainer Manual

Allen-Bradley SLC500 / MicroLogix 1000 Labwork 1

Figure 4.3.2. Ladder Diagram Solution for Labwork 1


Rung 2:0
Run the chain conveyor motor

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.

Component Metal Peg


Sort

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

Bytronic International Ltd.

4.3.4

Industrial Control Trainer Manual

Allen-Bradley SLC500 / MicroLogix 1000 Labwork 2

Allen-Bradley Labwork 2 : Queue Counting


Objective
The requirement for counting is an obvious necessity in almost all areas
of plant and process control.
The objective of this labwork is to enhance Labwork 1 to include a queue
counter for the assembly chute. This is essential because the assembly
chute has a maximum queue length of 5 plastic rings. Once the queue has
been filled a variety of actions can be taken either:
(a).

Stop the chain conveyor

(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.

Activate the chain conveyor.

2.

Sort the metal and plastic components using sensors 1 and 4 as


done in Labwork 1.

3.

On detecting and ejecting a plastic ring down the assembly chute,


increment a counter. When the counter exceeds 5 take either action
(a) or (b) mentioned in the objectives.

Solutions
A ladder diagram for this labwork is given in figure 4.3.3.

Bytronic International Ltd.

4.3.5

Industrial Control Trainer Manual

Allen-Bradley SLC500 / MicroLogix 1000 Labwork 2

Figure 4.3.3. Ladder Diagram Solution for Labwork 2


Rung 2:0
On the first execution pass, reset the counter which is to be used for
counting the rings into the chute.
First Scan
Queue

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.

Component Metal Peg Queue


Sort

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

Bytronic International Ltd.

4.3.6

Industrial Control Trainer Manual

Allen-Bradley SLC500 / MicroLogix 1000 Labwork 3

Allen-Bradley Labwork 3 : Operation Timing


Objective
The objectives of this labwork are to 1.

Combine the sorting routine developed in Labwork 1 and the queue


counting of Labwork 2 together with assembly area loading using
the rotary indexing unit.

2.

Generate a queue count decrement as the plastic rings are taken


from the queue into the assembly area.

3.

Introduce essential time delays to take account of system lags.

Procedure
1.

Activate the chain conveyor.

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 and plastic components using sensors 1 and 4 as


done in Labwork 1.

4.

Generate a queue count as in Labwork 2.

5.

Use the IR reflective sensor (input 0) situated by the assembly


hopper to detect when the hopper is empty. When the hopper is
empty, activate the rotary solenoid (output 1) to index a ring into
the hopper and decrement the queue count accordingly.

A typical sequence of events is shown in the timing diagram


figure 4.3.4.

Bytronic International Ltd.

4.3.7

Industrial Control Trainer Manual

Allen-Bradley SLC500 / MicroLogix 1000 Labwork 3

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

Figure 4.3.4. Timing Diagram for the Assembly Area

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)

To allow correct operation of the assembly hopper, a delay must be


incorporated to allow the component being assembled to clear the
assembly hopper before a ring is indexed.

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.

Bytronic International Ltd.

4.3.8

Industrial Control Trainer Manual

Allen-Bradley SLC500 / MicroLogix 1000 Labwork 3

Figure 4.3.5. Ladder Diagram Solution for Labwork 3


Rung 2:0
On the first execution pass, reset the counter which is to be used for
counting the rings into the chute.
First Scan
Queue

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.

Component Metal Peg Queue


Sort

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

Bytronic International Ltd.

4.3.9

Industrial Control Trainer Manual

Allen-Bradley SLC500 / MicroLogix 1000 Labwork 3

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

Bytronic International Ltd.

4.3.10

Industrial Control Trainer Manual

Allen-Bradley SLC500 / MicroLogix 1000 Labwork 4

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.

Execute the procedure given in Labwork 3.

2.

Along the length of the belt conveyor a range of sensors are


mounted to detect the presence and material of objects travelling
down the conveyor.
The sensors are -

Bytronic International Ltd.

a)

Inductive metal sensor with a range of approximately 5mm


on a steel target.

b)

Infra red (IR) through beam proximity sensor which is used to


detect the presence of any object.

c)

Capacitive sensor which detects almost any material. In the


present position this sensor is used to detect the presence of a
plastic ring assembled onto a metal peg component.

d)

IR reflective sensor attached to the capacitive sensor bracket


which detects the presence of any object passing.

e)

IR reflective sensor attached to the reject solenoid bracket to


detect the presence of any object passing. This can be used in
conjunction with the reject solenoid to eject items into the
reject bin.

4.3.11

Industrial Control Trainer Manual

Allen-Bradley SLC500 / MicroLogix 1000 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.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.

Bytronic International Ltd.

4.3.12

Industrial Control Trainer Manual

Allen-Bradley SLC500 / MicroLogix 1000 Labwork 4

Figure 4.3.7. Ladder Diagram Solution for Labwork 4


Rung 2:0
On the first execution pass, reset the counter which is to be used for counting
the rings into the chute and unlatch the metal peg present register.
First Scan
Queue

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.

Component Metal Peg Queue


Sort

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

Bytronic International Ltd.

4.3.13

Industrial Control Trainer Manual

Allen-Bradley SLC500 / MicroLogix 1000 Labwork 4

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

Bytronic International Ltd.

4.3.14

Industrial Control Trainer Manual

Allen-Bradley SLC500 / MicroLogix 1000 Labwork 4

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).

Reject Metal Peg


Reject

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

Bytronic International Ltd.

4.3.15

Industrial Control Trainer Manual

Allen-Bradley SLC500 / MicroLogix 1000 Labwork 5

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.

Execute the procedure given in Labwork 3.

2.

Use the signals from the feedback sensors discussed in Labwork 4


to detect the presence of a single metal component. With the
standard pre-set arrangement of sensors the feedback sequence is
show in figure 4.3.8.

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.8. Sensor Signal Sequence for a Metal Component

Bytronic International Ltd.

4.3.16

Industrial Control Trainer Manual

Allen-Bradley SLC500 / MicroLogix 1000 Labwork 5

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.

Figure 4.3.9. Ladder Diagram Solution for Labwork 5


Rung 2:0
On the first execution pass, reset the counter which is to be used for counting
the rings into the chute and unlatch both the metal peg present and ring
assembled registers.
First Scan
Queue

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

Bytronic International Ltd.

4.3.17

Industrial Control Trainer Manual

Allen-Bradley SLC500 / MicroLogix 1000 Labwork 5

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.

Component Metal Peg Queue


Sort

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

Bytronic International Ltd.

4.3.18

Industrial Control Trainer Manual

Allen-Bradley SLC500 / MicroLogix 1000 Labwork 5

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).

Reject Metal Peg Ring


Reject

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

Bytronic International Ltd.

4.3.19

Industrial Control Trainer Manual

Allen-Bradley SLC500 / MicroLogix 1000 Labwork 6

Allen-Bradley Labwork 6:
Component / Assembly Detection and Sorting
Objective
There are four objectives to Labwork 6.
1.

The sorting of plastic rings on the chain conveyor and assembly


hopper loading (as in Labwork 3).

2.

Detection of a plastic ring travelling along the belt conveyor and


ejecting it into the reject bin.

3.

Detection of a metal peg travelling along the belt conveyor and


ejecting it into the reject bin.

4.

Detection of an assembled component travelling along the belt


conveyor and accepting it.

Procedure

Bytronic International Ltd.

1.

Execute the procedure given in Labwork 3.

2.

Use the feedback sensors discussed in Labwork 4 to determine the


type of component travelling along the belt conveyor. The sequence
for the unassembled metal peg and plastic ring were discussed in
Labworks 4 & 5. The signal sequence for an assembled product is
shown in figure 4.3.10.

4.3.20

Industrial Control Trainer Manual

Allen-Bradley SLC500 / MicroLogix 1000 Labwork 6

Detected Using the Capacitive Sensor (INPUT 6)


Plastic Ring
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 CAPACTIVE AREA
INPUT 2
IR AT REJECT AREA

Figure 4.3.10. Sensor Signal Sequence for an Assembled Product.

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.

Bytronic International Ltd.

4.3.21

Industrial Control Trainer Manual

Allen-Bradley SLC500 / MicroLogix 1000 Labwork 6

Figure 4.3.11. Ladder Diagram Solution for Labwork 6


Rung 2:0
On the first execution pass, reset the counter which is to be used for counting
the rings into the chute and unlatch both the metal peg present and ring
assembled registers.
First Scan
Queue

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.

Component Metal Peg Queue


Sort

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

Bytronic International Ltd.

4.3.22

Industrial Control Trainer Manual

Allen-Bradley SLC500 / MicroLogix 1000 Labwork 6

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

Bytronic International Ltd.

4.3.23

Industrial Control Trainer Manual

Allen-Bradley SLC500 / MicroLogix 1000 Labwork 6

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

Bytronic International Ltd.

4.3.24

Industrial Control Trainer Manual

Allen-Bradley SLC500 / MicroLogix 1000 Labwork 7

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)

The decision on the component type may be made at a single point


along the length of the conveyor. This can be achieved by putting
the capacitive sensor directly opposite the inductive probe. This
data must then be stored in a shift register so that a decision to pass
or reject can be made.

b)

With the standard sensor arrangement , as used in the previous labs,


as a component passes a sensing area, the data is stored against the
component number in shift registers.

Solution
A ladder diagram solution to this labwork is shown in figure 4.3.12.

Bytronic International Ltd.

4.3.25

Industrial Control Trainer Manual

Allen-Bradley SLC500 / MicroLogix 1000 Labwork 7

Figure 4.3.12. Ladder Diagram Solution for Labwork 7


Rung 2:0
On the first execution pass, reset the counter which is to be used for counting
the rings into the chute, clear the inductive sensor and capacitive sensor
data registers and initialise the inductive sensor and capacitive sensor
pointer registers.
First Scan
Queue

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.

Component Metal Peg Queue


Sort

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

Bytronic International Ltd.

4.3.26

Industrial Control Trainer Manual

Allen-Bradley SLC500 / MicroLogix 1000 Labwork 7

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

Bytronic International Ltd.

4.3.27

Industrial Control Trainer Manual

Allen-Bradley SLC500 / MicroLogix 1000 Labwork 7

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

] [BIT SHIFT LEFT


(EN)

5
File
#B10:0(DN)

Control
R6:0

Bit Address B10/64


Length
8

BSL

BIT SHIFT LEFT


(EN)

File
#B10:1(DN)

Control
R6:1

Bit Address B10/64

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

] [BIT SHIFT LEFT


(EN)

3
File
#B10:2(DN)

Control
R6:2

Bit Address B10/64


Length
8

BSL

BIT SHIFT LEFT


(EN)

File
#B10:3(DN)

Control
R6:3

Bit Address B10/64

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

Bytronic International Ltd.

4.3.28

Industrial Control Trainer Manual

Allen-Bradley SLC500 / MicroLogix 1000 Labwork 7

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

]/[[OSR]BIT SHIFT RIGHT


(EN)

2
23
File
#B10:1(DN)

Control
R6:4

Bit Address B10/64


Length
8

BSR

BIT SHIFT RIGHT


(EN)

File
#B10:3(DN)

Control
R6:5

Bit Address B10/64

Length
8

Rung 2:15

END

Bytronic International Ltd.

4.3.29

Industrial Control Trainer Manual

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.

Bytronic International Ltd.

4.4.1

Industrial Control Trainer Manual

Mitsubishi F1 Labwork 1

Mitsubishi F1 Labwork 1 : Sorting Routine


Objective
There are two objectives to Labwork 1 1.

Detection of the plastic component travelling along the chain


conveyor and ejection into the assembly chute.

2.

Detection of the metal component travelling along the chain


conveyor and non-ejection into the assembly chute. Allowing the
component to pass the sorting area and be deflected off the chain
conveyor, down the feeder chute.

Component detection and sorting according to component/product type is


a common requirement throughout industrial control. From areas such as
packing lines to automated assembly and food processing.

Procedure
1.

Activate the chain conveyor.

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.

Sensor 1 is a proximity sensor that detects the presence of any object.


Sensor 4 is set up to detect at a higher level than the plastic ring,
therefore it only detects the metal pegs passing.
These two sensors may be logically gated as shown in figure 4.4.1 to
produce a sorting signal for the sort solenoid to eject the plastic rings
down the assembly chute

Bytronic International Ltd.

4.4.2

Industrial Control Trainer Manual

Mitsubishi F1 Labwork 1

Figure 4.4.1. Signal Sequences at the Sorting Area

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.

Bytronic International Ltd.

4.4.3

Industrial Control Trainer Manual

Mitsubishi F1 Labwork 1

Figure 4.4.2. Ladder Diagram Solution for Labwork 1


Continuously operate the chain conveyor motor.

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

Figure 4.4.3. Code Listing for Labwork 1


ADDRESS
000
001
002
003
004
005
006
007
008
009

Bytronic International Ltd.

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

Industrial Control Trainer Manual

Mitsubishi F1 Labwork 2

Mitsubishi F1 Labwork 2 : Queue Counting


Objective
The requirement for counting is an obvious necessity in almost all areas
of plant and process control.
The objective of this labwork is to enhance Labwork 1 to include a queue
counter for the assembly chute. This is essential because the assembly
chute has a maximum queue length of 5 plastic rings.
Once the queue has been filled two alternative actions can be taken
either:
(a).

Stop the chain conveyor.

(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.

Activate the chain conveyor.

2.

Sort the metal and plastic components using sensors 1 and 4 as


done in Labwork 1.

3.

On detecting and ejecting a plastic ring down the assembly chute,


increment a counter. When the counter exceeds 5 take either action
(a) or (b) mentioned in the objectives.

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.

Bytronic International Ltd.

4.4.5

Industrial Control Trainer Manual

Mitsubishi F1 Labwork 2

Figure 4.4.4. Ladder Diagram Solution for Labwork 2


Reset the queue count for the assembly chute.

M71

] [ RST 660

Operate the chain conveyor motor unless M110 is set on.

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

Figure 4.4.5. Code Listing for Labwork 2


ADDRESS
000
001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016

Bytronic International Ltd.

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

Industrial Control Trainer Manual

Mitsubishi F1 Labwork 3

Mitsubishi F1 Labwork 3 : Operation Timing


Objective
The objectives of this labwork are to 1.

Combine the sorting routine developed in Labwork 1 and the queue


counting of Labwork 2 together with assembly area loading using
the rotary indexing unit.

2.

Generate a queue count decrement as the plastic rings are taken


from the queue into the assembly area.

3.

Introduce essential time delays to take account of system lags.

Procedure
1.

Activate the chain conveyor.

2.

Sort the metal and plastic components using sensors 1 and 4 as in


Labwork 1.

3.

Generate a queue count as in Labwork 2.

4.

In the assembly area an IR reflective sensor (I/P 400) detects the


presence of a plastic ring in the assembly hopper. If this sensor
indicates the hopper is empty then the rotary solenoid (O/P 431)
can be indexed, loading the hopper with a plastic ring. The queue
count can now be decremented, thus enabling the sorting routine.

A typical sequence of events is shown in the timing diagram figure 4.4.6.

Bytronic International Ltd.

4.4.7

Industrial Control Trainer Manual

Mitsubishi F1 Labwork 3

Figure 4.4.6. Timing Diagram for the Assembly Area.

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 components 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)

To allow correct operation of the assembly hopper, a delay must be


incorporated to allow the component to clear the assembly hopper
before a ring is indexed.

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.

Bytronic International Ltd.

4.4.8

Industrial Control Trainer Manual

Mitsubishi F1 Labwork 3

Figure 4.4.7. Ladder Diagram Solution for Labwork 3


Reset the queue count for the assembly chute.

M71

] [ RST 660

Operate the belt conveyor motor continuously.

M70

] [( Y434 )

Operate the chain conveyor motor unless M110 is set on.

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

Pulse M105 for 1 program scan when T53 has expired.

T53

] [ PLS 105

Activate the rotary solenoid for 0.5 seconds to dispense a ring.

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

Bytronic International Ltd.

4.4.9

Industrial Control Trainer Manual

Mitsubishi F1 Labwork 3

Figure 4.4.8. Code Listing for Labwork 3


ADDRESS
000
001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028
029
030
031
032

Bytronic International Ltd.

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

Industrial Control Trainer Manual

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.

Activate the belt.

2.

Along the length of the belt conveyor a range of sensors are


mounted to detect the presence and material of objects travelling
down the conveyor.
The sensors are -

Bytronic International Ltd.

a)
on

Inductive metal sensor with a range of approximately 5mm


a steel target.

b)

Infra red (IR) through beam proximity sensor which is used to


detect the presence of any object.

c)

Capacitive sensor which detects almost any material. In the


present position this sensor is used to detect the presence of a
plastic ring assembled onto a metal peg component.

d)

IR reflective sensor attached to the capacitive sensor bracket


which detects the presence of any object passing.

e)

IR reflective sensor attached to the reject solenoid bracket to


detect the presence of any object passing. This can be used in
conjunction with the reject solenoid to eject items into the
reject bin.

4.4.11

Industrial Control Trainer Manual

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

Figure 4.4.9. Sensor Signal Sequence for Plastic Ring

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.

Bytronic International Ltd.

4.4.12

Industrial Control Trainer Manual

Mitsubishi F1 Labwork 4

Figure 4.4.10. Ladder Diagram Solution for Labwork 4


Operate the belt conveyor motor continuously.

M70

] [( Y434 )

Store data from the inductive sensor.

X407

] [ S 200

Store data from the sensor at the reject area.

X402

] [ S 202

Reject single ring.

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

Figure 4.4.11. Code Listing For Labwork 4


ADDRESS
000
001
002
003
004
005
006
007
008
009
010
011
012
013
014

Bytronic International Ltd.

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

Industrial Control Trainer Manual

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.

Activate the belt conveyor.

2.

Use the signals from the feedback sensors discussed in Labwork 4


to detect the presence of a single metal component. With the
standard pre-set arrangement of sensors the feedback sequence is
show in figure 4.4.12.

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

Figure 4.4.12. Sensor Signal Sequence for a Metal Component

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.

Bytronic International Ltd.

4.4.14

Industrial Control Trainer Manual

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.

Figure 4.4.13. Ladder Diagram Solution for Labwork 5


Operate the belt conveyor motor continuously.

M70

] [( Y434 )

Store data from the inductive sensor.

X407

] [ S 200

Store data from the capacitive sensor.

X406

] [ S 201

Store data from the sensor at the reject area.

X402

] [ S 202

Reject single rings or pegs

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

Bytronic International Ltd.

4.4.15

Industrial Control Trainer Manual

Mitsubishi F1 Labwork 5

Figure 4.4.14 Code Listing for Labwork 5


ADDRESS
000
001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019

Bytronic International Ltd.

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

Industrial Control Trainer Manual

Mitsubishi F1 Labwork 6

Mitsubishi F1 Labwork 6:
Component / Assembly Detection and Sorting
Objective
There are three objectives to Labwork 6.
1.

Detection of a plastic ring travelling along the belt conveyor and


ejecting it into the reject bin.

2.

Detection of a metal component travelling along the belt conveyor


and ejecting it into the reject bin.

3.

Detection of an assembled product travelling along the belt


conveyor and accepting it.

Procedure
1.

Activate the belt conveyor.

2.

Use the feedback sensors discussed in Labwork 4 to determine the


type of component travelling along the belt conveyor. The sequence
for the unassembled metal peg and plastic ring were discussed in
Labworks 4 & 5. The signal sequence for an assembled product is
shown in figure 4.4.15.

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.

Bytronic International Ltd.

4.4.17

Industrial Control Trainer Manual

Mitsubishi F1 Labwork 6

Detected Using the Capacitive Sensor (INPUT 6)


Plastic Ring
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 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.

Bytronic International Ltd.

4.4.18

Industrial Control Trainer Manual

Mitsubishi F1 Labwork 6

Figure 4.4.16. Ladder Diagram Solution for Labwork 6


Operate the belt conveyor motor continuously.

M70

] [( Y434 )

Store data from the inductive sensor.

X407

] [ S 200

Store data from the capacitive sensor.

X406

] [ S 201

Store data from the sensor at the reject area.

X402

] [ S 202

Reject single rings or pegs

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

0.3 second delay before reset.

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

Bytronic International Ltd.

4.4.19

Industrial Control Trainer Manual

Mitsubishi F1 Labwork 6

Figure 4.4.17 Code Listing for Labwork 6


ADDRESS
000
001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028

Bytronic International Ltd.

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

Industrial Control Trainer Manual

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 -

Bytronic International Ltd.

1.

Determination of component type (i.e. whether assembled or


unassembled - "good" or "bad") may be made at a single point
along the length of the conveyor. This can be achieved by putting
the capacitive sensor directly opposite the inductive probe. Clearly
a good assembly (peg and ring) would trigger both sensors
simultaneously, whereas individual pegs or rings would not. Hence
the inputs from these two sensors could be logically ANDED
together in the PLC program and used to load and shift a Shift
Register. This would then store information about the nature and
order of the items in the queue. The data would have to be analysed
in order to reach an accept/reject decision each time a component
triggered the reject area sensor.

2.

With the standard sensor arrangement, i.e. as used in the previous


labworks as a queue of components passes the various sensors, data
concerning the number and nature of items may be stored in two
shift registers. One stores data on the number of components in the
queue the other on the nature of each component.

4.4.21

Industrial Control Trainer Manual

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

"Shift Register M100"

In essence, a Shift Register is a sequence of relays along which any


pattern of "ON" and "OFF" states may be moved by executing the SHIFT
command. New data enters the register only via the leading relay - in this
example, relay M100.
Note:- The Shift Register takes its name from the leading relay in it.

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 -

Bytronic International Ltd.

1.

Input from capacitive sensor on I/P 406 signifies a "GOOD"


assembly.

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

Industrial Control Trainer Manual

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

M200 M201 M202 M203 M204 M205 M206 M207

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.

Bytronic International Ltd.

4.4.23

Industrial Control Trainer Manual

Mitsubishi F1 Labwork 7

Figure 4.4.18. Ladder Diagram Solution for Labwork 7


On starting, reset the shift registers monitoring the status and
number of items on the belt conveyor.

M71

] [ RST 100

RST 200

Continuously activate the belt conveyor motor.

M70

] [( Y434 )

Initialisation for shift register M200 which monitors the number of


items in the queue on the belt conveyor.

M70 M201 M202 M203 M204 M205 M206 M207

]/[]/[]/[]/[]/[]/[]/[]/[( M200 )

Good assemblies are sensed by the capacitive sensor. This turns on


the leading relay of shift register M100.

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

]/[ SFT 100

PLS 130

M100 is shifted by the standard shift command. M200 is shifted


means of special function 130. This is necessary because later
program, M200 must be 'reverse shifted'.

M130
] [( F671

K200

M135

] [
( F672

K8

( F670

K130

by
in the

Decision to reject or not made on data stored in the two shift


registers, when item is in front of the reject solenoid.

M201
M101
X402

] []/[] [( Y432 )

M202
M102

] []/[

M203
M103

] []/[

M204
M104

] []/[

M205
M105

] []/[

M206
M106

] []/[

Bytronic International Ltd.

4.4.24

Industrial Control Trainer Manual

Mitsubishi F1 Labwork 7

Set M220 on when an object is at the reject area.

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

Wait for 0.1 seconds before resetting M220.

M477

] [( T55 )

K0.1

Reset M220

T55

] [ R 220

END

Figure 4.4.19. Code Listing for Labwork 7


ADDRESS
000
001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017

Bytronic International Ltd.

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

Industrial Control Trainer Manual

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

Bytronic International Ltd.

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

Industrial Control Trainer Manual

Mitsubishi F1 Labwork 8

Mitsubishi F1 Labwork 8:
Complete System Control.
Objective
The control of the complete ICT involves the following 1.

Sorting the randomly loaded components on the chain conveyor


into the assembly and feeder chutes. Loading the assembly hopper
with a plastic ring when empty, as developed in Labwork 3.

2.

Check the assembly of the metal and plastic components as they


pass in a queue along the belt conveyor. Accepting the assembled
components but rejecting either a single plastic ring or a metal
peg, as developed in Labwork 7.

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.

Bytronic International Ltd.

4.4.27

Industrial Control Trainer Manual

Mitsubishi F1 Labwork 8

Figure 4.4.20. Ladder Diagram Solution For Labwork 8


On starting, reset the shift registers monitoring the status and
number of items on the belt conveyor. Reset the queue counter.

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

Compare C660 with 0. Is the assembly chute full?

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 )

If a ring is detected at the sort area, activate the sort


0.3 seconds.

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

Bytronic International Ltd.

4.4.28

Industrial Control Trainer Manual

Mitsubishi F1 Labwork 8

While the chute contains rings, pulse M111 on for 1 program scan.

M572
X400

] []/[ PLS 111

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

Energise M471 when M210 is on to reverse the count direction of the


queue counter C660.

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

] [

Initialisation for shift register M200 which monitors the number of


items in the queue on the belt conveyor.

M70 M201 M202 M203 M204 M205 M206 M207

]/[]/[]/[]/[]/[]/[]/[]/[( M200 )

Good assemblies are sensed by the capacitive sensor. This turns on


the leading relay of shift register M100.

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

]/[ SFT 100

PLS 130

Bytronic International Ltd.

4.4.29

Industrial Control Trainer Manual

Mitsubishi F1 Labwork 8

M100 is shifted by the standard shift command. M200 is shifted


means of special function 130. This is necessary because later
program, M200 must be 'reverse shifted'.

M130
] [( F671

K200

M135

] [
( F672

K8

( F670

K130

by
in the

Decision to reject or not made on data stored in the two shift


registers, when item is in front of the reject solenoid.

M201
M101
X402

] []/[] [( Y432 )

M202
M102

] []/[

M203
M103

] []/[

M204
M104

] []/[

M205
M105

] []/[

M206
M106

] []/[

Set M220 on when an object is at the reject area.

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

Wait for 0.1 seconds before resetting M220.

M477

] [( T55 )

K0.1

Reset M220

T55

] [ R 220

END

Bytronic International Ltd.

4.4.30

Industrial Control Trainer Manual

Mitsubishi F1 Labwork 8

Figure 4.4.21. Code Listing for Labwork 8


ADDRESS
000
001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
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

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

Bytronic International Ltd.

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

Industrial Control Trainer Manual

Mitsubishi FXo Labworks

Mitsubishi FXo Labworks


The following exercises based around the Industrial Control Trainer are
designed to be carried out using the Mitsubishi FXo 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 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 Mitsubishi FXo MEDOC 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
X00
X01
X02
X03
X04
X05
X06
X07
PLC Outputs
Y00
Y01
Y02
Y03
Y04

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.

Bytronic International Ltd.

4.5.1

Industrial Control Trainer Manual

Mitsubishi FXo Labwork 1

Mitsubishi FXo Labwork 1 : Sorting Routine


Objective
There are two objectives to labwork 1 1.

Detection of the plastic component travelling along the chain


conveyor and ejection into the assembly chute.

2.

Detection of the metal component travelling along the chain


conveyor and non-ejection into the assembly chute. Allowing the
component to pass the sorting area and be deflected off the chain
conveyor, down the feeder chute.

Component detection and sorting according to component / product type


is a common requirement throughout industrial control. From areas such
as packing lines to automated assembly and food processing.

Procedure
1.

Activate the chain conveyor.

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.

Sensor 1 is a proximity sensor that detects the presence of any object.


Sensor 4 is set up to detect at a higher level than the plastic ring,
therefore it only detects the metal pegs passing.
These two sensors may be logically gated as shown in figure 4.5.1 to
produce a sorting signal for the sort solenoid to eject the plastic rings
down the assembly chute.

Bytronic International Ltd.

4.5.2

Industrial Control Trainer Manual

Mitsubishi FXo Labwork 1

Figure 4.5.1. Signal Sequences at the Sorting Area

Solution
A ladder diagram solution for this labwork is given in figure 4.5.2.

Bytronic International Ltd.

4.5.3

Industrial Control Trainer Manual

Mitsubishi FXo Labwork 1

Figure 4.5.2. Ladder Diagram Solution for Labwork 1


Use M8000 to continuously activate the chain

conveyor. M8000 is energised continuously while

the PLC is in run mode.

M8000
Y3

0 ( )
RUN
CHAIN
MODE

Pulse M0 when a component is detected at the sort

area. This is necessary so that the component will

not be detected more than once.

X1

2 [PLS M0
]
SORT
PART
AREA
SORT

AREA

When a component is detected at the sort area and

the component is not a metal peg, activate the

sort solenoid output for 0.5 seconds to push the

component down into the assembly chute.

M0
X4
T0
Y0

5 //( )
PART METALSORT
SORT
SORT PEG SOLND
SOLND
AREA
ON

Y0

K5


(T0 )
SORT
SORT
SOLND
SOLND

ON

13 [END ]

Bytronic International Ltd.

4.5.4

Industrial Control Trainer Manual

Mitsubishi FXo Labwork 2

Mitsubishi FXo Labwork 2 : Queue Counting


Objective
The requirement for counting is an obvious necessity in almost all areas
of plant and process control.
The objective of this labwork is to enhance labwork 1 to include a queue
counter for the assembly chute. This is essential because the assembly
chute has a maximum queue length of 5 plastic rings. Once the queue has
been filled two alternative actions can be taken, namely either (a).

Stop the chain conveyor .

(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.

Activate the chain conveyor.

2.

Sort the metal and plastic components using sensors 1 and 4 as


done in labwork 1.

3.

On detecting and ejecting a plastic ring down the assembly chute,


increment a counter. When the counter reaches 5 take either action
(a) or (b) mentioned in the objectives.

Solution
A ladder diagram for this labwork is given in figure 4.5.3.

Bytronic International Ltd.

4.5.5

Industrial Control Trainer Manual

Mitsubishi FXo Labwork 2

Figure 4.5.3. Ladder Diagram Solution for Labwork 2


Clear the assembly chute ring queue count data

register on the first execution scan.

M8002
K

0 [MOV 0
D0
]
FIRST
QUEUE
SCAN
COUNT

Use M8000 to continuously activate the chain

conveyor. M8000 is energised continuously while

the PLC is in run mode.

M8000
Y3

6 ( )
RUN
CHAIN
MODE

Pulse M0 when a component is detected at the sort

area. This is necessary so that the component will

not be detected more than once.

X1

8 [PLS M0
]
SORT
PART
AREA
SORT

AREA

When a component is detected at the sort area and

the component is not a metal peg and the assembly

chute ring queue is not full, activate the sort

solenoid output for 0.5 seconds to push the

component down into the assembly chute.

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

Increment the ring queue count register when the

sort solenoid has been activated.

T0

20 [INC D0
]
SORT
QUEUE
SOLND
COUNT
ON

Compare the queue count with 5 to determine

whether the maximum amount of rings that can

enter the queue has been reached.

M8000
K

24 [CMP D0
5
M10 ]
RUN
QUEUE
GRATR
MODE
COUNT

If the maximum amount has been reached, energise

M1 to disable the sort solenoid and prevent

further rings being entered into the queue.

M11
M1

32 ( )
EQUAL
QUEUE

FULL

34 [END ]

Bytronic International Ltd.

4.5.6

Industrial Control Trainer Manual

Mitsubishi FXo Labwork 3

Mitsubishi FXo Labwork 3 : Operation Timing


Objective
The objectives of this labwork are to 1.

Combine the sorting routine developed in labwork 1 and the queue


counting of labwork 2 together with assembly area loading using
the rotary indexing unit.

2.

Generate a queue count decrement as the plastic rings are taken


from the queue into the assembly area.

3.

Introduce essential time delays to take account of system lags.

Procedure
1.

Activate the chain conveyor.

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 and plastic components using sensors 1 and 4 as in


labwork 1.

4.

Generate a queue count as in labwork 2.

5.

Use the IR reflective sensor situated by the assembly hopper to


detect when the hopper is empty. When the hopper is empty,
activate the rotary solenoid to index a ring into the assembly hopper
and decrement the ring queue count accordingly.

A typical sequence of events is shown in the timing diagram figure 4.5.4.

Bytronic International Ltd.

4.5.7

Industrial Control Trainer Manual

Mitsubishi FXo Labwork 3

Figure 4.5.4. Timing Diagram for the Assembly Area

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)

To ensure correct operation of the assembly hopper, a delay must


be incorporated to allow the component being assembled to clear
the assembly hopper before a ring is indexed.

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.

Bytronic International Ltd.

4.5.8

Industrial Control Trainer Manual

Mitsubishi FXo Labwork 3

Figure 4.5.5. Ladder Diagram Solution for Labwork 3


Clear the assembly chute ring queue count data

register on the first execution scan.

M8002
K

0 [MOV 0
D0
]
FIRST
QUEUE
SCAN
COUNT

Use M8000 to continuously activate both the belt

and chain conveyors. M8000 is energised

continuously while the PLC is in run mode.

M8000
Y3

6 ( )
RUN
CHAIN
MODE

Y4

( )

BELT

Pulse M0 when a component is detected at the sort

area. This is necessary so that the component will

not be detected more than once.

X1

9 [PLS M0
]
SORT
PART
AREA
SORT

AREA

When a component is detected at the sort area and

the component is not a metal peg and the assembly

chute ring queue is not full, activate the sort

solenoid output for 0.5 seconds to push the

component down into the assembly chute.

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

Increment the ring queue count register when the

sort solenoid has been activated.

T0

21 [INC D0
]
SORT
QUEUE
SOLND
COUNT
ON

Compare the queue count with both 1 and 4 to

determine whether there are any rings in the queue

and whether the queue is full.

M8000
K
K

25 [ZCP 1
4
D0
M10 ]
RUN
QUEUE QUEUE
MODE
COUNT EMPTY

Bytronic International Ltd.

4.5.9

Industrial Control Trainer Manual

Mitsubishi FXo Labwork 3

If there are rings in the queue (M10 off) and the

assembly hopper is empty, initialise a timer to

give a 2 second delay before activating the rotary

solenoid. This acts as a delay for the first ring

in the queue to settle against the index cam and

for an assembled component to clear the hopper.

M10
X0
T1
K20

35 ///(T1 )
QUEUE HOPPR DSPNS
DSPNS
EMPTY FULL DELAY
DELAY

If the maximum amount has been reached, energise

M1 to disable the sort solenoid and prevent

further rings being entered into the queue.

M12
M1

41 ( )
QUEUE
QUEUE
IS
FULL
FULL

When the 2 second dispense delay (T1) is complete,

activate the rotary solenoid for 0.5 seconds to

index a ring into the assembly hopper.

T1
T2
Y1

43 /( )
DSPNSROTRY
ROTRY
DELAYSOLND
SOLND

ON

Y1

K5


(T2 )
ROTRY
ROTRY
SOLND
SOLND

ON

When the rotary solenoid has been activated,

decrement the ring queue count register.

T2

50 [DEC D0
]
ROTRY
QUEUE
SOLND
COUNT
ON

54 [END ]

Bytronic International Ltd.

4.5.10

Industrial Control Trainer Manual

Mitsubishi FXo Labwork 4

Mitsubishi FXo Labwork 4:


Plastic Ring 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 plastic ring and eject the ring into the reject bin.

Procedure
1.

Execute the procedure given in labwork 3.

2.

Along the length of the belt conveyor a range of sensors are


mounted to detect the presence and material of objects travelling
down the conveyor.
The sensors are -

Bytronic International Ltd.

a)

Inductive metal sensor with a range of approximately 5mm


on a steel target.

b)

Infra red (I/R) through beam proximity sensor which is used


to detect the presence of any object.

c)

Capacitive sensor which detects almost any material. In the


present position this sensor is used to detect the presence of a
plastic ring assembled onto a metal peg component.

d)

I/R reflective sensor attached to the capacitive sensor bracket


which detects the presence of any object passing.

e)

I/R reflective sensor attached to the reject solenoid bracket to


detect the presence of any object passing. This can be used in
conjunction with the reject solenoid to eject items into the
reject bin.

4.5.11

Industrial Control Trainer Manual

Mitsubishi FXo 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 for
a single plastic ring is shown in figure 4.5.6.

Figure 4.5.6. Sensor Signal Sequence for a Single Plastic Ring

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.

Bytronic International Ltd.

4.5.12

Industrial Control Trainer Manual

Mitsubishi FXo Labwork 4

Figure 4.5.7 Ladder Diagram for Labwork 4


Clear the assembly chute ring queue count data

register and the metal peg present auxiliary relay

on the first execution scan.

M8002
K

0 [MOV 0
D0
]
FIRST
QUEUE
SCAN
COUNT

[RST M3
]

METAL

PEG

PRSNT
Use M8000 to continuously activate both the belt

and chain conveyors. M8000 is energised

continuously while the PLC is in run mode.

M8000
Y3

7 ( )
RUN
CHAIN
MODE

Y4

( )

BELT

Pulse M0 when a component is detected at the sort

area. This is necessary so that the component will

not be detected more than once.

X1

10 [PLS M0
]
SORT
PART
AREA
SORT

AREA

When a component is detected at the sort area and

the component is not a metal peg and the assembly

chute ring queue is not full, activate the sort

solenoid output for 0.5 seconds to push the

component down into the assembly chute.

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

Increment the ring queue count register when the

sort solenoid has been activated.

T0

22 [INC D0
]
SORT
QUEUE
SOLND
COUNT
ON

Compare the queue count with both 1 and 4 to

determine whether there are any rings in the queue

and whether the queue is full.

M8000
K
K

26 [ZCP 1
4
D0
M10 ]
RUN
QUEUE QUEUE
MODE
COUNT EMPTY

If there are rings in the queue (M10 off) and the

assembly hopper is empty, initialise a timer to

give a 2 second delay before activating the rotary

solenoid. This acts as a delay for the first ring

in the queue to settle against the index cam and

for an assembled component to clear the hopper.

M10
X0
T1
K20

36 ///(T1 )
QUEUE HOPPR DSPNS
DSPNS
EMPTY FULL DELAY
DELAY

Bytronic International Ltd.

4.5.13

Industrial Control Trainer Manual

Mitsubishi FXo Labwork 4

If the maximum amount has been reached, energise

M1 to disable the sort solenoid and prevent

further rings being entered into the queue.

M12
M1

42 ( )
QUEUE
QUEUE
IS
FULL
FULL

When the 2 second dispense delay (T1) is complete,

activate the rotary solenoid for 0.5 seconds to

index a ring into the assembly hopper.

T1
T2
Y1

44 /( )
DSPNSROTRY
ROTRY
DELAYSOLND
SOLND

ON

Y1

K5


(T2 )
ROTRY
ROTRY
SOLND
SOLND

ON

When the rotary solenoid has been activated,

decrement the ring queue count register.

T2

51 [DEC D0
]
ROTRY
QUEUE
SOLND
COUNT
ON

Set M3 when a metal peg is detected on the belt

conveyor so that the part will not be rejected.

X7

55 [SET M3
]
INDCT
METAL
SENSR
PEG

PRSNT

When a component is detected at the reject area

and the component is not a metal peg, activate the

reject solenoid for 0.5 seconds to eject the

component into the reject bin.

X2
M3
T3
Y2

57 //( )
REJCT METALREJCT
REJCT
AREA PEG SOLND
SOLND

PRSNTON

Y2

K5


(T3 )
REJCT
REJCT
SOLND
SOLND

ON

When the component has left the reject area, pulse

M2.

X2

65 /[PLS M2
]
REJCT
LEFT
AREA
REJCT

AREA

Reset the metal peg present auxiliary relay when

M2 is energised.

M2

68 [RST M3
]
LEFT
METAL
REJCT
PEG

AREA
PRSNT

70 [END ]

Bytronic International Ltd.

4.5.14

Industrial Control Trainer Manual

Mitsubishi FXo Labwork 5

Mitsubishi FXo 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.

Execute the procedure given in labwork 3.

2.

Use the signals from the feedback sensors discussed in labwork 4 to


detect the presence of a single metal component. With the standard
pre-set arrangement of sensors the feedback sequence is show in
figure 4.5.8.

Figure 4.5.8. Sensor Signal Sequence for a Metal Component

Bytronic International Ltd.

4.5.15

Industrial Control Trainer Manual

Mitsubishi FXo Labwork 5

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.

Figure 4.5.9. Ladder Diagram Solution for Labwork 5


Clear the assembly chute ring queue count data

register and both the metal peg present and ring

assembled auxiliary relays on the first execution

scan.

M8002
K

0 [MOV 0
D0
]
FIRST
QUEUE
SCAN
COUNT

[RST M3
]

METAL

PEG

PRSNT

[RST M4
]

RING

ASMBD

Use M8000 to continuously activate both the belt

and chain conveyors. M8000 is energised

continuously while the PLC is in run mode.

M8000
Y3

8 ( )
RUN
CHAIN
MODE

Y4

( )

BELT

Pulse M0 when a component is detected at the sort

area. This is necessary so that the component will

not be detected more than once.

X1

11 [PLS M0
]
SORT
PART
AREA
SORT

AREA

Bytronic International Ltd.

4.5.16

Industrial Control Trainer Manual

Mitsubishi FXo Labwork 5

When a component is detected at the sort area and

the component is not a metal peg and the assembly

chute ring queue is not full, activate the sort

solenoid output for 0.5 seconds to push the

component down into the assembly chute.

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

Increment the ring queue count register when the

sort solenoid has been activated.

T0

23 [INC D0
]
SORT
QUEUE
SOLND
COUNT
ON

Compare the queue count with both 1 and 4 to

determine whether there are any rings in the queue

and whether the queue is full.

M8000
K
K

27 [ZCP 1
4
D0
M10 ]
RUN
QUEUE QUEUE
MODE
COUNT EMPTY

If there are rings in the queue (M10 off) and the

assembly hopper is empty, initialise a timer to

give a 2 second delay before activating the rotary

solenoid. This acts as a delay for the first ring

in the queue to settle against the index cam and

for an assembled component to clear the hopper.

M10
X0
T1
K20

37 ///(T1 )
QUEUE HOPPR DSPNS
DSPNS
EMPTY FULL DELAY
DELAY

If the maximum amount has been reached, energise

M1 to disable the sort solenoid and prevent

further rings being entered into the queue.

M12
M1

43 ( )
QUEUE
QUEUE
IS
FULL
FULL

When the 2 second dispense delay (T1) is complete,

activate the rotary solenoid for 0.5 seconds to

index a ring into the assembly hopper.

T1
T2
Y1

45 /( )
DSPNSROTRY
ROTRY
DELAYSOLND
SOLND

ON

Y1

K5


(T2 )
ROTRY
ROTRY
SOLND
SOLND

ON

When the rotary solenoid has been activated,

decrement the ring queue count register.

T2

52 [DEC D0
]
ROTRY
QUEUE
SOLND
COUNT
ON

Bytronic International Ltd.

4.5.17

Industrial Control Trainer Manual

Mitsubishi FXo Labwork 5

Set M3 when a metal peg is detected on the belt

conveyor so that the part will not be rejected.

X7

56 [SET M3
]
INDCT
METAL
SENSR
PEG

PRSNT

Set M4 when a plastic ring is detected by the

capacitive sensor to indicate that the component

is a correctly assembled part.

X6

58 [SET M4
]
CPTVE
RING
SENSR
ASMBD

When a component is detected at the reject area

and the component is a single metal peg, activate

the reject solenoid for 0.5 seconds to eject the

component into the reject bin.

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

When the component has left the reject area, pulse

M2.

X2

69 /[PLS M2
]
REJCT
LEFT
AREA
REJCT

AREA

Reset the metal peg present and ring assembled

auxiliary relays when M2 is energised.

M2

72 [RST M3
]
LEFT
METAL
REJCT
PEG

AREA
PRSNT

[RST M4
]

RING

ASMBD

75 [END ]

Bytronic International Ltd.

4.5.18

Industrial Control Trainer Manual

Mitsubishi FXo Labwork 6

Mitsubishi FXo Labwork 6:


Component / Assembly Detection and Sorting
Objective
There are four objectives to labwork 6.
1.

The sorting of the plastic rings on the chain conveyor and assembly
hopper loading (as in labwork 3).

2.

Detection of a plastic ring travelling along the belt conveyor and


ejecting it into the reject bin.

3.

Detection of a metal component travelling along the belt conveyor


and ejecting it into the reject bin.

4.

Detection of an assembled product travelling along the belt


conveyor and accepting it.

Procedure

Bytronic International Ltd.

1.

Execute the routine developed in labwork 3.

2.

Use the feedback sensors discussed in labwork 4 to determine the


type of component travelling along the belt conveyor. The
sequence for the unassembled metal peg and plastic ring were
discussed in labworks 4 & 5. The signal sequence for an assembled
product is shown in figure 4.5.10.

4.5.19

Industrial Control Trainer Manual

Mitsubishi FXo Labwork 6

Detected Using the Capacitive Sensor (INPUT 6)


Plastic Ring

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

Figure 4.5.10. Signal Sequence for an Assembled Product

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.

Bytronic International Ltd.

4.5.20

Industrial Control Trainer Manual

Mitsubishi FXo Labwork 6

Figure 4.5.11. Ladder Diagram Solution for Labwork 6


Clear the assembly chute ring queue count data

register and both the metal peg present and ring

assembled auxiliary relays on the first execution

scan.

M8002
K

0 [MOV 0
D0
]
FIRST
QUEUE
SCAN
COUNT

[RST M3
]

METAL

PEG

PRSNT

[RST M4
]

RING

ASMBD

Use M8000 to continuously activate both the belt

and chain conveyors. M8000 is energised

continuously while the PLC is in run mode.

M8000
Y3

8 ( )
RUN
CHAIN
MODE

Y4

( )

BELT

Pulse M0 when a component is detected at the sort

area. This is necessary so that the component will

not be detected more than once.

X1

11 [PLS M0
]
SORT
PART
AREA
SORT

AREA

When a component is detected at the sort area and

the component is not a metal peg and the assembly

chute ring queue is not full, activate the sort

solenoid output for 0.5 seconds to push the

component down into the assembly chute.

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

Increment the ring queue count register when the

sort solenoid has been activated.

T0

23 [INC D0
]
SORT
QUEUE
SOLND
COUNT
ON

Bytronic International Ltd.

4.5.21

Industrial Control Trainer Manual

Mitsubishi FXo Labwork 6

Compare the queue count with both 1 and 4 to

determine whether there are any rings in the queue

and whether the queue is full.

M8000
K
K

27 [ZCP 1
4
D0
M10 ]
RUN
QUEUE QUEUE
MODE
COUNT EMPTY

If there are rings in the queue (M10 off) and the

assembly hopper is empty, initialise a timer to

give a 2 second delay before activating the rotary

solenoid. This acts as a delay for the first ring

in the queue to settle against the index cam and

for an assembled component to clear the hopper.

M10
X0
T1
K20

37 ///(T1 )
QUEUE HOPPR DSPNS
DSPNS
EMPTY FULL DELAY
DELAY

If the maximum amount has been reached, energise

M1 to disable the sort solenoid and prevent

further rings being entered into the queue.

M12
M1

43 ( )
QUEUE
QUEUE
IS
FULL
FULL

When the 2 second dispense delay (T1) is complete,

activate the rotary solenoid for 0.5 seconds to

index a ring into the assembly hopper.

T1
T2
Y1

45 /( )
DSPNSROTRY
ROTRY
DELAYSOLND
SOLND

ON

Y1

K5


(T2 )
ROTRY
ROTRY
SOLND
SOLND

ON

When the rotary solenoid has been activated,

decrement the ring queue count register.

T2

52 [DEC D0
]
ROTRY
QUEUE
SOLND
COUNT
ON

Set M3 when a metal peg is detected on the belt

conveyor so that the part will not be rejected.

X7

56 [SET M3
]
INDCT
METAL
SENSR
PEG

PRSNT

Set M4 when a plastic ring is detected by the

capacitive sensor to indicate that the component

is a correctly assembled part.

X6

58 [SET M4
]
CPTVE
RING
SENSR
ASMBD

Bytronic International Ltd.

4.5.22

Industrial Control Trainer Manual

Mitsubishi FXo Labwork 6

When a component is detected at the reject area

and the component is not an assembled part (either

a single plastic ring or metal peg) activate the

reject solenoid for 0.5 seconds to eject the

component into the reject bin.

X2
M3
T3
Y2

60 //( )
REJCTMETALREJCT
REJCT
AREA PEG SOLND
SOLND

PRSNTON

M4

K5

/
(T3 )

RING
REJCT

ASMBD
SOLND

ON

Y2

REJCT

SOLND

When the component has left the reject area, pulse

M2.

X2

70 /[PLS M2
]
REJCT
LEFT
AREA
REJCT

AREA

Reset the metal peg present and ring assembled

auxiliary relays when M2 is energised.

M2

73 [RST M3
]
LEFT
METAL
REJCT
PEG

AREA
PRSNT

[RST M4
]

RING

ASMBD

76 [END ]

Bytronic International Ltd.

4.5.23

Industrial Control Trainer Manual

Mitsubishi FXo Labwork 7

Mitsubishi FXo 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 industrial. Having completed this labwork, you
will have achieved full control of the ICT system.

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

Bytronic International Ltd.

4.5.24

Industrial Control Trainer Manual

Mitsubishi FXo Labwork 7

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.

The data retrieved from the component passing the capacitive


sensor is loaded into the first element of shift register M50. When
the component passes the I/R sensor at the capacitive area, both the
capacitive sensor pointer (M40) and data (M50) shift registers are
shifted left by 1 bit.

4.

The program logically 'AND's the inductive pointer register with


the inductive data register and also the capacitive pointer register
with the capacitive data register. From this result, a decision can be
made on whether to accept or reject the leading component when it
reaches the reject area.
M3.5 M3.4 M3.3 M3.2 M3.1 M3.0
Inductive Sensor
Pointer Register

MW2

M5.5 M5.4 M5.3 M5.2 M5.1 M5.0


Inductive Sensor
Data Register

Capacitive Sensor
Pointer Register
Capacitive Sensor
Data Register

Bytronic International Ltd.

MW4

M7.5 M7.4 M7.3 M7.2 M7.1 M7.0

MW6

M9.5 M9.4 M9.3 M9.2 M9.1 M9.0

4.5.25

MW8

Industrial Control Trainer Manual

Mitsubishi FXo Labwork 7

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.

Bytronic International Ltd.

4.5.26

Industrial Control Trainer Manual

Mitsubishi FXo Labwork 7

Figure 4.5.12. Ladder Diagram Solution for Labwork 7


Reset all the auxiliary relays used in the control

program and clear the ring queue count register on

the first execution scan of the program.

M8002

0 [ZRST M0
M59 ]
FIRST
PART

SCAN
SORT

AREA

[MOV 0
D0
]

QUEUE

COUNT

Initialise inductive sensor pointer register.

M21
M22
M23
M24
M25
M20

11 /////( )

INDTV

PINTR

RGSTR

Initialise the capacitive sensor pointer register.

M41
M42
M43
M44
M45
M40

17 /////( )

CAPTV

PINTR

RGSTR

Use M8000 to continuously activate both the belt

and chain conveyors. M8000 is energised

continuously while the PLC is in run mode.

M8000
Y3

23 ( )
RUN
CHAIN
MODE

Y4

( )

BELT

Pulse M0 when a component is detected at the sort

area. This is necessary so that the component will

not be detected more than once.

X1

26 [PLS M0
]
SORT
PART
AREA
SORT

AREA

When a component is detected at the sort area and

the component is not a metal peg and the assembly

chute ring queue is not full, activate the sort

solenoid output for 0.5 seconds to push the

component down into the assembly chute.

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

Bytronic International Ltd.

4.5.27

Industrial Control Trainer Manual

Mitsubishi FXo Labwork 7

Increment the ring queue count register when the

sort solenoid has been activated.

T0

38 [INC D0
]
SORT
QUEUE
SOLND
COUNT
ON

Compare the queue count with both 1 and 4 to

determine whether there are any rings in the queue

and whether the queue is full.

M8000
K
K

42 [ZCP 1
4
D0
M10 ]
RUN
QUEUE QUEUE
MODE
COUNT EMPTY

If there are rings in the queue (M10 off) and the

assembly hopper is empty, initialise a timer to

give a 2 second delay before activating the rotary

solenoid. This acts as a delay for the first ring

in the queue to settle against the index cam and

for an assembled component to clear the hopper.

M10
X0
T1
K20

52 ///(T1 )
QUEUE HOPPR DSPNS
DSPNS
EMPTY FULL DELAY
DELAY

If the maximum amount has been reached, energise

M1 to disable the sort solenoid and prevent

further rings being entered into the queue.

M12
M1

58 ( )
QUEUE
QUEUE
IS
FULL
FULL

When the 2 second dispense delay (T1) is complete,

activate the rotary solenoid for 0.5 seconds to

index a ring into the assembly hopper.

T1
T2
Y1

60 /( )
DSPNSROTRY
ROTRY
DELAYSOLND
SOLND

ON

Y1

K5


(T2 )
ROTRY
ROTRY
SOLND
SOLND

ON

When the rotary solenoid has been activated,

decrement the ring queue count register.

T2

67 [DEC D0
]
ROTRY
QUEUE
SOLND
COUNT
ON

When a component is detected by the inductive

sensor, pulse M2.

X7

71 [PLS M2
]
INDCT
INDTV
SENSR
PULSE

When M2 is energised, set the first element of the

inductive sensor data register to indicate that a

metal peg is present.

M2

74 [SET M30 ]
INDTV
INDTV
PULSE
DATA

RGSTR

Bytronic International Ltd.

4.5.28

Industrial Control Trainer Manual

Mitsubishi FXo Labwork 7

When a component passes through the through beam


sensor, pulse M3.
X5
76 [PLS
THRGH
BEAM

When M3 is energised, shift left by 1 bit both the


inductive pointer and data registers and reset
the input element of the data element ready for
the next component.
M3
K
79 [SFTL M20
M21
5
THRU
INDTV
BEAM
PINTR
PULSE
RGSTR

[SFTL M30
M31
5

INDTV

DATA

RGSTR

[RST

When a component is detected by the capacitive


sensor, pulse M4.
X6
99 [PLS
CPTVE
SENSR

When M4 is energised, set the first element of the


capacitive sensor data register to indicate that
a plastic ring is present.
M4
102 [SET
CAPTV
PULSE

When a component is detected by the capacitive


area sensor, pulse M5.
X3
104 [PLS
CPTVE
AREA

When M5 is energised, shift left by 1 bit both the


capacitive pointer and data registers and reset
the input element of the data register ready for
the next component.
M5
K
107 [SFTL M40
M41
5
CAPTV
CAPTV
AREA
PINTR
PULSE
RGSTR

[SFTL M50
M51
5

CAPTV

DATA

RGSTR

[RST

Bytronic International Ltd.

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

Industrial Control Trainer Manual

Mitsubishi FXo Labwork 7

Check both the inductive and capacitve sensor data

registers with the corresponding pointer registers

to determine whether the leading component on the

belt conveyor is a correctly assembled part and

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

When a component is detected at the reject area

and the component is not an assembled part (either

a single plastic ring or metal peg) activate the

reject solenoid for 0.5 seconds to eject the

component into the reject bin.

X2
M6
T3
Y2

157 //( )
REJCT ASMBDREJCT
REJCT
AREA PART SOLND
SOLND

ON

Y2

K5


(T3 )
REJCT
REJCT
SOLND
SOLND

ON

Set M7 when a component is detected at the reject

area.

X2

165 [SET M7
]
REJCT
PART
AREA
AT

REJCT
When the component has left the reject area, shift

right by 1 bit both the inductive and capacitive

sensor pointer registers to point to the data for

the next component.

X2
M7
K
K

167 / [SFTR M26


M21
5
1
]
REJCT PART

AREA AT

REJCT

K
K

[SFTR M46
M41
5
1
]

[RST M7
]

PART

AT

REJCT

188 [END ]

Bytronic International Ltd.

4.5.30

Industrial Control Trainer Manual

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.

Bytronic International Ltd.

4.6.1

Industrial Control Trainer Manual

Siemens S5 Labwork 1

Siemens S5 Labwork 1: Sorting Routine


Objective
There are two objectives to labwork 1 1.

Detection of the plastic component travelling along the chain


conveyor and ejection into the assembly chute.

2.

Detection of the metal component travelling along the chain


conveyor and non-ejection into the assembly chute. Allowing the
component to pass the sorting area and be deflected off the chain
conveyor, down the feeder chute.

Component detection and sorting according to component / product type


is a common requirement throughout industrial control. From areas such
as packing lines to automated assembly and food processing.

Procedure
1.

Activate the chain conveyor.

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.

Sensor 1 is a proximity sensor that detects the presence of any object.


Sensor 4 is set up to detect at a higher level than the plastic ring,
therefore it only detects the metal pegs passing.
These two sensors may be logically gated as shown in figure 4.6.1 to
produce a sorting signal for the sort solenoid to eject the plastic rings
down the assembly chute.

Bytronic International Ltd.

4.6.2

Industrial Control Trainer Manual

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

Figure 4.6.1. Signal Sequences at the Sorting Area

Solution
A ladder diagram solution for this labwork is given in figure 4.6.2.

Bytronic International Ltd.

4.6.3

Industrial Control Trainer Manual

Siemens S5 Labwork 1

Figure 4.6.2. Ladder Diagram Solution for Labwork 1


SEGMENT LOGIC
OB001
SEGMENT 1
Activate the chain conveyor motor.

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

Bytronic International Ltd.

4.6.4

Industrial Control Trainer Manual

Siemens S5 Labwork 2

Siemens S5 Labwork 2 : Queue Counting


Objective
The requirement for counting is an obvious necessity in almost all areas
of plant and process control.
The objective of this labwork is to enhance Labwork 1 to include a queue
counter for the assembly chute. This is essential because the assembly
chute has a maximum queue length of 5 plastic rings. Once the queue
has been filled two alternative actions can be taken, namely either (a).

Stop the chain conveyor.

(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.

Activate the chain conveyor.

2.

Sort the metal and plastic components using sensors 1 and 4 as


done in labwork 1.

3.

On detecting and ejecting a plastic ring down the assembly chute,


increment a counter. When the counter exceeds 5 take either action
(a) or (b) mentioned in the objectives.

Solution
A ladder diagram for this labwork is given in figure 4.6.3.

Bytronic International Ltd.

4.6.5

Industrial Control Trainer Manual

Siemens S5 Labwork 2

Figure 4.6.3. Ladder Diagram Solution for Labwork 2


SEGMENT LOGIC
OB001
SEGMENT 1
Clear the ring queue counter (counter 1) on the first execution pass.
First
Pass
Complete
F100.0
COUNTERWORD F000.0
/ CLEAR
(EN)

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

Bytronic International Ltd.

4.6.6

Industrial Control Trainer Manual

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

Bytronic International Ltd.

4.6.7

Industrial Control Trainer Manual

Siemens S5 Labwork 3

Siemens S5 Labwork 3 : Operation Timing


Objective
The objectives of this labwork are to 1.

Combine the sorting routine developed in labwork 1 and the queue


counting of labwork 2 together with assembly area loading using
the rotary indexing unit.

2.

Generate a queue count decrement as the plastic rings are taken


from the queue into the assembly area.

3.

Introduce essential time delays to take account of system lags.

Procedure
1.

Activate the chain conveyor.

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 and plastic components using sensors 1 and 4 as


done in labwork 1.

4.

Generate a queue count as in labwork 2.

5.

Use the IR reflective sensor situated by the assembly hopper to


detect when the hopper is empty. When the hopper is empty,
activate the rotary solenoid to index a ring into the hopper and
decrement the queue count accordingly.

A typical sequence of events is shown in the timing diagram figure 4.6.4.

Bytronic International Ltd.

4.6.8

Industrial Control Trainer Manual

Siemens S5 Labwork 3

I/P 32.0

I/P 32.4

O/P 32.0

O/P 32.1

I/P 32.0

Figure 4.6.4. Timing Diagram for the Assembly Area

Note: Time delays need to be built into the program in the following
areas a)

'Hold on' time of rotary solenoid.

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)

To ensure correct operation of the assembly hopper, a delay must


be incorporated to allow the component being assembled to clear
the assembly hopper before a ring is indexed.

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.

Bytronic International Ltd.

4.6.9

Industrial Control Trainer Manual

Siemens S5 Labwork 3

Figure 4.6.5. Ladder Diagram Solution for Labwork 3


SEGMENT LOGIC
OB001
SEGMENT 1
Clear the ring queue counter (counter 1) on the first execution pass.
First
Pass
Complete
F100.0
COUNTERWORD F000.0
/ CLEAR
(EN)

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

Bytronic International Ltd.

4.6.10

Industrial Control Trainer Manual

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

Bytronic International Ltd.

4.6.11

Industrial Control Trainer Manual

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)

Bytronic International Ltd.

4.6.12

Industrial Control Trainer Manual

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.

Execute the procedure given in labwork 3.

2.

Along the length of the belt conveyor a range of sensors are


mounted to detect the presence and material of objects travelling
down the conveyor.
The sensors are -

Bytronic International Ltd.

a)

Inductive metal sensor with a range of approximately 5mm


on a steel target.

b)

Infra red (IR) through beam proximity sensor which is used to


detect the presence of any object.

c)

Capacitive sensor which detects almost any material. In the


present position this sensor is used to detect the presence of a
plastic ring assembled onto a metal peg component.

d)

IR reflective sensor attached to the capacitive sensor bracket


which detects the presence of any object passing.

e)

IR reflective sensor attached to the reject solenoid bracket to


detect the presence of any object passing. This can be used
in conjunction with the reject solenoid to eject items into the
reject bin.

4.6.13

Industrial Control Trainer Manual

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

Figure 4.6.6. Sensor Signal Sequence for Plastic Ring

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.

Bytronic International Ltd.

4.6.14

Industrial Control Trainer Manual

Siemens S5 Labwork 4

Figure 4.6.7. Ladder Diagram for Labwork 4


SEGMENT LOGIC
OB001
SEGMENT 1
Clear the ring queue counter (counter 1) on the first execution pass.
First
Pass
Complete
F100.0
COUNTERWORD F000.0
/ CLEAR
(EN)

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

( )

Bytronic International Ltd.

4.6.15

Industrial Control Trainer Manual

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

Bytronic International Ltd.

4.6.16

Industrial Control Trainer Manual

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)

Bytronic International Ltd.

4.6.17

Industrial Control Trainer Manual

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)

Bytronic International Ltd.

4.6.18

Industrial Control Trainer Manual

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.

Execute the procedure given in labwork 3.

2.

Use the signals from the feedback sensors discussed in labwork 4 to


detect the presence of a single metal component. With the standard
pre-set arrangement of sensors the feedback sequence is show in
figure 4.6.8.

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

Figure 4.6.8. Sensor Signal Sequence for a Metal Component

Bytronic International Ltd.

4.6.19

Industrial Control Trainer Manual

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.

Figure 4.6.9. Ladder Diagram Solution for Labwork 5


SEGMENT LOGIC
OB001
SEGMENT 1
Clear the ring queue counter (counter 1) on the first execution pass.
First
Pass
Complete
F100.0
COUNTERWORD F000.0
/ CLEAR
(EN)

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)

Bytronic International Ltd.

4.6.20

Industrial Control Trainer Manual

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)

Bytronic International Ltd.

4.6.21

Industrial Control Trainer Manual

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

Bytronic International Ltd.

4.6.22

Industrial Control Trainer Manual

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)

Bytronic International Ltd.

4.6.23

Industrial Control Trainer Manual

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)

Bytronic International Ltd.

4.6.24

Industrial Control Trainer Manual

Siemens S5 Labwork 6

Siemens S5 Labwork 6:
Component / Assembly Detection and Sorting
Objective
There are four objectives to labwork 6.
1.

The sorting of plastic rings on the chain conveyor and assembly


hopper loading (as in Labwork 3).

2.

Detection of a plastic ring travelling along the belt conveyor and


ejecting it into the reject bin.

3.

Detection of a metal peg travelling along the belt conveyor and


ejecting it into the reject bin.

4.

Detection of an assembled component travelling along the belt


conveyor and accepting it.

Procedure

Bytronic International Ltd.

1.

Execute the procedure given in labwork 3.

2.

Use the feedback sensors discussed in labwork 4 to determine the


type of component travelling along the belt conveyor. The sequence
for the unassembled metal peg and plastic ring were discussed in
labworks 4 & 5. The signal sequence for an assembled product is
shown in figure 4.6.10.

4.6.25

Industrial Control Trainer Manual

Siemens S5 Labwork 6

Detected Using the Capacitive Sensor (INPUT 6)


Plastic Ring
Aluminium Peg
Detected Using the Inductive Sensor (INPUT 7)

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

Figure 4.6.10. Signal Sequence for an Assembled Product

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.

Bytronic International Ltd.

4.6.26

Industrial Control Trainer Manual

Siemens S5 Labwork 6

Figure 4.6.11. Ladder Diagram Solution for Labwork 6


SEGMENT LOGIC
OB001
SEGMENT 1
Clear the ring queue counter (counter 1) on the first execution pass.
First
Pass
Complete
F100.0
COUNTERWORD F000.0
/ CLEAR
(EN)

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

( )

Bytronic International Ltd.

4.6.27

Industrial Control Trainer Manual

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

Bytronic International Ltd.

4.6.28

Industrial Control Trainer Manual

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)

Bytronic International Ltd.

4.6.29

Industrial Control Trainer Manual

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
( )

Bytronic International Ltd.

4.6.30

Industrial Control Trainer Manual

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)

Bytronic International Ltd.

4.6.31

Industrial Control Trainer Manual

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)

The decision on the component type may be made at a single point


along the length of the conveyor. This can be achieved by putting
the capacitive sensor directly opposite the inductive probe. This
data must then be stored in a shift register so that a decision to pass
or reject can be made.

b)

With the standard sensor arrangement, as used in the previous labs,


as a component passes a sensing area, the data is stored against the
component number in shift registers.

Solution
A ladder diagram solution to this labwork is shown in figure 4.6.12.

Bytronic International Ltd.

4.6.32

Industrial Control Trainer Manual

Siemens S5 Labwork 7

Figure 4.6.12. Ladder Diagram Solution for Labwork 7


SEGMENT LOGIC
OB001
SEGMENT 1
Clear the ring queue counter (counter 1) on the first execution pass.
First
Pass
Complete
F100.0
JUMP TO SUBROUTINE F000.0
/ PB001
(EN)

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

Bytronic International Ltd.

4.6.33

Industrial Control Trainer Manual

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

Bytronic International Ltd.

4.6.34

Industrial Control Trainer Manual

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

Bytronic International Ltd.

4.6.35

Industrial Control Trainer Manual

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

Bytronic International Ltd.

4.6.36

Industrial Control Trainer Manual

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

Bytronic International Ltd.

4.6.37

Industrial Control Trainer Manual

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)

Bytronic International Ltd.

4.6.38

Industrial Control Trainer Manual

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

Bytronic International Ltd.

4.6.39

Industrial Control Trainer Manual

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

Bytronic International Ltd.

4.6.40

Industrial Control Trainer Manual

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

Bytronic International Ltd.

4.6.41

Industrial Control Trainer Manual

Siemens S7-200 Labworks

Siemens S7-200 Labworks


The following exercises based around the Industrial Control Trainer are
designed to be carried out using the Siemens S7-200 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 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 S7 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
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.

Bytronic International Ltd.

4.7.1

Industrial Control Trainer Manual

Siemens S7-200 Labworks

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.

Using the S7-200 PC programming software, select


ONLINE - F4 at the main menu screen and then select
ENTER - F8 when the PLC station number is requested.

2.

After a short delay you will be shown the contents of the


PLC. Press the SPACE bar to display the second menu bar
and select UTILS - F6.

3.

A list of PLC utilities will now be displayed. Enter the


number 23 to select SET OUTPUT TABLE.

4.

You will now be asked to freeze the outputs, select NO - F2


where upon you will be shown the output data table.

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.

When the transition to STOP is now made, the output table is


copied to the outputs, thus de-activating all the ICT1 actuators.

Bytronic International Ltd.

4.7.2

Industrial Control Trainer Manual

Siemens S7-200 Labwork 1

Siemens S7-200 Labwork 1 : Sorting Routine


Objective
There are two objectives to labwork 1 1.

Detection of the plastic component travelling along the chain


conveyor and ejection into the assembly chute.

2.

Detection of the metal component travelling along the chain


conveyor and non-ejection into the assembly chute. Allowing the
component to pass the sorting area and be deflected off the chain
conveyor, down the feeder chute.

Component detection and sorting according to component / product type


is a common requirement throughout industrial control. From areas such
as packing lines to automated assembly and food processing.

Procedure
1.

Activate the chain conveyor.

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.

Sensor 1 is a proximity sensor that detects the presence of any object.


Sensor 4 is set up to detect at a higher level than the plastic ring,
therefore it only detects the metal pegs passing.
These two sensors may be logically gated as shown in figure 4.7.1 to
produce a sorting signal for the sort solenoid to eject the plastic rings
down the assembly chute.

Bytronic International Ltd.

4.7.3

Industrial Control Trainer Manual

Siemens S7-200 Labwork 1

Figure 4.7.1. Signal Sequences at the Sorting Area.

Solution
A ladder diagram solution for this labwork is given in figure 4.7.2.

Bytronic International Ltd.

4.7.4

Industrial Control Trainer Manual

Siemens S7-200 Labwork 1

Figure 4.7.2. Ladder Diagram Solution for Labwork 1

Continuously activate the chain conveyor.

Always
Chain
On
Conveyor

SM0.0
Q0.3

(
)

Pulse M0.0 when a component is detected at the sort area.

This is necessary so that the component will not be

detected more than once.

Sort
Component
Area
At Sort
Detect
Area

I0.1
M0.0

P (
)

When a component is detected at the sort area and the

component is not a metal peg, activate the sort solenoid

for 0.5 seconds to push the component down the assembly

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 )

Bytronic International Ltd.

4.7.5

Industrial Control Trainer Manual

Siemens S7-200 Labwork 2

Siemens S7-200 Labwork 2 : Queue Counting


Objective
The requirement for counting is an obvious necessity in almost all areas
of plant and process control.
The objective of this labwork is to enhance labwork 1 to include a queue
counter for the assembly chute. This is essential because the assembly
chute has a maximum queue length of 5 plastic rings. Once the queue has
been filled two alternative actions can be taken, namely either (a).

Stop the chain conveyor.

(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.

Activate the chain conveyor.

2.

Sort the metal and plastic components using sensors 1 and 4 as


done in labwork 1.

3.

On detecting and ejecting a plastic ring down the assembly chute,


increment a counter. When the counter reaches 5 take either action
(a) or (b) mentioned in the objectives.

Solution
A ladder diagram for this labwork is given in figure 4.7.3.

Bytronic International Ltd.

4.7.6

Industrial Control Trainer Manual

Siemens S7-200 Labwork 2

Figure 4.7.3 Ladder Diagram Solution for Labwork 2

Continuously activate the chain conveyor.

Always
Chain
On
Conveyor

SM0.0
Q0.3

(
)

Pulse M0.0 when a component is detected at the sort area.

This is necessary so that the component will not be

detected more than once.

Sort
Component
Area
At Sort
Detect
Area

I0.1
M0.0

P (
)

When a component is detected at the sort area and the

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 down the assembly chute.

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

been activated. When the count value equals the preset

value (5), the counter contact will energise and is then

used to disable the sort solenoid. Note that the counter

value is reset on the first execution scan of the program

(SM0.1).

Sort
Ring
Solenoid

Queue
On Time

Counter

T40
CTU
C0

CU

First

Scan

K5PV

SM0.1

( MEND )

Bytronic International Ltd.

4.7.7

Industrial Control Trainer Manual

Siemens S7-200 Labwork 3

Siemens S7-200 Labwork 3 : Operation Timing


Objective
The objectives of this labwork are to 1.

Combine the sorting routine developed in labwork 1 and the queue


counting of labwork 2 together with assembly area loading using
the rotary indexing unit.

2.

Generate a queue count decrement as the plastic rings are taken


from the queue into the assembly area.

3.

Introduce essential time delays to take account of system lags.

Procedure
1.

Activate the chain conveyor.

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 and plastic components using sensors 1 and 4 as in


labwork 1.

4.

Generate a queue count as in labwork 2.

5.

Use the IR reflective sensor situated by the assembly hopper to


detect when the hopper is empty. When the hopper is empty,
activate the rotary solenoid to index a ring into the assembly hopper
and decrement the ring queue count accordingly.

A typical sequence of events is shown in the timing diagram figure 4.7.4.

Bytronic International Ltd.

4.7.8

Industrial Control Trainer Manual

Siemens S7-200 Labwork 3

Figure 4.7.4. Timing Diagram for the Assembly Area.

Note: Time delays need to be built into the program in the following
areas a)

'Hold on' time of rotary solenoid.

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)

To ensure correct operation of the assembly hopper, a delay must


be incorporated to allow the component being assembled to clear
the assembly hopper before a ring is indexed.

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.

Bytronic International Ltd.

4.7.9

Industrial Control Trainer Manual

Siemens S7-200 Labwork 3

Figure 4.7.5. Ladder Diagram Solution for Labwork 3

Continuously activate both the chain and belt conveyors.

Always
Chain
On
Conveyor

SM0.0
Q0.3

(
)

Belt

Conveyor

Q0.4

(
)

Pulse M0.0 when a component is detected at the sort area.

This is necessary so that the component will not be

detected more than once.

Sort
Component
Area
At Sort
Detect
Area

I0.1
M0.0

P (
)

When a component is detected at the sort area and the

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 down the assembly chute.

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

Bytronic International Ltd.

4.7.10

Industrial Control Trainer Manual

Siemens S7-200 Labwork 3

Increment the ring queue count when the sort solenoid has

been activated. Decrement the ring queue count when the

rotary solenoid has been activated. When the count value

equals the preset value (5), the counter contact will

energise and is then used to disable the sort solenoid. Note

that the counter value is reset on the first execution scan

of the program (SM0.1).

Sort
Ring
Solenoid

Queue
On Time

Counter

T40
CTUD
C48

CU

Rotary

Solenoid

On Time
K5PV

T42

CD

First

Scan

SM0.1

If there are rings in the queue and the assembly hopper is

empty, initiate a 2 second timer to give a delay before

activating the rotary solenoid. This acts as a delay for

both the first ring in the queue to settle against the

index cam and for an assembled component to clear the

assembly area.

Ring
Assembly Dispense
Dispense

Queue
Area
Delay

Delay

Counter
Full

C48
K1
I0.0
T41
TON
T41
>= W / / IN

K20PT

When the 2 second dispense delay is complete, activate the

rotary solenoid for 0.5 seconds to dispense a ring into the

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 )

Bytronic International Ltd.

4.7.11

Industrial Control Trainer Manual

Siemens S7-200 Labwork 4

Siemens S7-200 Labwork 4:


Plastic Ring 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 plastic ring and eject the ring into the reject bin.

Procedure
1.

Execute the procedure given in labwork 3.

2.

Along the length of the belt conveyor a range of sensors are


mounted to detect the presence and material of objects travelling
down the conveyor.
The sensors are -

Bytronic International Ltd.

a)

Inductive metal sensor with a range of approximately 5mm


on a steel target.

b)

Infra red (I/R) through beam proximity sensor which is used


to detect the presence of any object.

c)

Capacitive sensor which detects almost any material. In the


present position this sensor is used to detect the presence of a
plastic ring assembled onto a metal peg component.

d)

I/R reflective sensor attached to the capacitive sensor bracket


which detects the presence of any object passing.

e)

I/R reflective sensor attached to the reject solenoid bracket to


detect the presence of any object passing. This can be used in
conjunction with the reject solenoid to eject items into the
reject bin.

4.7.12

Industrial Control Trainer Manual

Siemens S7-200 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 for
a single plastic ring is shown in figure 4.7.6.

Figure 4.7.6. Sensor Signal Sequence for a Single Plastic Ring..

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.

Bytronic International Ltd.

4.7.13

Industrial Control Trainer Manual

Siemens S7-200 Labwork 4

Figure 4.7.7. Ladder Diagram for Labwork 4

Clear the metal peg present register on the first execution

scan of the program.

First
Metal Peg
Scan
Present

SM0.1
M0.1
K1

(
R
)

Continuously activate both the chain and belt conveyors.

Always
Chain
On
Conveyor

SM0.0
Q0.3

(
)

Belt

Conveyor

Q0.4

(
)

Pulse M0.0 when a component is detected at the sort area.

This is necessary so that the component will not be

detected more than once.

Sort
Component
Area
At Sort
Detect
Area

I0.1
M0.0

P (
)

When a component is detected at the sort area and the

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 down the assembly chute.

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

Bytronic International Ltd.

4.7.14

Industrial Control Trainer Manual

Siemens S7-200 Labwork 4

Increment the ring queue count when the sort solenoid has

been activated. Decrement the ring queue count when the

rotary solenoid has been activated. When the count value

equals the preset value (5), the counter contact will

energise and is then used to disable the sort solenoid. Note

that the counter value is reset on the first execution scan

of the program (SM0.1).

Sort
Ring
Solenoid

Queue
On Time

Counter

T40
CTUD
C48

CU

Rotary

Solenoid

On Time
K5PV

T42

CD

First

Scan

SM0.1

If there are rings in the queue and the assembly hopper is

empty, initiate a 2 second timer to give a delay before

activating the rotary solenoid. This acts as a delay for

both the first ring in the queue to settle against the

index cam and for an assembled component to clear the

assembly area.

Ring
Assembly Dispense
Dispense

Queue
Area
Delay

Delay

Counter
Full

C48
K1
I0.0
T41
TON
T41
>= W / / IN

K20PT

When the 2 second dispense delay is complete, activate the

rotary solenoid for 0.5 seconds to dispense a ring into the

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

Set M0.1 when a metal peg is detected on the belt conveyor

so that the part will not be rejected.

Inductive
Metal Peg
Sensor
Present

I0.7
M0.1
K1

(
S
)

Bytronic International Ltd.

4.7.15

Industrial Control Trainer Manual

Siemens S7-200 Labwork 4

10

11

When a component is detected at the reject area and the

component is not a metal peg, activate the reject solenoid

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

On the falling edge of the reject area sensor signal

(component leaving reject area), reset the metal peg

present register (M0.1).

Reject
Metal Peg
Area
Present
Detect

I0.2
M0.1
K1

N (
R
)

( MEND )

Bytronic International Ltd.

4.7.16

Industrial Control Trainer Manual

Siemens S7-200 Labwork 5

Siemens S7-200 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.

Execute the procedure given in labwork 3.

2.

Use the signals from the feedback sensors discussed in labwork 4 to


detect the presence of a single metal component. With the standard
pre-set arrangement of sensors the feedback sequence is show in
figure 4.7.8.

Figure 4.7.8. Sensor Signal Sequence for a Metal Component.

Bytronic International Ltd.

4.7.17

Industrial Control Trainer Manual

Siemens S7-200 Labwork 5

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.

Figure 4.7.9. Ladder Diagram Solution for Labwork 5

Clear both the metal peg present and ring assembled

registers on the first execution scan of the program.

First
Metal Peg
Scan
Present

SM0.1
M0.1
K2

(
R
)

Continuously activate both the chain and belt conveyors.

Always
Chain
On
Conveyor

SM0.0
Q0.3

(
)

Belt

Conveyor

Q0.4

(
)

Pulse M0.0 when a component is detected at the sort area.

This is necessary so that the component will not be

detected more than once.

Sort
Component
Area
At Sort
Detect
Area

I0.1
M0.0

P (
)

When a component is detected at the sort area and the

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 down the assembly chute.

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

Bytronic International Ltd.

4.7.18

Industrial Control Trainer Manual

Siemens S7-200 Labwork 5

Increment the ring queue count when the sort solenoid has

been activated. Decrement the ring queue count when the

rotary solenoid has been activated. When the count value

equals the preset value (5), the counter contact will

energise and is then used to disable the sort solenoid. Note

that the counter value is reset on the first execution scan

of the program (SM0.1).

Sort
Ring
Solenoid

Queue
On Time

Counter

T40
CTUD
C48

CU

Rotary

Solenoid

On Time
K5PV

T42

CD

First

Scan

SM0.1

If there are rings in the queue and the assembly hopper is

empty, initiate a 2 second timer to give a delay before

activating the rotary solenoid. This acts as a delay for

both the first ring in the queue to settle against the

index cam and for an assembled component to clear the

assembly area.

Ring
Assembly Dispense
Dispense

Queue
Area
Delay

Delay

Counter
Full

C48
K1
I0.0
T41
TON
T41
>= W / / IN

K20PT

When the 2 second dispense delay is complete, activate the

rotary solenoid for 0.5 seconds to dispense a ring into the

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

Set M0.1 when a metal peg is detected on the belt conveyor

so that the part will not be rejected.

Inductive
Metal Peg
Sensor
Present

I0.7
M0.1
K1

(
S
)

Bytronic International Ltd.

4.7.19

Industrial Control Trainer Manual

Siemens S7-200 Labwork 5

10

11

12

Set M0.2 when a plastic ring is detected by the capacitive

sensor to indicate that the component is a correctly

assembled part.

Capacitve
Ring
Sensor
Assembled

I0.6
M0.2
K1

(
S
)

When a component is detected at the reject area and the

component is a single metal peg, activate the reject

solenoid for 0.5 seconds to eject the component into the

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

On the falling edge of the reject area sensor signal

(component leaving reject area), reset both the metal peg

present (M0.1) and ring assembled (M0.2) registers.

Reject
Metal Peg
Area
Present
Detect

I0.2
M0.1
K2

N (
R
)

( MEND )

Bytronic International Ltd.

4.7.20

Industrial Control Trainer Manual

Siemens S7-200 Labwork 6

Siemens S7-200 Labwork 6:


Component / Assembly Detection and Sorting
Objective
There are four objectives to labwork 6.
1.

The sorting of the plastic rings on the chain conveyor and assembly
hopper loading (as in labwork 3).

2.

Detection of a plastic ring travelling along the belt conveyor and


ejecting it into the reject bin.

3.

Detection of a metal component travelling along the belt conveyor


and ejecting it into the reject bin.

4.

Detection of an assembled product travelling along the belt


conveyor and accepting it.

Procedure

Bytronic International Ltd.

1.

Execute the routine developed in labwork 3.

2.

Use the feedback sensors discussed in labwork 4 to determine the


type of component travelling along the belt conveyor. The sequence
for the unassembled metal peg and plastic ring were discussed in
labworks 4 & 5. The signal sequence for an assembled product is
shown in figure 4.7.10.

4.7.21

Industrial Control Trainer Manual

Siemens S7-200 Labwork 6

Detected Using the Capacitive Sensor (INPUT 6)


Plastic Ring

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

Figure 4.7.10. Signal Sequence for an Assembled Product.

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.

Bytronic International Ltd.

4.7.22

Industrial Control Trainer Manual

Siemens S7-200 Labwork 6

Figure 4.7.11. Ladder Diagram Solution for Labwork 6

Clear both the metal peg present and ring assembled

registers on the first execution scan of the program.

First
Metal Peg
Scan
Present

SM0.1
M0.1
K2

(
R
)

Continuously activate both the chain and belt conveyors.

Always
Chain
On
Conveyor

SM0.0
Q0.3

(
)

Belt

Conveyor

Q0.4

(
)

Pulse M0.0 when a component is detected at the sort area.

This is necessary so that the component will not be

detected more than once.

Sort
Component
Area
At Sort
Detect
Area

I0.1
M0.0

P (
)

When a component is detected at the sort area and the

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 down the assembly chute.

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

Bytronic International Ltd.

4.7.23

Industrial Control Trainer Manual

Siemens S7-200 Labwork 6

Increment the ring queue count when the sort solenoid has

been activated. Decrement the ring queue count when the

rotary solenoid has been activated. When the count value

equals the preset value (5), the counter contact will

energise and is then used to disable the sort solenoid. Note

that the counter value is reset on the first execution scan

of the program (SM0.1).

Sort
Ring
Solenoid

Queue
On Time

Counter

T40
CTUD
C48

CU

Rotary

Solenoid

On Time
K5PV

T42

CD

First

Scan

SM0.1

If there are rings in the queue and the assembly hopper is

empty, initiate a 2 second timer to give a delay before

activating the rotary solenoid. This acts as a delay for

both the first ring in the queue to settle against the

index cam and for an assembled component to clear the

assembly area.

Ring
Assembly Dispense
Dispense

Queue
Area
Delay

Delay

Counter
Full

C48
K1
I0.0
T41
TON
T41
>= W / / IN

K20PT

When the 2 second dispense delay is complete, activate the

rotary solenoid for 0.5 seconds to dispense a ring into the

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

Set M0.1 when a metal peg is detected on the belt conveyor

so that the part will not be rejected.

Inductive
Metal Peg
Sensor
Present

I0.7
M0.1
K1

(
S
)

Bytronic International Ltd.

4.7.24

Industrial Control Trainer Manual

Siemens S7-200 Labwork 6

10

11

12

Set M0.2 when a plastic ring is detected by the capacitive

sensor to indicate that the component is a correctly

assembled part.

Capacitve
Ring
Sensor
Assembled

I0.6
M0.2
K1

(
S
)

When a component is detected at the reject area and the

component is not an assembled part (either a single plastic

ring or metal peg), activate the reject solenoid 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

/ / (
)

Ring

Reject

Assembled

Solenoid

On Time

M0.2

TON
T43

/
IN

Reject

Solenoid

K5PT

Q0.2

On the falling edge of the reject area sensor signal

(component leaving reject area), reset both the metal peg

present (M0.1) and ring assembled (M0.2) registers.

Reject
Metal Peg
Area
Present
Detect

I0.2
M0.1
K2

N (
R
)

( MEND )

Bytronic International Ltd.

4.7.25

Industrial Control Trainer Manual

Siemens S7-200 Labwork 7

Siemens S7-200 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 industrial. Having completed this labwork, you
will have achieved full control of the ICT system.

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.

Bytronic International Ltd.

4.7.26

Industrial Control Trainer Manual

Siemens S7-200 Labwork 7

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.

The data retrieved from the component passing the capacitive


sensor is loaded into the first element of shift register MW8. When
the component passes the I/R sensor at the capacitive area, both the
capacitive sensor pointer (MW6) and data (MW8) shift registers are
shifted left by 1 bit.

4.

The program logically 'AND's the inductive pointer register with


the inductive data register and also the capacitive pointer register
with the capacitive data register. From this result, a decision can be
made on whether to accept or reject the leading component when it
reaches the reject area.
M3.5 M3.4 M3.3 M3.2 M3.1 M3.0
Inductive Sensor
Pointer Register

MW2

M5.5 M5.4 M5.3 M5.2 M5.1 M5.0


Inductive Sensor
Data Register

Capacitive Sensor
Pointer Register
Capacitive Sensor
Data Register

Bytronic International Ltd.

MW4

M7.5 M7.4 M7.3 M7.2 M7.1 M7.0

MW6

M9.5 M9.4 M9.3 M9.2 M9.1 M9.0

4.7.27

MW8

Industrial Control Trainer Manual

Siemens S7-200 Labwork 7

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.

Figure 4.7.12. Ladder Diagram Solution for Labwork 7

Clear all the internal memory registers used and initialise

both the inductive and capacitive sensor pointer registers

on the first execution scan of the program.

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
)

Continuously activate both the chain and belt conveyors.

Always
Chain
On
Conveyor

SM0.0
Q0.3

(
)

Belt

Conveyor

Q0.4

(
)

Bytronic International Ltd.

4.7.28

Industrial Control Trainer Manual

Siemens S7-200 Labwork 7

Pulse M0.0 when a component is detected at the sort area.

This is necessary so that the component will not be

detected more than once.

Sort
Component
Area
At Sort
Detect
Area

I0.1
M0.0

P (
)

When a component is detected at the sort area and the

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 down the assembly chute.

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

been activated. Decrement the ring queue count when the

rotary solenoid has been activated. When the count value

equals the preset value (5), the counter contact will

energise and is then used to disable the sort solenoid. Note

that the counter value is reset on the first execution scan

of the program (SM0.1).

Sort
Ring
Solenoid

Queue
On Time

Counter

T40
CTUD
C48

CU

Rotary

Solenoid

On Time
K5PV

T42

CD

First

Scan

SM0.1

Bytronic International Ltd.

4.7.29

Industrial Control Trainer Manual

Siemens S7-200 Labwork 7

If there are rings in the queue and the assembly hopper is

empty, initiate a 2 second timer to give a delay before

activating the rotary solenoid. This acts as a delay for

both the first ring in the queue to settle against the

index cam and for an assembled component to clear the

assembly area.

Ring
Assembly Dispense
Dispense

Queue
Area
Delay

Delay

Counter
Full

C48
K1
I0.0
T41
TON
T41
>= W / / IN

K20PT

When the 2 second dispense delay is complete, activate the

rotary solenoid for 0.5 seconds to dispense a ring into the

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

Set the first element of the inductive sensor data register

when a metal peg is detected on the belt conveyor.

Inductive
Inductive
Sensor
Data Frst

Element

I0.7
M5.0
K1

(
S
)

Shift left by 1 bit both the inductive sensor pointer and

data registers when a component passes through the

thru-beam sensor ready for the next component.

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

Bytronic International Ltd.

4.7.30

Industrial Control Trainer Manual

Siemens S7-200 Labwork 7

10

11

12

13

Set the first element of the capacitive sensor data register

when a plastic ring is detected by the capacitive sensor.

Capacitve
Capacatve
Sensor
Data Frst

Element

I0.6
M9.0
K1

(
S
)

Shift left by 1 bit both the capacitive sensor pointer and

data registers when a component passes by the capacitive

area sensor ready for the next component.

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

Logically 'AND' the inductive pointer register with the

inductive data register and store the result in MW10.

Also, logically 'AND' the capacitive pointer register with

the capacitive data register and store the result in MW12.

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

If both the results of the 'AND' instructions are greater

then 0, energise M0.3 to indicate that the leading

component is a correctly assembled part.

Inductive
Capacitve
Assembled

AND
AND
Component

Result
Result

MW10
K1
MW12
K1
M0.3
>= W >= W (
)

Bytronic International Ltd.

4.7.31

Industrial Control Trainer Manual

Siemens S7-200 Labwork 7

14

15

16

When a component is detected at the reject area and the

component is not an assembled part (either a single plastic

ring or metal peg), activate the reject solenoid for 0.5

seconds to eject the component into the reject bin.

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

On the falling edge of the reject area sensor signal

(component leaving reject area), shift right by 1 bit both

the inductive sensor and capacitive sensor pointer

registers to point to the data for the next component.

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 )

Bytronic International Ltd.

4.7.32

Industrial Control Trainer Manual

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.

Bytronic International Ltd.

5.1

Industrial Control Trainer Manual

Switched Faults

No.

Fault

Effect

F1

Open circuit the -12v supply line.

F2

Open circuit the control signal to the


gate of MOSFET M1.
Open circuit the control line to the LED
display for the chain conveyor.
Short circuit the control line for the sort
solenoid to supply.
Switch an extra resistance in to the
analogue motor control.
Short circuit the control line for the chain
conveyor to supply.
Short circuit the base of TR1 to ground
Cross over the rotary and reject solenoid
control lines.

Analogue computer control of the belt


conveyor fails.
Disables the reject solenoid.

F3
F4
F5
F6
F7
F8
F9
F10
F11
F12
F13
F14
F15
F16

Open circuit the supply line to the infra


red emitter.
Open circuit the supply line to the
inductive sensor.
Open circuit the input signal from the
capacitive sensor.
Open circuit the collector line of the
metal peg IR sensor receiver.
Short circuit the base of TR8 to ground.
Short circuit the base of TR10 to the
supply line.
Open circuit the inductive sensor input
signal and short to ground.
Cross over the capacitive and assembly
area full input signals.

LED O/P3 does not illuminate.


Sort solenoid permanently on.
Halves the speed of the belt conveyor when
using 0-20mA, 0-5v or digital output control.
Chain conveyor permanently on.
Disables activation of the sort solenoid.
Reverses operation of the two solenoids. i.e.
Rotary solenoid activates when reject
solenoid should.
Through beam sensor input signal (I/P 5)
permanently on.
Inductive sensor input signal (I/P 7)
permanently on.
Disables the capacitive sensor (I/P 6).
Disables the metal peg detector on the chain
conveyor (I/P 4).
Disables the IR sensor at the reject area
(I/P 2).
Assembly area full input signal (I/P 0)
permanently on.
Inductive sensor input signal (I/P 7)
permanently on.
Reverses the operation of the two sensors.
i.e. Capacitive input signal (I/P 6) comes on
when the assembly area sensor detects a
ring in the hopper.

Figure 5.1. Switched Faults List and Effects.

Bytronic International Ltd.

5.2

Industrial Control Trainer Manual

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:

Bytronic International Ltd.

6.1

Industrial Control Trainer Interface Board

6.2

Output Driver Board full Circuit Diagram

6.3

Output Driver Board without Switched Faults

6.4

Signal Conditioning Board full Circuit Diagram

6.5

Signal Conditioning Board without Switched Faults

6.1

Industrial Control Trainer Manual

Circuit Diagrams

Bytronic International Ltd.

6.2

Industrial Control Trainer Manual

Circuit Diagrams

Bytronic International Ltd.

6.3

Industrial Control Trainer Manual

Circuit Diagrams

Bytronic International Ltd.

6.4

Industrial Control Trainer Manual

Circuit Diagrams

Bytronic International Ltd.

6.5

Industrial Control Trainer Manual

Circuit Diagrams

Bytronic International Ltd.

6.6

Industrial Control Trainer Manual

Circuit Diagrams

Bytronic International Ltd.

6.7

Industrial Control Trainer Manual

Checklist

Checklist
Fault

Checklist

Complete unit not


working

a) Check the power supply voltage.


b) Check the current limit setting of the power supply
(3 Amps required).
c) Check the main fuse on the ICT interface (3A quick
blow).
d) Check for correct power supply connection polarity. If
this is incorrect, the fuse on the ICT interface will have
blown.
e) Check the status of the emergency stop switch:
Red LED ON - Start
Red LED OFF - Stop
f) Check the status of the start / stop switch:
Green LED ON - Start
Red LED ON - Stop
a) Check the termination of the connections by referring
to the Getting Started section of this manual.
b) Check the status of the start / stop switch.
Green LED ON - Start
Red LED ON - Stop
a) Check the termination of the connections by referring
to the Getting Started section of this manual.
b) Check the 5V supply from the ICT interface board.
a) Check the status of the start / stop switch
b) Check connection of the analogue input by referring to
the Getting Started section of this manual.
c) Check the setting of the output driver board analogue
selector switch.
a) Check the status of the start / stop switch.
b) Check the setting of the output driver board analogue
selector switch.
c) Check the termination of the connections by referring
to the Getting Started section of this manual.
a) Check that the switched faults are in the OFF position.
b) Check the status of the start / stop switch.
c) Check the conveyor fuses (250mA anti-surge).
d) If fuses continue to blow, check that the conveyors are
not jammed or damaged.
a) Adjust the tension of the belt by evenly turning the two
tensioning screws.
b) Check the belt for obstructions.

Outputs only do not


work

Inputs only do not


work
Analogue motor
control faulty

Digital motor control


faulty

Either conveyors do
not work

Belt conveyor slipping

Bytronic International Ltd.

7.1

Industrial Control Trainer Manual

Checklist

Fault

Checklist

Correctly assembled
components are being
rejected

a) Reset the control program and retest. The error may


have been caused by a spurious signal upsetting the
program sequence.
b) Check the operation of the sensors by manually
passing a component along the belt conveyor and
observing the LED indicators on the signal conditioning
board.
c) Check the configuration of the sensors by referring to
Appendix 3.
a) Check the operation of the IR sensor at the assembly
area (I/P 0). If incorrect, adjust the sensing range using
VR6.
b) Check the control program. If using a PC, test using
the interactive program supplied.
a) Check the operation of the IR sensor that detects the
metal peg on the chain conveyor (I/P 4) by placing a
peg at the sorting area. Adjust the sensitivity of this
sensor by using VR5.
b) Pass a metal peg through the sorting area, the metal
peg sensor should come on before the sort area
sensor and should on for longer that the sort area
sensor. If not, adjust the ON time by using VR2.
a) Ensure that all the switched faults are in the OFF
position.
b) Check the current limit setting of the power supply (3A
is required).
a) Ensure that all the switched faults are in the OFF
position.
b) Check for a low ambient light level. If the sensors work
correctly when shaded either
(i) Move the unit to a shaded area
(ii) Adjust the sensitivity of the sensors.
a) Ensure that all the switched faults are in the OFF
position.
b) Adjust the sensitivity using VR1 so that with an
unbroken sensing beam, the LED is OFF. If this does
not occur, check the 5v supply line. If problems persist,
contact Bytronic.

Assembly hopper over


flowing

Metal Pegs are being


incorrectly ejected into
the assembly chute.

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.

Bytronic International Ltd.

7.2

Industrial Control Trainer Manual

The Gauging Head Module

The Gauging Head Module


The Bytronic Gauging Head Module has been designed as a simple
expansion unit to the Bytronic Industrial Control Trainer.
As metal pegs enter the gauging area they are detected by an inductive
sensor. A solenoid operated clamp momentarily holds the peg whilst its
external diameter is measured using a linear potentiometric displacement
transducer.
The PCB mounted at the rear of the Gauging Head Module brings
together all the necessary signals along a single connecting lead which is
simply connected to the host conveyor unit's interface board, thus
allowing easy connection to any microprocessor based controller.

Installing the Gauging Head


The Gauging Head Module can be easily installed onto the Bytronic
Industrial Control Trainer by following these simple steps:

Bytronic International Ltd.

1.

The existing sensors mounted on the adjustable rail of the belt


conveyor may need to be moved slightly towards the assembly
chute to provide sufficient space for the Gauging Head.

2.

Loosen the screws in the Gauging Head mounting bracket so that


the module can be slid onto the right hand end of the rail at the rear
of the belt conveyor. Secure the Gauging Head at the correct height
as shown in figure 8.1 by tightening the fixing screws.

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.

As there is no electrical calibration to be done, once installed the


unit is ready for use.

8.1

Industrial Control Trainer Manual

The Gauging Head Module

Adjust the height of


the Gauging Head
Module so that when
the V clamp clamps
the metal peg the
plastic ring does not
interfere.

Figure 8.1. Installing the Gauging Head Module.

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.

One digital input.


One digital output.
One analogue input with a range of 0-5V.

The ICT1 allows connection to virtually any PLC or PC containing a


Bytronic interface card. Please refer to the Getting Started section of this
manual for specific connection details.

Bytronic International Ltd.

8.2

Industrial Control Trainer Manual

The Gauging Head Electronics

Gauging Head Principles of Operation


The Gauging Head was specifically designed to measure the diameter of
the metal pegs travelling along the belt conveyor. This allows the metal
pegs to be either accepted / rejected or sorted on diameter size.
As the metal pegs enter the Gauging Head Module, its presence is
detected by an inductive sensor mounted over the gauging area. The
digital signal from the sensor is fed back to the microcontroller so that, if
required, the clamping solenoid can be activated. Attached to the
clamping solenoid is a 'V' shaped block which traps and automatically
centres the metal peg ready for measuring. Measuring is achieved through
the use of a linear potentiometric displacement transducer (LPDT) which
is attached to the 'V' block and provides a voltage reading proportional to
the distance travelled. In order to convert this analogue signal into
dimensions, the software must be calibrated as discussed later in this
section. To prevent the clamping solenoid from overheating, it is
controlled by a monostable output generated on the PCB, thus clamping
the peg for a short period of time.
The Gauging Head Module is supplied with a range of coded pegs in
0.5mm increments. There sizes are given in Appendix 4.

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

This analogue difference is then divided by the actual difference between


the two pegs (2.5mm) to find the value for 0.5mm increments, which in
this case is 103.6. This value can then be used to calculate the diameter of
the measured peg as follows:
Diameter = 30 + ((MinVal - Size) / 103.6)
Where:

Bytronic International Ltd.

MinVal is the analogue value of the smallest peg (1506).


Size is the analogue dimension of the measured peg.

8.3

Industrial Control Trainer Manual

The Gauging Head Electronics

The Gauging Head Electronics


The Gauging Head electronics are enclosed in the black plastic box at the
rear of the unit. The circuitry consists of three main elements, namely:
1.
2.
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.

The Linear Potentiometric Displacement Transducer


The linear potentiometric displacement transducer (LPDT) used on the
Gauging Head is commonly used for displacement measuring and as
feedback and control elements in servo systems.
The LPDT has a conductive plastic element which provides an electrical
signal directly proportional to a linear mechanical movement of the shaft.
There is no need for amplifiers, carrier systems or other complex
electronic circuitry, since the LPDT provides a full scale output equal to
the applied voltage, which in this case is 5V. The LPDT is shown in
figure 8.2 and its specifications in figure 8.3.

Figure 8.2. The Linear Potentiometric Displacement Transducer.

Bytronic International Ltd.

8.4

Industrial Control Trainer Manual

The Gauging Head Electronics

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

Figure 8.3. General Specifications of the LPDT.

Inductive Proximity Sensor


Inductive proximity sensors consist of three stages, namely oscillators,
trigger, and output amplifier, as shown in figure 8.4. 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)

Bytronic International Ltd.

8.5

NPN transistor
PNP transistor
NAMUR current output

Industrial Control Trainer Manual

The Gauging Head Electronics

Figure 8.4. Diagram of the Basic Principle of an Inductive Sensor.

Inductive sensors are compact and capable of operating in dirty


environments, even submersed in fluid. The key dimension of an
inductive sensor is its diameter. For example A 4mm diameter sensor has a range of 1mm but a 40mm diameter sensor
has a range of 20mm. This is due to the size of oscillator in the face of
the unit.
Other factors affecting the sensing range are the target material and the
sensing tip style. The optimum sensing distance is obtained with a steel
target. To determine the sensing distances for materials other than the
standard mild steel, multiply the sensing distance by the factor given
below:

Mild steel
Stainless steel
Brass
Aluminium
Copper

Bytronic International Ltd.

8.6

1
0.7 - 0.8
0.4 - 0.5
0.3 - 0.4
0.3 - 0.4

Industrial Control Trainer Manual

The Gauging Head Electronics

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

Figure 8.5. General Specifications of the Inductive Proximity Sensor.

* Sensing Distance : As we are detecting an aluminium peg, the range


should be multiplied by a factor of 0.3 to 0.4.

Clamp Solenoid Control


The control circuit is based around the commonly used 555 timer
configured in its monostable output mode. The output of the 555 timer is
used to switch the gate of a power MOSFET which, in turn, drives the
solenoid. This prevents the solenoid from overheating and damaging the
coil.
The monostable circuit is triggered by a low to high transition (rising
edge) of the microcontroller solenoid control bit. The output of the
monostable is then held high for 1 second, thus activating the solenoid,
before returning to its low state. Changes in state of the microcontroller
solenoid control bit have no effect while the monostable's output is high.
The clamp solenoid control circuit is shown with the Gauging Head full
circuit diagram in figure 8.6.

Bytronic International Ltd.

8.7

Industrial Control Trainer Manual

The Gauging Head Electronics

Bytronic International Ltd.

8.8

Industrial Control Trainer Manual

Gauging Head Labworks

Gauging Head Labworks


The following labworks are based around the Bytronic Gauging Head
Module being mounted on an Industrial Control Trainer. The labworks
are graded in complexity and leads to full system control of the ICT and
Gauging Head Module. The labworks are listed as follows:
Labwork
1
2
3
4
5

Title
Peg Detection and Measuring.
Gauging Head Calibration.
Analogue Dimension Conversion.
Peg Acception / Rejection.
Full System Control.

Solutions have been supplied on the accompanying disks located at the


rear of this manual and cover the following controllers.
PC Compatible (QBASIC)
Allen-Bradley SLC500.
Siemens S5-95U.

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.

Bytronic International Ltd.

9.1

Industrial Control Trainer Manual

Gauging Head Labwork 1

Gauging Head Labwork 1:


Peg Detection and Measuring
Objective
The objective of this labwork is to detect the presence of a metal peg
entering the gauging area, activate the clamping solenoid and record the
peek analogue dimension value.

Procedure
A flow diagram of the procedure can be found in figure 9.1 and follows
the basic steps shown below.
1.

Activate the belt conveyor.

2.

Use the gauging head area detect signal to detect the presence of a
metal peg.

3.

When a peg is detected, activate the clamping solenoid.

4.

While the clamping solenoid is active, read the analogue dimension


feedback signal from the LPDT and record this new value if it is
greater than the value previously recorded.

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

Bytronic International Ltd.

PC Compatibles (QBASIC)
Allen-Bradley SLC500
Siemens S5-95U

9.2

Industrial Control Trainer Manual

Gauging Head Labwork 1

Figure 9.1. Flow Diagram for Labwork 1.

START

Activate the belt


conveyor

Read the status of the


proximity sensor

No

Is the sensor
signal high?

Yes
Clear the peg size
record register

Initiate a 1.5 second


timer

Activate the Gauging


Head clamp solenoid

Read the analogue


dimension value

Bytronic International Ltd.

9.3

Industrial Control Trainer Manual

Gauging Head Labwork 1

3
1

No

Is new value
greater than
old?

Yes
Store now value in
record register

No

Has 1.5
second timer
elapsed

Yes

Bytronic International Ltd.

9.4

Industrial Control Trainer Manual

Gauging Head Labwork 2

Gauging Head Labwork 2 : Calibration


Objective
The objective of this labwork is to write a calibration routine that uses the
30mm diameter size peg and the 32.5mm diameter size peg to calculate a
calibration constant that eventually, will be used to determine the
diameter of the pegs.

Procedure
A flow diagram of the procedure can be found in figure 9.2 and follows
the basic steps shown below.
1.

Activate the belt conveyor.

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.

Activate the clamping solenoid when the peg is detected at the


gauging area and store the peek analogue dimension in a register
(R1).

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.

Activate the clamping solenoid when the peg is detected at the


gauging area and store the peek analogue dimension value in a
second register (R2).

6.

Calculate the calibration constant by using the formula shown


below and store the result in a third register (CALIBCONST).
CALIBCONST = (R1 - R2 ) / 2.5

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.

Bytronic International Ltd.

9.5

Industrial Control Trainer Manual

Gauging Head Labwork 2

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

Figure 9.2. Flow Diagram for Labwork 2.

START

Clear the record


registers to be used

Activate the belt


conveyor

Prompt user to place


the 30mm peg on the
belt conveyor

Read the status of the


proximity sensor

No

Is the sensor
signal high?

Yes
1

Bytronic International Ltd.

9.6

Industrial Control Trainer Manual

Gauging Head Labwork 2

Read the peak


analogue dimension as
done in labwork 1

Prompt user to place


the 32.5mm peg on
the belt conveyor

Read the status of the


proximity sensor

No

Is the sensor
signal high?

Yes
Read the peak
analogue dimension as
done in labwork 1

Calculate the calibration


constant

END

Bytronic International Ltd.

9.7

Industrial Control Trainer Manual

Gauging Head Labwork 3

Gauging Head Labwork 3:


Analogue Dimension Conversion
Objective
The objective of this labwork is to combine the routine developed in
labwork 1 with the routine developed in labwork 2 so that the analogue
dimension value obtained in labwork 1 can be converted to a dimension
in mm by using the constants obtained in labwork 2.

Procedure
A flow diagram of the procedure can be found in figure 9.3 and follows
the basic steps shown below.
1.

Execute the routine developed in labwork 2 to obtain the


calibration constants. Make sure that this routine is executed once
only at the start of the program.

2.

Execute the routine developed in labwork 1 to obtain the analogue


dimension value of the peg at the gauging area.

3.

Convert the analogue dimension value into millimetres by using the


calibration constants with the formula given below.
PegSize = 30 + (( 30mm Peg Size - Analogue Value) / CALIBCONST )

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.

Bytronic International Ltd.

9.8

Industrial Control Trainer Manual

Gauging Head Labwork 3

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

Figure 9.3. Flow Diagram for Labwork 3.

START

Clear the record


registers to be used

Execute the calibration


routine developed in
Labwork 2

Execute the component


measuring routine
developed in Labwork 1

Convert the reading to


MM using the formula
shown in the procedure

No

Exit?

Yes
END

Bytronic International Ltd.

9.9

Industrial Control Trainer Manual

Gauging Head Labwork 4

Gauging Head Labwork 4 : Peg Acception / Rejection


Objective
The objective of this labwork is to enhance the program developed in
labwork 3 to reject components which are outside of a given tolerance
band.

Procedure
A flow diagram of the procedure can be found in figure 9.4 and follows
the basic steps shown below.
1.

Execute the calibration routine on the first execution scan of the


program to obtain the calibration constants.

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

Bytronic International Ltd.

9.10

PC Compatibles (QBASIC)
Allen-Bradley SLC500
Siemens S5-95U

Industrial Control Trainer Manual

Gauging Head Labwork 4

Figure 9.4. Flow Diagram for Labwork 4.


START

Clear the record


registers to be used

Select the minimum and


maximum peg size
tolerance band

Execute the calibration


routine developed in
Labwork 2

Execute the component


measuring routine
developed in Labwork 1

Convert the reading to


MM using the routine
developed in Labwork 3

No

Is peg within
the tolerance
band?

Yes
Activate the reject
solenoid to eject the peg
into the reject bin

Allow the peg to pass


the reject area.
i.e. Accept.

Exit?

No

Yes
END

Bytronic International Ltd.

9.11

Industrial Control Trainer Manual

Gauging Head Labwork 5

Gauging Head Labwork 5 : Full System Control


Objective
The objective of this labwork is to combine the routine developed in ICT
labwork 7 with the routine developed in Gauging Head labwork 4 to
provide a program that can achieve full system control of both the ICT
and Gauging Head module.

Procedure
Combine the two routines so that:
1.

The calibration routine is executed once only at the start of the


program.

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.

As the components travel along the belt conveyor, their assembly


status is determined using the capacitive and inductive sensors.

7.

If a correctly assembled part enters the gauging area, activate the


clamping solenoid and record the components dimension.

8.

When a component is detected at the reject area, activate the reject


solenoid when one or more of the following conditions are met:
i
ii
iii

Bytronic International Ltd.

The component is an unassembled metal peg.


The component is an unassembled plastic ring.
The component is an assembled part but is outside the
acceptable peg diameter tolerance range.

9.12

Industrial Control Trainer Manual

Gauging Head Labwork 5

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

Bytronic International Ltd.

9.13

Allen-Bradley SLC500
Siemens S5-95U

Industrial Control Trainer Manual

Appendix 1 : PLC Wiring Record

Appendix 1 : PLC Wiring Record


Type of PLC :
Bus Units if Applicable :

Date :

Wired By :

Checked By :

PLC Terminal

Bytronic International Ltd.

Cable Specification

A1.1

ICT Terminal

Industrial Control Trainer Manual

Appendix 2 : Computer Header Functions

Appendix 2:
Computer Header Configuration

Bytronic International Ltd.

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

Gauging Head Dimension


Gauging Head Inductive Sensor
Signal Ground

Industrial Control Trainer Manual

Appendix 3 : ICT Standard Sensor Arrangement

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

IR Through Beam Sensor

Capacitive Sensor
Reject Solenoid

Figure A3.1. ICT Standard Sensor Arrangement.

Inductive Sensor Set Up Procedure


a)

Bytronic International Ltd.

Place a metal component in front of the inductive probe as shown


in figure A3.2 on the following page.

A3.1

Industrial Control Trainer Manual

Appendix 3 : ICT Standard Sensor Arrangement

Inductive Sensor

Adjust
Height

Keep Sensing
Distance < 5mm
Figure A3.2. Inductive Sensor Adjustment.

b)

Adjust the height of the inductive sensor by releasing the fixing


screws. Align the sensor as shown above.

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.

IR Through Beam Set Up Procedure


a)

Release the fixing screws.

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.

Infra Red Beam

Plastic Ring

Belt Conveyor

Adjust
Height

Figure A3.3. IR Through beam sensor adjustment.

Bytronic International Ltd.

A3.2

Industrial Control Trainer Manual

Appendix 3 : ICT Standard Sensor Arrangement

Capacitive Sensor Set Up Procedure


a)

Release the fixing screws.

b)

Place an assembled product on the belt conveyor in front of the


capacitive sensor.

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.

IR Reflective at Capacitive Area Set Up Procedure


a)

Place an assembled product in front of the capacitive sensor.

b)

Adjust the sensing range of the reflective sensor to detect the


assembly using VR3.

IR Reflective Sensor at Reject Area Set Up Procedure


a)

Bytronic International Ltd.

Place a component directly in line with the reject plunger.

Industrial Control Trainer Manual

Appendix 3 : ICT Standard Sensor Arrangement

b)

Bytronic International Ltd.

Adjust the range of the infra red reflective sensor to detect the
object by turning VR4.

Industrial Control Trainer Manual

Appendix 4: Aluminium Peg Size Code

Appendix 4:
Aluminium Peg Size Codes
Peg

Bytronic International Ltd.

Number of Rings

Diameter (mm)

1 Ring 2mm wide

30mm

1 Ring 1mm Wide

30.5mm

2 Rings 1mm Wide

31mm

3 Rings 1mm Wide

31.5mm

4 Rings 1mm Wide

32mm

5 Rings 1mm Wide

32.5mm

No Rings

33mm

A4.1

Industrial Control Trainer Manual

You might also like