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

Page 214

Advertising
background image

Chapter 11
Using Data Handling Instructions

11–31

To demonstrate the use of data handling instructions, this section provides
ladder rungs, followed by the optimized instruction list for these rungs. The
rungs are part of the paper drilling machine application example described in
appendix E. You will be adding to the subroutine in file 7 that was started in
chapter 9.

Ladder Rungs

Rung 7:2

Moves the single-digit BCD thumbwheel value into an internal integer
register. This is done to properly align the four BCD input signals prior
to executing the BCD to Integer instruction (FRD). The thumbwheel is used
to allow the operator to enter the thickness of the paper that is to be
drilled. The thickness is entered in 1/4 in. increments. This provides a
range of 1/4 in. to 2.25 in.

| BCD bit 0 |FRD bit 0 |
| I:0 N7:14 |
|–––––––––––––––––––––––––––––––––––––––––––+––––] [––––––––( )–––––+–|
| | 11 0 | |
| | BCD bit 1 |FRD bit 1 | |
| | I:0 N7:14 | |
| +––––] [––––––––( )–––––+ |
| | 12 1 | |
| | BCD bit 2 |FRD bit 2 | |
| | I:0 N7:14 | |
| +––––] [––––––––( )–––––+ |
| | 13 2 | |
| | BCD bit 3 |FRD bit 3 | |
| | I:0 N7:14 | |
| +––––] [––––––––( )–––––+ |
| 14 3 |

Rung 7:3
Converts the BCD thumbwheel value from BCD to integer. This is done
because the controller operates upon integer values. This rung also
”debounces” the thumbwheel to ensure that the conversion only occurs on
valid BCD values. Note that invalid BCD values can occur while the
operator is changing the BCD thumbwheel. This is due to input filter
propagation delay differences between the four input circuits that provide
the BCD input value.

| 1’st previous debounced |
| pass scan’s BCD value |
| bit BCD input |
| value |
| S:1 +EQU–––––––––––––––+ +FRD–––––––––––––––+ |
|–+––]/[–––––––+EQUAL +–+–––––––+FROM BCD +–+––+–|
| | 15 |Source A N7:13| | |Source N7:14| | | |
| | | 0| | | 0000| | | |
| | |Source B N7:14| | |Dest N7:12| | | |
| | | 0| | | 0| | | |
| | +––––––––––––––––––+ | +––––––––––––––––––+ | | |
| | | Math Math | | |
| | | Overflow Error | | |
| | | Bit Bit | | |
| | | S:0 S:5 | | |
| | +––––] [–––––––––(U)–––––––––+ | |
| | 1 0 | |
| | this | |
| | scan’s | |
| | BCD input | |
| | value | |
| | +MOV–––––––––––––––+ | |
| +––––––––––––––––––––––––––––––––––––––––––––+MOVE +–+ |
| |Source N7:14| |
| | 0| |
| |Dest N7:13| |
| | 0| |
| +––––––––––––––––––+ |

➀ This rung accesses I/O only available with 32 I/O controllers. Therefore, do not include this rung if you are

using a 16 I/O controller.

Data Handling Instructions in
the Paper Drilling Machine
Application Example

Advertising