beautypg.com

Rockwell Automation 1761 MicroLogix 1000 Programmable Controllers User Manual

Page 147

background image

Using Math Instructions

8–15

Rung 7:6
When the number of 1/4 in. increments surpasses 1000, finds out how
many increments are past 1000 and stores in N7:20. Add 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+–––––––––––––––––––––––––––|
| |