Toshiba PROSEC T1-16S User Manual page 228

Programmable controller basic hardware and function
Hide thumbs Also See for PROSEC T1-16S:
Table of Contents

Advertisement

7. Instructions
FUN 162
MAX
Expression
Input
[ A MAX (n) B ]
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
X
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
0
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.
226
T1-16S User's Manual
Maximum value
Output
Operation
Device
Y
R
S
T.
C. XW YW RW SW T
Pointer
0
1
2
3
4
5
6
7
8
9
Output
OFF
ON
Register
C
D
D0500
20000
(Maximum value)
D0501
7
(Pointer)
6F3B0253
Constant Index
I
J
K
1 - 64

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents