EasyManua.ls Logo

Omron CX-Supervisor - Chr; Formattext

Omron CX-Supervisor
164 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
Loading...
Text Commands SECTION 6 Functions and Methods
88
Typical Example
BStr = Bin (20)
In this example, 'Bstr' contains '10100'.
6-12-3 Chr
Syntax
result = Chr (value)
Remarks
Typical Example
Char = Chr(65)
In this example, 'Char' contains 'A'.
6-12-4 FormatText
Syntax
textpoint = FormatText ("formattext", expression, ...)
Remarks
Typical Examples
TextPoint = FormatText ("Boiler temperature is %ld
degrees.", BoilerTemp)
The value of the 'BoilerTemp' point is inserted into the specified text at the
position marked by the formatting characters (%ld) and then stored in the point
'TextPoint'.
If the value of 'BoilerTemp' was 57 then the resultant text that is stored in
'TextPoint' is as follows:
"Boiler temperature is 57 degrees."
TextPoint = FormatText ("Boiler %ld temperature is %ld
degrees.", BoilerNo, BoilerTemp)
The value of 'BoilerNo' point is inserted at the first '%ld' marker and the value
of the 'BoilerTemp' point is inserted at the second '%ld' marker and the
resulting string is stored in the point 'TextPoint'.
If the value of 'BoilerNo' was 7 and the value of 'BoilerTemp' was 43 then the
resultant text stored in the 'TextPoint' is as follows:
"Boiler 7 temperature is 43 degrees."
Argument Type Description
Value Extended ASCII value to convert to a
character.
result String containing single character
representation of value.
Argument Type Description
textpoint text
point
A text point which holds the formatted text.
formattext string The text (with appropriate formatting
characters) that the result expression is
inserted into.
expression Integer /
real
The value(s) or expression(s) that is inserted
into formattext.

Table of Contents

Other manuals for Omron CX-Supervisor

Related product manuals