Siemens SINUMERIK 808D ADVANCED Commissioning Manual page 361

Hide thumbs Also See for SINUMERIK 808D ADVANCED:
Table of Contents

Advertisement

Function name
control.localtime
string.cmp
Commissioning Manual
01/2017
Description
The function copies the local time in a field with 7 array elements.
The name of the variable is expected as call parameter.
The following is stored in an array element:
Index 0 - year
Index 1 - month
Index 2 - weekday
Index 3 - day
Index 4 - hour
Index 5 - minute
Index 6 - second
Syntax:
<function name
="control.localtime">_T"time_array"</function>
Example:
<!-- index
0 = Year
1 = Month
2 = Day of week
3 = Day
4 = Hour
5 = Minute
6 = Second
-->
<let name="time_array" dim="7" />
<function name
="control.localtime">_T"time_array"</function>
Two strings are compared with one another from a lexicographical
perspective.
The function gives a return value of zero if the strings are the same,
a value less than zero if the first string is smaller than the second
string or a value greater than zero if the second string is smaller then
the first string.
Parameter:
str1 - string
str2 - comparison string
Syntax:
<function name="string.cmp" return ="<int var>" >
str1, str2 </function>
Example:
<let name="rval">0</let>
<let name="str1" type="string">A brown bear hunts a
brown dog.</let>
<let name="str2" type="string">A brown bear hunts a
brown dog.</let>
<function name="string.cmp" return="rval"> str1,
str2 </function>
Result:
rval= 0
361

Advertisement

Table of Contents
loading

Table of Contents