Omron WS02-CXPC1-V9 - V9 Operation Manual page 170

Table of Contents

Advertisement

ST Language Configuration
Function
Argument data type
EXPT (base, expo-
Base
nent)
Exponent INT,
Text String Functions
Function
LEN(String)
LEFT(<Source_string>,
<Number_of_characters>)
RIGHT(<Source_string>,
<Number_of_characters>)
MID(<Source_string>,
<Number_of_characters>,
<Position>)
CON-
CAT(<Source_string_1>,<S
ource_string_2>,...) *Up to
32 source strings.*
INSERT(<Source_string>,
<Insert_string>,<Position>)
DELETE(<Source_string>,
<Number_of_characters>,
<Position>)
144
Return value
data type
REAL,
REAL, LREAL
LREAL
DINT,
LINT,
UINT,
UDINT,
ULINT
Note
The data type returned for numerical functions is the same as that used in the
argument. Therefore, variables substituted for function return values must be
the same data type as the argument.
The following functions can be used with CS/CJ-series CPU Units with unit
version 4.0 or later, or CJ2-series CPU Units.
Argument data type
String
STRING
Source_
STRING
string
Number_of_
INT,
characters
UINT
Source_
STRING
string
Number_of_
INT,
characters
UINT
Source_
STRING
string
Number_of_
INT,
characters
UINT
Position
INT,
UINT
Source_
STRING
string
Source_
STRING
string
Insert_
STRING
string
Position
INT,
UINT
Source_
STRING
string
Number_of_
INT,
characters
UINT
Position
INT,
UINT
Description
Exponential: Base
Return
Description
value
data type
INT
Detects the length
of a text string.
STRING
Extracts charac-
ters from a text
string starting from
the left.
STRING
Extracts charac-
ters from a text
string starting from
the right.
STRING
Extracts charac-
ters from a text
string.
STRING
Concatenates text
strings.
STRING
Insert one text
string into another.
STRING
Deletes characters
from a text string.
Section 5-4
Example
exponent
a: = EXPT (b, c)
(*Exponential with variable b
as the base and variable c
as the exponent is stored in
variable a*)
Example
a: = LEN (b)
(*number of characters in string
b stored in variable a*)
a: = LEFT (b,c)
(*number of characters specified
by variable c extracted from the
left of text string b and stored in
variable a*)
a: = RIGHT (b,c)
(*number of characters specified
by variable c extracted from the
eight of text string b and stored
in variable a*)
a: = MID (b,c,d)
(*number of characters specified
by variable c extracted from text
string b starting at position spec-
ified by variable d and stored in
variable a*)
a: = CONCAT (b,c...)
(*text strings b, c... are joined
and stored in variable a*)
a: = INSERT (b,c,d)
(*text string c inserted into text
string b at position specified by
variable d and resulting string
stored in variable a*)
a: = DELETE (b,c,d)
(*number of characters specified
by variable c deleted from text
string b starting from position
specified by variable d and
resulting string stored in variable
a*)

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cx-programmer 9Sysmac ws02-cxpc1-v9

Table of Contents