Hitachi NJI-350B User Manual

Page 60

Advertising
background image

Chapter 5 Instruction Specifications

5-10

R7F

4

R7F

3

R7F

2

R7F

1

R7F

0

Process

time

(

µ s)

C

la

ssi

fica

tio

n

It

em

num

ber

Ladder symbol

In

str

ucti

on

sy

m

bol Instruction

name

Process descriptions

I/O types used

DER ERR SD

V

C

MICRO-EH

S

teps Remarks

Co

nv

er

si

on 18 BCD(d, s)

Binary

BCD
conversion

Converts the value of s into
BCD and stores it in I/O
number d. If the value of s
is an error, DER (R 7F4) =
1 is set.

[Word]
d: WY, WR, WM
s: WX, WY, WR,
WM, TC,
Constant

↕ z z z z

79

89

3

4

Upper
case: W
Lower
case: DW

19 BIN(d, s)

BCD

Binary
conversion

Converts the value of s into
binary and stores it in I/O
number d. If the value of s
is an error, DER (R 7F4) =
1 is set.

[Double word]
d: DY, DR, DM
s: DX, DY, DR,
DM, Constant

↕ z z z z

49

75

3

4

Upper
case: W
Lower
case: DW

20 DECO(d, s, n)

Decode

Decodes the value indicated
by the least significant n
bits of s, and sets the bit
that corresponds to the
decoding result of the bit
row starting from I/O
number d, to 1.

d: R, M
s: WX, WY, WR,
WM, TC,
Constant
n: Constant(1-8)

↕ z z z z

105

4 *3

21 ENCO(d, s, n)

Encode

Encodes the bit location in
which 1 is set within the bit
row, which starts with I/O
number s and lasts for the
amount of nth power of 2,
and stores it in I/O number
d. If multiple bits that
contain 1 exist, the one
with the upper bit locations
will be encoded.

d: WY, WR, WM
s: R, M
n: Constant(1-8)

↕ z z z ↕

128

4 *3

*3:

Processing time when n=1.

R7F

4

R7F

3

R7F

2

R7F

1

R7F

0

Process

time

(

µ s)

C

la

ssi

fica

tio

n

It

em

num

ber

Ladder symbol

In

str

ucti

on

sy

m

bol Instruction

name

Process descriptions

I/O types used

DER ERR SD

V

C

MICRO-EH

S

teps Remarks

22 BCU(d, s)

Bit count

Among the contents of s
(word, double-word), stores
the number of bits that are
set to 1 in I/O number d.

[Word]
d: WY, WR, WM
s: WX, WY, WR,
WM, TC,
Constant

z z z z z

33

3

Upper
case: W

[Double word]
d: WY, WR, WM
s: DX, DY, DR,
DM, Constant

42

4

Lower
case: DW

A

ppl

icatio

n ins

tru

ctio

n

23 SWAP(d)

Swap

Swaps the upper 8 bits and
the lower 8 bits of the value
(word) for I/O number d.

d: WY, WR, WM z z z z z

25

2

24 UNIT(d, s, n)

Unit

Stores the lower 4 bit
values of the n words
starting with s in the lower
4 bits each of d (word).

d: WY, WR, WM
s: WR, WM
n: Constant(0-4)

↕ z z z z

100

4

*4

25 DIST(d, s, n)

Distribute

Extracts the value of s
(word) in 4 bit units from
the least significant bits,
and sets them in the lower 4
bits of each word starting
with I/O number d (word).
The upper bits are set to 0.

d: WR, WM
s: WX, WY, WR,
WM, TC,
Constant
n: Constant(0-4)

↕ z z z z

87

4

*4

*4:

Processing time when n = 1

Advertising