beautypg.com

Preface, Spray booth ladder program – Rockwell Automation 1761 MicroLogix 1000 Programmable Controllers User Manual

Page 388

background image

Preface

MicroLogix 1000 Programmable Controllers User Manual

E–38

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 B3/3 and the color data has been shifted into N7:0. The program now
checks B3/3 – if there is a “1” in this location, that means that there is a part hanging
on the part carrier and the SPRAY ENABLE output is energized. The program also
checks N7:0 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 N7:0 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 N7:0 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.

Spray Booth Ladder Program

Rung 2:0
These three rungs read the color information coming from the barcode
decoder outputs and load this into integer N7:4. This color is loaded
into the FIFO when the part carrier actuates the SHIFT LIMIT SWITCH.

| Low Bit | Color |
| from Bar | Select |
| Code | Word |
| Decoder | |
| I:0 N7:4 |
|––––] [–––––––––––––––––––––––––––––––––––––––––––––––––––––( )––––––|
| 2 0 |

Rung 2:1

| Middle Bit | Color |
| from Bar | Select |
| Code | Word |
| Decoder | |
| I:0 N7:4 |
|––––] [–––––––––––––––––––––––––––––––––––––––––––––––––––––( )––––––|
| 3 1 |

Rung 2:2

| High Bit | Color |
| from Bar | Select |
| Code | Word |
| Decoder | |
| I:0 N7:4 |
|––––] [––––––––––––––––––––––––––––––––––––––––––––––––––––––( )–––––|
| 4 2 |