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

Page 213

Advertising
background image

Chapter 11
Using Data Handling Instructions

11–30

P 0 0 0

L F L

S R C

N 1 0

0

P 0 0 0

L F L

L I F O

# N 1 2

0

P 0 0 0

L F L

R 0 0

L

3 4

P

9

P 0 0 0

L F U

L I F O

# N 1 2

0

P 0 0 0

L F U

D E S T

N 1 1

0

P 0 0 0

L F U

R 0 0

L

3 4

P

9

LFL Instruction

When rung conditions change from false-to-true, the controller sets the LFL
enable bit (EN). This loads the contents of the Source, N10, into the stack
element indicated by the position number, 9. The position value then
increments.

The LFL instruction loads an element at each false-to-true transition of the
rung, until the stack is filled (34 elements). The controller sets the done bit
(DN), inhibiting further loading.

LFU Instruction

When rung conditions change from false-to-true, the controller sets the LFU
enable bit (EU). This unloads data from the last element loaded into the
stack (at the position value minus 1), placing it in the Destination, N11. The
position value then decrements.

The LFU instruction unloads one element at each false-to-true transition of
the rung, until the stack is empty. The controller then sets the empty bit
(EM).

LFL instruction loads data

into stack #N12 at the next

available position, 9 in this

case.

LFU instruction unloads

data from stack #N12 at

position 8.

N12

0

N13

1

N14

2

3

4

5

6

7

8

9

33

34 words are
allocated for LIFO
stack starting at
N12, ending at N45.

LFL–LFU Instruction Pair

Loading and Unloading of Stack #N12

N10

N11

Position

Destination

Source

N45

N15

N16

N17

N18

N19

N20

N21

Advertising