Siemens SINUMERIK 840D sl Commissioning Manual page 743

Basesoftware and operating software
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

INSTR function: Search for character in string
Syntax:
Description:
Parameters:
Example
DEF VAR01
DEF VAR02
LOAD
VAR01="HELLO/WORLD"
VAR02=INST(1,"/",VAR01)
END_LOAD
LEFT Function: String from left
Syntax:
Description:
Parameters:
Example
DEF VAR01
DEF VAR02
LOAD
VAR01="HELLO/WORLD"
VAR02=LEFT(VAR01,5)
END_LOAD
SINUMERIK Integrate Run MyScreens (BE2)
Programming Manual, 03/2013, 6FC5397-1DP40-3BA1
(Start, String1, String2 [,Direction])
INSTR
Searches for characters
Start
Starting position for searching from string1 into string2.
Enter 0 to start searching at the beginning of string2.
String1
Character that is being searched for.
String2
Chain of characters in which the search is being made
Direction (optional)
Direction in which the search is being made
0: From left to right (default setting)
1: From right to left
0 is returned if string1 does not occur in string2.
; Result = 6
(string, length)
LEFT
LEFT returns a string containing the specified number of characters starting
from the left-hand side of a string.
string
Character string or variable with the string to be 
 p rocessed
length
Number of characters that are to be read out
; Result = "HELLO"
Programming commands
6.3 Functions
125

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de sl

Table of Contents