plc bsl bottling
DESCRIPTION
plc aTRANSCRIPT
Programmable Logic controller 1
Programmable Logic Controllers
Bit Shifts (BSL) in PLCs
Sensors are provided to detect the presence of a new bottle, the bottle size, and whether the bottle is fully intact.
Essentially 3 Boolean states describing the properties of each bottle that enters the line.
A single BSL instruction can be used to track a single Boolean state (0 or 1) which in-turn can describe a unique property of a product.
2
Bit Shifts (BSL) in PLCs In the initial exercise we will
track the 3 Boolean values describing each bottle entering our process line.
The Boolean states will be referred to as "Exists", "Large", and "Broken"
and these states are to be tracked, utilizing 3 separate BSL (bit shift left) instructions.
3
Bit Shifts (BSL) in PLCs Tracking the bottles When the process is running,
the main conveyor should be energized, and bottles should continuously enter and exit the line.
Utilizing LS1 (Exists), we will strobe 3 BSL instructions to shift 3 separate bit arrays consisting of two 16 bit words each.
We will use files #B3:2, #B3:4, and #B3:6 for this purpose.
4
Bit Shifts (BSL) in PLCs
5
Bit Shifts (BSL) in PLCs
6
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
#B3:2
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
#B3:3
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
#B3:4
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
#B3:5
Files: Bit Array
Bit Shifts (BSL) in PLCs On each false-to-true
transition, this output instruction loads a bit of data into a
bit array, shifts the pattern of
data through the array to the left, and
unloads the end bit of data.
Programmable Logic controller 7
Bit Shifts (BSL) in PLCs File is the address of the
bit array you want to shift. You must use the file
indicator (#) in the bit array address.
Programmable Logic controller 8
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #B3:2
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #B3:3
Bit Shifts (BSL) in PLCs Control is the unique
address of the control structure (48 bits, 3 16-bit words) in the control area of memory that stores the
instruction’s status bits, the size of the array (in
number of bits), and the bit pointer (currently
not used).
Programmable Logic controller 9
Bit Shifts (BSL) in PLCs Control is the unique address of the control structure
(48 bits, 3 16-bit words) in the control area of memory that stores the
Programmable Logic controller 10
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 EN DN ER UL Word 0
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Size of bit array (number of bits) Word 1
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Bit Pointer (currently not used) Word 2
Bit Shifts (BSL) in PLCs Control is the unique address of the control structure
(48 bits, 3 16-bit words) in the control area of memory that stores the
Programmable Logic controller 11
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 EN DN ER UL Word 0
Unload Bit
Error Bit
Done Bit
Enable Bit
Bit Shifts (BSL) in PLCs Bit Address is the
location of the bit which will be added to the array.
Length is the total number of bits to be shifted by the BSL. Bits located to the left of the last bit in the array, up to the next word boundary cannot be used.
Programmable Logic controller 12
Bit Shifts (BSL) in PLCs Imagine an ice-cream cone machine. We have 4 steps.
First we verify the cone is not broken. Next we put ice cream inside the cone.(turn on output 1) Next we add peanuts.(turn on output 2), and Finally we add sprinkles.(turn on output 3)
13
Inspection
Conveyor
Bit Shifts (BSL) in PLCs If the cone is broken we obviously don't want to add ice
cream and the other items. Therefore we have to track the bad cone down our process line so that we can tell the machine not to add each item.
We use a Optical Sensor to look at the bottom of the cone. (input I:0.0/0) If its on then the cone is perfect and if its off then the cone is broken.
An encoder tracks the cone going down the conveyor. (input I:0.0/1). It generate pulse at station locations.
Implement using BSL
14
Bit Shifts (BSL) in PLCs
15
Inspection
Conveyor
I:0.0/0 O:0.0/0 O:0.0/1 O:0.0/2
I:0.0/1
Bit Shifts (BSL) in PLCs
16
Bit Shifts (BSL) in PLCs Case 1:
A good cone comes in front of the sensor (input I:0.0/0). The sensor (data input) turns on. Encoder generates a pulse and the status of the data input (cone
sensor input I:0.0/0) is transferred to bit B3:2/0. The register now looks like:
17
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 #B3:2
Bit Shifts (BSL) in PLCs Case 2:
As the conveying system moves on, another cone comes in front of the sensor.
This time it's a broken cone and the sensor remains off. Now the encoder generates another pulse. The old status of bit
B3:2/0 is transferred to bit B3:2/1. The old status of B3:2/1 shifts to B3:2/2. The old status of B3:2/2 shifts to B3:2/3 and so on.
The new status of the data input (cone sensor) is transferred to bit B3:2/0.
The register now looks like:
18
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 #B3:2
Bit Shifts (BSL) in PLCs Since the register shows that B3:2/1 is now 1, the ladder says that
output O:0.0/0 will turn on and ice cream is put in the cone.
19
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 #B3:2
Inspection
Conveyor
I:0.0/0 O:0.0/0 O:0.0/1 O:0.0/2
I:0.0/1
Bit Shifts (BSL) in PLCs As conveyor moves, the register shows that B3:2/1 is now 0, the
ladder says that output O:0.0/0 will turn Off and ice cream will not be dispensed. B3:2/2 is now 1, Peanut dispensed.
20
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 #B3:2
Inspection
Conveyor
I:0.0/0 O:0.0/0 O:0.0/1 O:0.0/2
I:0.0/1
Bit Shifts (BSL) in PLCs As conveyor moves, the register shows that B3:2/1 is now 1, the
ladder says that output O:0.0/0 will turn ON and ice cream will be dispensed. B3:2/2 is now 0, Peanut not dispensed. B3:2/3 is 1.
21
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 #B3:2
Inspection
Conveyor
I:0.0/0 O:0.0/0 O:0.0/1 O:0.0/2
I:0.0/1
Bit Shifts (BSL) in PLCs
22
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1 #B3:2
Inspection
Conveyor
I:0.0/0 O:0.0/0 O:0.0/1 O:0.0/2
I:0.0/1
Bit Shifts (BSL) in PLCs
The shift registers BSL and BSR are most commonly used in conveyor systems, labeling or bottling applications, etc.
Programmable Logic controller 23