Toshiba 6F3B0250, PROSEC T1 T1S user manual Minimum value

Models: PROSEC T1 T1S 6F3B0250

1 313
Download 313 pages 21.99 Kb
Page 247
Image 247

6F3B0250

7. Instructions

FUN 163

MIN

Minimum value

Expression

Input -[ A MIN (n) B ]- Output

T1S only

Function

When the input is ON, this instruction searches for the minimum value from the table of size n words starting with A, and stores the minimum value in B and the pointer indicating the position of the minimum value in B+1. The allowable range of the table size n is 1 to 64.

Execution condition

Input

 

Operation

Output

OFF

No execution

 

OFF

ON

Execution

 

ON

Operand

 

Name

 

 

Device

 

 

 

 

 

 

Register

 

 

 

 

Constant

Index

 

 

X

Y

R

S

T.

C.

XW

YW

RW

SW

T

C

D

I

J

K

 

 

A

Start of table

 

 

 

 

 

 

Ö

Ö

Ö

Ö

Ö

Ö

Ö

 

 

 

 

 

n

Table size

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1 - 64

 

B

Result

 

 

 

 

 

 

 

Ö

Ö

Ö

Ö

Ö

Ö

Ö

Ö

Ö

 

 

Example

When R011 is ON, the minimum value is found from the register table D0200 to D0209 (10 words), and the minimum value is stored in D0510 and the pointer is stored in D0511.

D0200

D0201

D0202

D0203

D0204

D0205

D0206

D0207

D0208

D0209

100

10000

-1000

10

0

200

-300

20000

-30

20

Pointer

0

1

2

3

4

5

6

7

8

9

D0510

D0511

-1000

2

(Minimum value) (Pointer)

Note

·This instruction deals with the data as signed integer (-32768 to 32767).

·If there are two or more minimum value in the table, the lowest pointer is stored.

·If Index register K is used as operand B, the pointer data is discarded.

Basic Hardware and Function 245

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Page 247
Image 247
Toshiba 6F3B0250, PROSEC T1 T1S user manual Minimum value