EasyManua.ls Logo

Omron CX-Supervisor - Using Format Specifiers

Omron CX-Supervisor
334 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...
Embedding Point Values in Text SECTION 3 Points
51
The shift foreman was Fred Smith
and
The shift output was ((ShiftOutput)) litres
becomes:
The shift output was 5000 litres
3-13-1 Using Format specifiers
Format specifiers can be used, similar to the Format script command:
%s for text string points;
%d for integer points;
%f for real floating points.
Where 'MyTextpoint="Hello"':
The text of (("My text point is %s",Mypoint))
becomes:
The text of My text point is Hello
Where MyRealpoint=5467.7658:
To two decimal places the value of MyRealpoint is
(("%4.2f",MyRealpoint))
becomes:
To two decimal places the value of MyRealpoint is
5467.76
Combinations of format specifiers are possible:
((%s to two decimal places the value of MyRealpoint is
%4.2f",MyTextpoint,MyRealpoint))
becomes:
Hello to two decimal places the value of MyRealpoint
is 5467.76
The can be used in various fields, for example:
In Alarm Raised and Cleared Messages e.g.
Alarm Raised: "Boiler Temperature too high. Current
value is (("%.1d", BoilerTemp))"
As captions for popup edit box animations. This is useful as the captions
are then dynamically translated e.g.
Caption: "((CaptionString))"
As parameter to MessageBox. This is useful to help convert numbers to
strings e.g.
MessageBox("Error ((ErrorNum)) occurred")
As parameter to LogError or LogEvent. This too is useful to help convert
numbers to strings e.g.
LogError("Error ((ErrorNum)) occurred", priority)
Titles in Graphs and Charts (useful for translations again) e.g.
Title: "((TitleString))"
In Tooltips, for dynamic information
Tooltip text: "((ToolTipString))"
In Report templates. See Script Reference GenerateReport() for more
information.

Table of Contents

Other manuals for Omron CX-Supervisor

Related product manuals