08/2005 Expanding the Operator Interface (BE1)
3 Syntax
© Siemens AG, 2005. All rights reserved
SINUMERIK 840D sl/840D/840Di/810D HMI Installation and Start-Up Guide (IAM) – 08/2005 Edition
BE1/3-55
Example Access mode 4:
The search concept is in Z. S contains the column index of the column in which
concept is being searched for. The line index of the concept found is output.
VAR1 = Thread[0.125,1,4] ;The value of VAR1 is 2
Explanation: Search for value 0.125 in column 1 of array "Thread" and transfer the
line index of the value found to VAR1.
Example Access mode 5:
Z contains the line index of line in which concept is being searched for. The search
concept is in S. The column index of the search concept found is output.
VAR1 = Thread[4,0.2,5,1] ;The value of VAR1 is 1
Explanation: Search in line 4 of the "Thread" array for the value 0.2 and transfer
the column index of the value found to VAR1. Comparison mode 1 was selected
because the values of line 4 are not sorted in ascending order.
Array status
The Status property can be used to scan a configuration file to find out whether an
array access operation is supplying a valid value. Status is a read-only property.
Identifier [Z, S, [M[,C]]].vld
where:
Identifier Name of array
The result of the scan can be:
FALSE = invalid value
TRUE = valid value
DEF MPIT = (R///"MPIT",,"MPIT",""/wr3)
DEF PIT = (R///"PIT",,"PIT",""/wr3)
PRESS(VS1)
MPIT = 0.6
IF MET_G[MPIT,0,4,1].VLD == TRUE
PIT = MET_G[MPIT,1,0].VAL
REG[4] = PIT
REG[1] = "OK"
ELSE
REG[1] = "ERROR"
ENDIF
END_PRESS