Functions that Return type Text


GET_RIGHTTEXT ( Text , Length )

Returns a resulting text from the given Text starting from the right and is of Length characters.

Note that Text remains unchanged.

In case an error occurs (e.g. invalid Length ) returns ERR as text.

GET_RIGHTTEXT ( Hello World , 5 ) returns World


GET_LEFTTEXT ( Text , Length )

Returns a resulting text from the given Text starting from the left and is of Length characters.

Note that Text remains unchanged.

In case an error occurs (e.g. invalid Length ) returns ERR as text.

GET_LEFTTEXT ( Hello World , 5 ) returns Hello


GET_MIDTEXT ( Text , StartIndex , Length )

Returns a resulting text from the given Text starting from the specified zero-based StartIndex and is of Length characters.

Note that Text remains unchanged.

In case an error occurs (e.g. invalid StartIndex, Length ) returns ERR as text.

GET_MIDTEXT ( Hello World , 2 , 3 ) returns llo


DEL_RIGHTTEXT ( Text , Length )

Returns a resulting text after deleting the sub string that begins from the Right of Text and is of Length characters.

Note that Text remains unchanged.

In case an error occurs (e.g. invalid Length ) returns ERR as text.

DEL_RIGHTTEXT ( Hello World , 2 ) returns Hello Wor


DEL_LEFTTEXT ( Text , Length )

Returns a resulting text after deleting the sub string that begins from the Left of Text and is of Length characters.

Note that Text remains unchanged.

In case an error occurs (e.g. invalid Length ) returns ERR as text.

DEL_LEFTTEXT ( Hello World , 6 ) returns World


DEL_MIDTEXT ( Text , StartIndex , Length )

Returns a resulting text after deleting the sub string from the given Text starting from the specified zero-based StartIndex and is of Length characters.

Note that Text remains unchanged.

In case an error occurs (e.g. invalid StartIndex, Length ) returns ERR as text.

DEL_MIDTEXT ( Hello World , 5 , 1 ) returns HelloWorld


GET_SPLIT ( Text , Separator , Index )

Splits the given Text using the specified Separator and returns the sub string at the given Index

In case an error occurs ( e.g. invalid index or empty string) returns ERR as text.

GET_SPLIT ( Hello*World , * , 0 ) returns Hello

GET_SPLIT ( Hello-World , - , 1 ) returns World


GET_ATTR ( Text , AttrName , Decorators )

Returns a text from a given Text, based on a given Attribute name where its value is enclosed by Decorator characters.

In case an error occurs (e.g., invalid attribute name, incorrect format, empty Text, non-existing decorator etc...) returns ERR as text.

Let, Text be  <LIMA DIR="ReplyOk" CMD="Project_GetNode" PATH="Module.Application.Device Camera.Light Current[%]" VALUE="20"/> and 

AttrName be VALUE

Start Decorator be  "

End Decorator be "


Returns 20


SERIALPORT_QUERY ( PortNr , sQuery )

Sends sQuery to the SerialPort, determined by the PortNr - Configured in Settings - and returns a Text received from the SerialPort in response to sQuery.


In case an error occurs, returns the Error Message as text , accordingly.

ERR_errorDescription

like ERR_TIMEOUT

SERIALPORT_QUERY ( 1 , HelloWorld ) will send HelloWorld to the SerialPort1 and then wait for the response. If SerialPort1 responds, then function will return the response.


TCPCLIENT_QUERY ( ClientNr , sQuery )

Sends sQuery to the Tcp Client, determined by the ClientNr - Configured in Settings - and returns a Text received from the TcpClient in response to sQuery


In case an error occurs, returns the Error Message as text , accordingly.

ERR_errorDescription

like ERR_TIMEOUT


If the Tcp Client is configured in Settings such that the Timeout is 0, then upon a successful sending the sQuery, Function will immediately return SUCCESS as text and will not wait for a response from the Tcp Server.

TCPCLIENT_QUERY ( 1 , HelloWorld ) will send HelloWorld to the TcpClient1 and then wait for the response. If TcpClient1 responds, then function will return the response.


APICLIENT_REQUEST ( ClientNr , HttpMethod, URL, Header* , QueryParameters*) *Optional

Sends an HTTP Request using configured API Client identified by ClientNr and returns a Text received from the Server.

When the command configuration page is launched, the headers listed initially are based on the ones defined in the Client Settings. You can freely modify, add or remove headers on the page - including their key and value fields.

However, please note that any changes made is the page will NOT affect the original header list in the Client API settings.

The same applies to URL, too.

This allows you to customize headers and URL for the current function without altering the global configuration.

It is also possible to attach Query Parameters to the current function. Query Parameters are key value pairs, too. But their values can be either entered by you or can be linked to a Tag.

For the Request Body, its format can be JSON or XML. Content can be either entered by you or can be linked to a Tag.


In case an error occurs, returns the Error Message as text , accordingly.

ERR_errorDescription

like ERR_TIMEOUT


JSON_BUILDER ( )

Returns the Json Document. You can bind Deskval Tags to values. In run time they will be replaced by the Tag values considering Tag Type.


Binding example for Boolean tag :

"isGood" : "@@GlobalTagBoolean4" will be evaluated as - assuming tag value is True  

"isGood" : true


Binding example for Numeric tag :

"whatIsPi" : "@@GlobalTagNum38" will be evaluated as - assuming tag value is 3.14  

"whatIsPi" : 3.14


Binding example for String tag :

"myName" : "@@GlobalTagString1" will be evaluated as - assuming tag value is Gilles  

"myName" : "Gilles"


XML_BUILDER ( )

Returns the XML Document. You can bind Deskval Tags to element values and attributes. In run time they will be replaced by the Tag values.


Binding example for Boolean tag :

<isGood> @@GlobalTagBoolean4 </isGood> will be evaluated as - assuming tag value is True  

<isGood> true </isGood>


Binding example for Numeric tag :

<whatIsPi> @@GlobalTagNum38 </whatIsPi> will be evaluated as - assuming tag value is 3.14  

<whatIsPi> 3.14 </whatIsPi>


Binding example for String tag :

<myName> @@GlobalTagString1 </myName> will be evaluated as - assuming tag value is Gilles  

<myName> Gilles </myName> 


Attributes are handled in the same way.

Binding example for attribute:

<device Voltage="@@GlobalTagNum5">MyDevice</device> will be evaluated as - assuming tag value is 221

<device Voltage="221">MyDevice</device>


NUM_TO_TEXT ( nVal )

Returns the text representation of nVal


BOOL_TO_TEXT ( bVal )

Returns True as Text if bVal is TRUE, otherwise returns False


GET_AKTUELUSERNAME ()

Returns AktuelUserName


GET_DATETIME

Returns DateTime in DD-MM-YYYY hh:mm:ss format

In case date and time is 25-January-2024 09:48:15,

GET_DATETIME ( ) returns 25-01-2024 09:48:15


GET_DATE

Returns Date in DD-MM-YYYY format

In case date and time is 25-January-2024 09:48:15,

GET_DATE ( ) returns 25-01-2024


GET_DAY_DD

Returns Day in DD format

In case date and time is 25-January-2024 09:48:15,

GET_DAY_DD ( ) returns 25


GET_DAY

Returns Name of Day

In case date and time is 25-January-2024 09:48:15,

GET_DAY ( ) returns Thursday


GET_DAYOFYEAR

Returns Day of Year

In case date and time is 15-April-2024 09:48:15,

GET_DAYOFYEAR ( ) returns 106


GET_MONTH_MM

Returns Month in MM format

In case date and time is 25-January-2024 09:48:15,

GET_MONTH_MM ( ) returns 01


GET_MONTH

Returns Name of Month

In case date and time is 25-January-2024 09:48:15,

GET_MONTH ( ) returns January


GET_YEAR_YY

Returns Year YY format

In case date and time is 25-January-2024 09:48:15,

GET_YEAR_YY ( ) returns 24


GET_YEAR_YYYY

Returns Year YYYY format

In case date and time is 25-January-2024 09:48:15,

GET_YEAR_YYYY ( ) returns 2024


GET_THISASSET_NAME

Returns AssetName


GET_THISASSET_UID

Returns Unique Identifier (UID) of the Asset


GET_THISJOB_NAME

Returns the JobName


GET_THISJOB_UID

Returns Unique Identifier (UID) of the Job


GET_THISJOB_TODAY_TOTALCOUNT

Returns the sum of Total Counts of the Job today


GET_THISJOB_TODAY_OKCOUNT

Returns the sum of OK Counts of the Job today


GET_THISJOB_TODAY_NOKCOUNT

Returns the sum of NOK Counts of the Job today


GET_THISJOB_TODAY_REWORKCOUNT

Returns the sum of Rework Counts of the Job today


GET_THISJOB_ALLTIMES_TOTALCOUNT

Returns the sum of Total Counts of the Job within the whole life range of the Asset


GET_THISJOB_ALLTIMES_OKCOUNT

Returns the sum of OK Counts of the Job within the whole life range of the Asset


GET_THISJOB_ALLTIMES_NOKCOUNT

Returns the sum of NOK Counts of the Job within the whole life range of the Asset


GET_THISJOB_ALLTIMES_REWORKCOUNT

Returns the sum of Rework Counts of the Job within the whole life range of the Asset