Toshiba PROSEC T1 User Manual page 246

Programmable controller
Hide thumbs Also See for PROSEC T1:
Table of Contents

Advertisement

7. Instructions
FUN 162
Expression
Input -[ A MAX ( n ) B ]- Output
Function
When the input is ON, this instruction searches for the maximum value from the table of size n words
starting with A , and stores the maximum value in B and the pointer indicating the position of the
maximum value in B+1 . The allowable range of the table size n is 1 to 64.
Execution condition
Input
OFF
No execution
ON
Execution
Operand
Name
A Start of table
n Table size
B Result
Example
When R010 is ON, the maximum value is found from the register table D0200 to D0209 (10
words), and the maximum value is stored in D0500 and the pointer is stored in D0501.
D0200
100
D0201
10000
D0202
-1000
D0203
10
D0204
D0205
200
D0206
-300
D0207
20000
D0208
-30
D0209
20
Note
· This instruction deals with the data as signed integer (-32768 to 32767).
· If there are two or more maximum value in the table, the lowest pointer is stored.
· If Index register K is used as operand B , the pointer data is discarded.
244
T1/T1S User's Manual
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
MAX
Maximum value
Operation
Device
X
Y
R
S
T.
C. XW YW RW SW T
Pointer
0
1
2
3
0
4
5
6
7
8
9
Output
OFF
ON
Register
C
Ö
Ö
Ö
Ö
Ö
Ö
Ö
Ö
Ö
Ö
Ö
D0500
20000
D0501
7
6F3B0250
T1S only
Constant Index
D
I
J
K
Ö
1 - 64
Ö
Ö
Ö
Ö
(Maximum value)
(Pointer)

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Prosec t1s

Table of Contents