EasyManuals Logo

Omron CX-PROGRAMMER V8.1 User Manual

Omron CX-PROGRAMMER V8.1
231 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #170 background imageLoading...
Page #170 background image
145
ST Language Configuration Section 5-4
Data Type Conversion
Functions
The following data type conversion functions can be used in structured text.
Syntax Source_data_type_TO_New_data_type (Variable_name)
Example: REAL_TO_INT (C)
In this example, the data type for variable C will be changed from REAL to
INT.
Data Type Combinations The combinations of data types that can be converted are given in the follow-
ing table.
(YES = Conversion possible, No = Conversion not possible)
Number-String
Conversion Functions
The following number-string conversion functions can be used in structured
text.
Syntax Source_data_type_TO_STRING (Variable_name)
Example: INT_TO_STRING (C)
In this example, the integer variable C will be changed to a STRING vari-
able.
STRING_TO_New_data_type (Variable_name)
Example: STRING_TO_INT (C)
REPLACE(<Source_string
>,<Replace_string>,
<Number_of_characters>,
<Position>)
Source_
string
STRING STRING Replaces charac-
ters in a text string.
a: = REPLACE (b,c,d,e)
(*number of characters specified
by variable d in source string b
replaced with text string c start-
ing from position specified by
variable e and resulting string
stored in variable a*)
Replace_
string
STRING
Number_of_
characters
INT,
UINT
Position INT,
UINT
FIND(<Source_string>,
<Find_string>)
Source_
string
STRING INT Finds characters
within a text string.
a: = FIND (b,c)
(*first occurrence of text string c
found in text string b and posi-
tion stored in variable a; 0 stored
if text string c is not found.*)
Find_string STRING
Function Argument data type Return
value
data type
Description Example
FROM TO
BOOL INT DINT LINT UINT UDINT ULINT WORD DWORD LWORD REAL LREAL BCD_
WORD
BCD_
DWORD
BOOL No No No No No No No No No No No No No No
INT No No YES YES YES YES YES YES YES YES YES YES YES YES
DINT No YES No YES YES YES YES YES YES YES YES YES YES YES
LINT No YES YES No YES YES YES YES YES YES YES YES No No
UINT No YES YES YES No YES YES YES YES YES YES YES YES YES
UDINT No YES YES YES YES No YES YES YES YES YES YES YES YES
ULINT No YES YES YES YES YES No YES YES YES YES YES No No
WORD No YES YES YES YES YES YES No YES YES No No No No
DWORD No YES YES YES YES YES YES YES No YES No No No No
LWORD No YES YES YES YES YES YES YES YES No No No No No
REAL No YES YES YES YES YES YES No No No No YES No No
LREAL No YES YES YES YES YES YES No No No YES No No No
WORD_
BCD
No YES YES No YES YES No No No No No No No No
DWORD_
BCD
No YES YES No YES YES No No No No No No No No

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CX-PROGRAMMER V8.1 and is the answer not in the manual?

Omron CX-PROGRAMMER V8.1 Specifications

General IconGeneral
BrandOmron
ModelCX-PROGRAMMER V8.1
CategorySoftware
LanguageEnglish

Related product manuals