UNIT (d, s, n)

Chapter 5 Instruction Specifications

Item number

 

Application instructions-24

 

 

Name

 

Unit

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Ladder format

 

 

 

 

 

 

Condition code

 

 

 

 

Processing time (s)

Remark

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

R7F4

 

R7F3

 

R7F2

R7F1

 

R7F0

Average

Maximum

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

UNIT (d, s, n)

 

 

DER

 

ERR

 

SD

 

V

 

 

 

C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

z

 

 

z

 

z

 

 

 

z

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Instruction format

 

 

 

 

 

 

Number of steps

 

 

 

 

As per the table

 

 

 

 

 

 

 

 

 

Condition

 

 

 

Steps

 

 

below.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

UNIT (d, s, n)

 

 

 

 

 

 

 

 

 

 

 

 

 

4

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Bit

 

 

 

 

 

 

 

Word

 

Double word

Constant

 

 

 

Usable I/O

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Other

 

X

 

Y

M

 

 

CU, CT

 

WX

WY

WM

 

TC

DX

DY

DM

 

 

 

 

 

 

 

 

 

R,

 

 

TD, SS,

 

 

 

 

WR,

 

 

 

 

DR,

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

d

Unity result write

 

 

 

 

 

 

 

 

 

 

{

 

{

 

 

 

 

 

 

 

 

destination I/O

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

s

Unity destination head I/O

 

 

 

 

 

 

 

 

 

 

 

 

 

{

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

n

Numbers of words to be

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

{

 

n=0 to 4

united

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Function

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

• Sets the values in the lower four bits of each of the n (1 to 4) words starting from s to the lower four bits of each word in d.

• If n is 1 to 3, the bits not set in d will be “0.”

• The data stored in s to s + n – 1 will be retained even if UNIT is executed.

• Use this instruction so that s + n - 1 does not exceed the I/O range (WRFFF and WM3FF). If it exceeds the I/O range, DER is equal to '1' and the lower four bits within the range between s and I/O will be set in d.

 

 

 

 

 

 

 

Upper digits

When n=4

 

 

 

 

d

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

B4

 

 

 

 

4 bits

 

 

 

 

s

 

 

 

 

 

 

 

 

 

 

 

 

B1

 

 

 

 

s+1

 

 

 

 

 

 

 

 

 

 

 

B2

 

 

 

 

 

 

 

 

 

 

 

 

s+2

 

 

 

 

 

 

 

 

 

 

 

B3

 

 

 

 

 

 

 

 

 

 

 

 

s+3

 

 

 

 

 

 

 

 

 

 

 

B4

 

 

 

 

 

 

Ignored

 

 

 

 

B3

B2

Lower digits

When n is 1 : B2 to B4 of d are 0

B1 When n is 2 : B3 to B4 of d are 0 When n is 3 : B4 of d is 0

Notes

When n=0, it is not executed.

When n>5, it is not executed.

n

Processing time (s)

Average

Maximum

 

0

75

1

100

2

103

3

106

4

109

5-96

Page 146
Image 146
Hitachi NJI-350B Application instructions-24, Unity result write Destination I/O, Numbers of words to be =0 to United