Pick and place machine ladder program – Rockwell Automation 1761-HHP-B30 MicroLogix 1000 with Hand-Held Programmer (HHP) User Manual

Page 478

Advertising
background image

Appendix E
Application Example Programs

E–35

Pick and Place Machine Ladder Program

Rung 2:0
The following three rungs take information from the other programmable
controller and load it into the INDEX REGISTER. This is used to select
the proper bin location from the table starting at N7:10.
| Output | |
| from | |
| barcode | Index Reg |
| I:0 S:24 |
|––––] [––––––––––––––––––––––––––––––––––––––––––––––––––––––( )–––––|
| 5 0 |

Rung 2:1
| Output | |
| from | |
| barcode | Index Reg |
| I:0 S:24 |
|––––] [––––––––––––––––––––––––––––––––––––––––––––––––––––––( )–––––|
| 6 1 |

Rung 2:2
| Output | |
| from | |
| barcode | Index Reg |
| I:0 S:24 |
|––––] [––––––––––––––––––––––––––––––––––––––––––––––––––––––( )–––––|
| 7 2 |

Rung 2:3
Indexes into the table of bin locations and places the correct number of
encoder counts into the high preset of the high-speed counter.
| +MOV–––––––––––––––+ |
|––––––––––––––––––––––––––––––––––––––––––––––––+MOVE +–|
| |Source #N7:10| |
| | 100| |
| |Dest N7:2| |
| | 100| |
| +––––––––––––––––––+ |

Rung 2:4
Loads the high-speed counter with the following parameters:
N7:0 – 0001h – Output Mask – high-speed counter control only O:0/0

(gripper)

N7:1 – 0000h – Output Pattern for High Preset – turn OFF gripper (release

part)

N7:2 – 100d – High Preset – loaded from table in the rung above
N7:3 – 0001h – Output Pattern for Low Preset – turn ON gripper (grab part)
N7:4 – 0d – Low Preset – home position when encoder triggers Z-reset
| Home |
| Position |
| Reached |
| C5:0 +HSL–––––––––––––––+ |
|–+––––] [–––––+–––––––––––––––––––––––––––––––––+HSC LOAD +–|
| | LP | |Counter C5:0| |
| | | |Source N7:0| |
| | | |Length 5| |
| | | +––––––––––––––––––+ |
| | First Pass | |
| | Bit | |
| | S:1 | |
| +––––] [–––––+ |
| 15 |

Rung 2:5
Starts up the high-speed counter with the above parameters. Each time
this rung is evaluated, the hardware accumulator is written to C5:0.ACC.
| +HSC––––––––––––––––––––+ |
|––––––––––––––––––––––––––––––––––––––+HIGH SPEED COUNTER +–(CU)–|
| |Type Encoder (Res,Hld)+–(CD) |
| |Counter C5:0+–(DN) |
| |Preset 100| |
| |Accum –2| |
| +–––––––––––––––––––––––+ |

Advertising