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

Page 456

Advertising
background image

Appendix E
Application Example Programs

E–13

Rung 7:6
When the number of 1/4 in. increments surpasses 1000, finds out now many
increments are past 1000 and stores in N7:20. Adds 1 to the total of
’1000 1/4 in.’ increments and re-initializes the 1/4 in. increments
accumulator to how many increments were beyond 1000.

| 1/4 in. |
| increments |
| |
| +GEQ–––––––––––––––+ +SUB–––––––––––––––+ |
|–+GRTR THAN OR EQUAL+–––––––––––––––––––––––+–+SUBTRACT +–+–|
| |Source A N7:10| | |Source A N7:10| | |
| | 0| | | 0| | |
| |Source B 1000| | |Source B 1000| | |
| | | | | | | |
| +––––––––––––––––––+ | |Dest N7:20| | |
| | | 0| | |
| | +––––––––––––––––––+ | |
| | 1/4 in. | |
| | Thousands | |
| | +ADD–––––––––––––––+ | |
| +–+ADD +–+ |
| | |Source A 1| | |
| | | | | |
| | |Source B N7:11| | |
| | | 0| | |
| | |Dest N7:11| | |
| | | 0| | |
| | +––––––––––––––––––+ | |
| | 1/4 in. | |
| | increments | |
| | | |
| | +MOV–––––––––––––––+ | |
| +–+MOVE +–+ |
| |Source N7:20| |
| | 0| |
| |Dest N7:10| |
| | 0| |
| +––––––––––––––––––+ |

Rung 7:7
| |
|–––––––––––––––––––––––––––––––––––––+END+–––––––––––––––––––––––––––|
| |

Advertising