Rockwell Automation 1761-HHP-B30 MicroLogix 1000 with Hand-Held Programmer (HHP) User Manual

Page 493

Advertising
background image

Appendix E
Application Example Programs

E–50

Spray Booth Operation Overview

An overhead conveyor with part carriers (hooks) carries parts from a
previous operation to the spray booth. Before the part enters the spray booth,
two items are checked on the conveyor. The first check is for part presence
and the second check is for the needed color. This information is stored and
accessed later when the part carrier is in the paint spraying area. A proximity
switch is used to check for the presence of a part on the carrier and a barcode
reader is used to determine color choice. When the part carrier reaches the
spraying area, the previously stored information is accessed. If there is a part
on the carrier, it is painted according to its bar code and if the carrier is free,
paint is not dispensed.

The bit shift and FIFO instructions store the part presence and color
information before each carrier enters the spray booth. Both of these
instructions place data into their data structures every time a part carrier
actuates the shift limit switch.

If the proximity switch senses a part on the carrier, a 1 is shifted into the shift
register. If the carrier is free as it passes the shift limit switch, a 0 is shifted
into the shift register. The shift register tracks the part carriers approaching
the spraying area.

The FIFO does the same type of shifting, except rather than shifting one bit
at a time, the FIFO shifts an entire word at a time. Just before the part carrier
actuates the SHIFT limit switch, the barcode reader reads the barcode on the
part to determine what color the part should be painted. The barcode reader
has three outputs that it sets according to what color the part should be.
These outputs are:

wired to the controller as inputs I/2, I/3, and I/4

combined together to form an integer which is decoded later in the
program

This integer is then shifted into the FIFO when the carrier actuates the
SHIFT limit switch.

Once the presence and color data is loaded into the shift register and FIFO,
they are shifted to new memory locations each time another part carrier
actuates the SHIFT limit switch. After three additional shifts, the first part
carrier is in front of the spray guns, ready for its part to be painted. At this
point the part presence data has been shifted into B/3 and the color data has
been shifted into N0. The program now checks B/3 – if there is a “1” in this
location, then there is a part hanging on the part carrier and the SPRAY
ENABLE output is energized. The program also checks N0 to determine
which color to paint the part. As the program is checking the shift register
for the presence of a part at the spray guns, it is also decoding the color
information at N0 and energizing the appropriate spray guns. Since we are
only using three colors, the only valid color codes are 1, 2, and 3. If any
other number is in N0 when a part is ready to be painted, the color defaults to
BLUE.

Since our program accesses the data while it is still in the two data structures,
after the part has been painted, the presence and color information for that
part is shifted out of the data structures and lost.

Advertising