beautypg.com

Hitachi NJI-350B User Manual

Page 108

background image

Chapter 5 Instruction Specifications

5-58

Item number

Arithmetic instructions-13

Name

Logical AND

Ladder format

Condition code

Processing time (

µs)

Remark

R7F4

R7F3

R7F2

R7F1

R7F0

Average Maximum

d = s1 AND s2

DER

ERR

SD

V

C

46

Upper case: B

z

z

z

z

z

Middle case: W

Instruction format

Number of steps

36

Lower case: DW

Condition

Steps

d = s1 AND s2

Bit, word

4

49

Double word

6

Bit

Word

Double word

Usable I/O

X

Y

R,

M

TD, SS,

CU, CT

WX WY

WR,

WM TC DX DY

DR,

DM

C

onstant

Other

d

Substitution destination

{

{

{

{

{

{

{

s1 Comparand

{

{

{

{

{

{

{

{

{

{

{

s2 Relational number

{

{

{

{

{

{

{

{

{

{

{

Function

• Obtains AND of s1 and s2, and substitutes the result into d.

s1

s2

d

0

0

0

0

1

0

1

0

0

1

1

1

Notes

• The combinations of d, s1 and s2 are as follows:

d

s1

s2

Bit

Bit

Bit

Word

Word

Word

Double word

Double word

Double word

Program example

WR0102 = WR0100 AND WR0101

X00111

DIF111

LD X00111
AND DIF111
[
WR0102=WR0100 AND WR0101
]

Program description

• At the leading edge of X00111, the AND of WR0100 and WR0101 is set in WR0102.

WR0100 = H1234
WR0101 = H5678
WR0102 = H1230

WR0100 = 0001001000110100
WR0101 = 0101011001111000
WR0102 = 0001001000110000

When

d

=

s1
AN
D

s2