beautypg.com

Entering parameters, Using arithmetic status bits, Operation – Rockwell Automation 1747-PT1, D1747NP002 Hand-Held Terminal User Manual

Page 304

background image

Chapter 21
Move and Logical Instructions

21–4

Entering Parameters

Source – the address of the data you want to move.

Mask – the address of the mask word through which the instruction
moves data. You can also enter a hex value (constant). Refer to appendix
B for more information regarding masks and hexadecimal numbering.

Destination – the address where the instruction moves the data.

Using Arithmetic Status Bits

C always reset

V always reset

Z set if the result is zero; otherwise reset

S set if the result is negative; otherwise reset

Operation

When the rung containing this instruction is true, data at the source address
passes through the mask to the destination address.

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

B3:2 before move

0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1

source B3:0

1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0

Mask F0F0

0 1 0 1 1 1 1 1 0 1 0 1 1 1 1 1

B3:2 after move

MVM

MASKED MOVE
Source

B3:0

0101010101010101

Mask

F0F0

Dest

B3:2

1111111111111111

unaltered

unaltered

Mask (do not pass) data by resetting bits in the mask; pass data by setting
bits in the mask. The instruction does not operate unless you set mask bits to
pass data you want to use. The bits of the mask can be fixed by a constant
value, or you can vary them by assigning the mask a direct address. Bits in
the destination that correspond to 0s in the mask are not altered.