Nematron Pointe Controller User Manual
Page 140
Chapter 5: Developing Controller Programs
Pointe Controller User Guide
138
String functions:
• COMPARE(string1, string2) compares two strings, returning –1
when string1 is ‘less than’ string2, 0 when the strings are identical,
and 1 when string1 is ‘greater than’ string2.
• FIND(string1, string2) returns the position in string1 where string2
is first found. If string2 is not found, the return is 0.
• LEN(string) returns the length of the specified string.
• STRING_TO_INT(string) converts the specified string to an integer.
Timer functions:
• T_DONE(timer_id) returns True when the specified timer has
expired
• T_PREVAL(timer_id) returns the specified timer’s preset value
• T_VALUE(timer_id) returns the specified timer’s current value
The Date/Time functions are all used to format the given seconds
parameter, as counted from January 1, 1970. To format the current time,
you must first get the time using the
Date/Time Get command
.
To specify a string, insert the string’s tag name in the function’s
parameter list.
To specify a timer, insert the timer’s tag name as the timer_id in the
function’s parameter list [T_DONE(timer tagname)].
To specify the number of seconds since January 1, 1970, obtain the
current system time using the Date/Time Get process block.
Tags
A tag references an item in the PointeControl database. When a device input scan
or chart assignment statement assigns a new value to a tag, the entry in the
database updates. When an expression references a tag, the runtime system
retrieves the tag’s current value from the database and uses the value in the
expression.