beautypg.com

Or (or), Using arithmetic status bits – Rockwell Automation 1747-PT1, D1747NP002 Hand-Held Terminal User Manual

Page 306

background image

Chapter 21
Move and Logical Instructions

21–6

Or

OR

Output Instruction

OR

BITWISE INCLUS OR
Source A

B3:0

0001010110100001

Source B

B3:1

0010000000100101

Dest

B3:2

0011010110100101

(OR)

F1

F2

F3

F4

F5

ZOOM on OR –(OR)– 2.3.0.0.2
NAME: BITWISE INCLUSIVE OR
SOURCE A: B3:0 0001 0101 1010 0001
SOURCE B: B3:1 0010 0000 0010 0101
DEST: B3:2 0011 0101 1010 0101

EDT_DAT

HHT Ladder Display:

HHT Zoom Display:

Ladder Diagrams and APS Displays:

(online monitor mode)

The value at source A is ORed bit by bit with the value at source B and then
stored in the destination.

Truth Table:

R = A OR B

A B R

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

A: Source A bit
B: Source B bit
R: Destination bit

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 (most significant bit is set); otherwise reset

Or (OR)