Example Access To An Array Element - Siemens SINUMERIK 828D Commissioning Manual

Hide thumbs Also See for SINUMERIK 828D:
Table of Contents

Advertisement

Graphic and logic elements
7.2 Defining an array
Mode M
Compare mode
When compare mode C = 0 is used, the content of the search line or search column must be
sorted in ascending order. If the search concept is smaller than the first element or greater
than the last, the value 0 or a blank string is output and the error variable ERR is set to TRUE.
When compare mode C = 1 is used, the search concept must be present in the search line or
search column. If the search concept cannot be found, the value 0 or a blank string is output
and the error variable ERR is set to TRUE.
7.2.2

Example Access to an array element

Prerequisite
Two arrays are defined below. These are the basis for the following examples:
//A(Thread)
//END
//A(Array2)
168
Line value Z
4
Search concept:
Search in column S
5
Line index of search line.
(0.3 / 0.075 / 0.202)
(0.4 / 0.1
(0.5 / 0.125 / 0.338)
(0.6 / 0.15
(0.8 / 0.2
(1.0 / 0.25
(1.2 / 0.25
(1.4 / 0.3
(1.7 / 0.35
("DES" /
(0.3 /
(0.4 /
(0.5 /
(0.6 /
(0.8 /
(1.0 /
(1.2 /
Column value S
Column index of search col‐
umn
Search concept:
Search in line Z
/ 0.270)
/ 0.406)
/ 0.540)
/ 0.676)
/ 0.676)
/ 1.010)
/ 1.246)
"PTCH" /
"CDM" )
0.075 /
0.202 )
0.1 /
0.270 )
0.125 /
0.338 )
0.15 /
0.406 )
0.2 /
0.540 )
0.25 /
0.676 )
0.25 /
0.676 )
Programming Manual, 10/2015, 6FC5397-3DP40-5BA3
Output value
Line index
Column index
SINUMERIK Integrate Run MyScreens

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents