Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

...

There is implemented formatting of displayed values in the form of a format mask in the D2000 System. Basic syntax The basic syntax is usable for the Transformation palette. Extended syntax, that which replenishes the basic syntax, is usable used to display the object in pictures.

...

The mask defines the format of displayed numeric valuevalues. To create your own formats, you can use the following characters: ##, 0, $, E+, E-, e+, e-.

CharacterMeaning
#Enables the occurrence of a number (the number occurrence is not necessary). If the number is negative, the sign is to be placed on the the first occurrence place of this character.
0Number occurrence required. If the number is does not occurred on occur in the given place, it will be replenished by the character "0".
$Rounding-off.
E+, E-Exponential form. Exponent is quantified so that the mantissa would be less than 10.
e+, e-Exponential form (engineering notation). Exponent is quantified so that it is divisible by 3.
.Decimal point.

...

  • after the first character $ from the left, the characters 0 and # are substituted by the character $,
  • between the character 0 and the decimal point, the character # is substituted by the character 0.

...

  • before the character #, placed before the decimal point, there is no occurrence of the character 0,
  • before the character #, there is no occurrence of the character $,
  • between the character 0 and the decimal point, there is no occurrence of the character #
  • before the character 0, there is no occurrence of the character $.

The overflow occurs , if the displayed number (or number sign) is longer than the defined mask. After overflow, there is displayed the string of characters "<".

The examples of format mask masks are shown in the following table.

...

The following format marks are used to display the objects, the value of which is time type, and the time of object value occurrence.

MarkMeaning
yyyy or rrrrNumber The number of year years (four - digits).
yy or rrrrLast two - digits of the year.
ddNumber The number of day days (two - digits).
mmNumber The number of a month.
hhHour
hhhNumber The number of hours - only for the relative time that does not contain a mask for days.
hhhhNumber The number of hours - only for the relative time that does not contain a mask for days.
hhhhhNumber The number of hours - only for the relative time that does not contain a mask for days.
hb, HHTrading hour - hour in a day from 1 to 25.
miMinute
ssSecond
mssMillisecond
ttttName of day in week *.
ttt3-character abbreviation of the day in week *.
tt2-character abbreviation of the day in week *.
ZZZUTC offset in hours using format "(+|-)hh".
ZZZZZUTC offset in hours and minutes using the format "(+|-)hhmi".
ZZZZZZUTC offset in hours and minutes using the format "(+|-)hh:mi".

For example, if the object SysTime (System tag) is connected (to view) to the text string:

...

If there is used the mask with the shortened format of year "yy", it will be modified on to "yyyy". For example, if there is used the mask hh:mi:ss dd-mm-yy, when changing the value, it is modified on hh:mi:ss dd-mm-yyyy by the reason of the uniqueness of entering the year (19/20).

...

  1. If a mask contains both hh and hb mark marks, only hh mark will be used.
  2. In the text entry field, the hh mark is highlighted in white and hb mark in light yellow.

Kotva
days
days
Note to days in weekaweek:
The names are displayed when using the transformation palette (I/O tags, user tags, structured variable items) in pictures, in Browser and in the functions %TimeToStr and %TimeToStrEx.
For displaying names of days, you can use the Dictionary - it will generate a text in particular language instead of the name of day according to the table:

...

In the Dictionary, you must define keys keys (e.g. Mo, Tu, We, Th, Fr, Sa, Su if you use the mask tt) and set the language for individual users.
When using the functions %TimeToStr and %TimeToStrEx, you must apply the function %HI_LNG_Translate to the result.

...

In pictures, there is possible to display individual parts of the complex value of D2000 System object - flags. The special text strings (graphic object Text), enclosed between combined brackets "{ }! - format masks, are used to display the values of attributes of linked objects. The mask defines the format of the displayed value.

MaskDisplayed The displayed attribute of linked object complex value
{A}Process alarm.
{D}Object description.
Note: In pictures, when displaying the object description for structure items, which contain indirect objects, there will be displayed the description of the indirect object instead of the structure description. If the indirect object is not used, there will be displayed in the column description.
{F}All attributes (flags) of the object value. Depending on the current value of the flag A up to P, there will be displayed:
  • the capital letter that represents the given flag (e.g. A) - if the flag value is TRUE,
  • the character "_" (underline) - if the flag value is FALSE.
{Fflags}Defined flags (attributes) of the object value. Unlike the mask {F}, in this case, there will be displayed only values of flags enumerated after the letter F - flags (e.g. {FACE}). Depending on the current value of the given flag, there will be displayed:
  • the capital letter that represents the given flag (e.g. A) - if the flag value is TRUE,
  • lower case letter that represents the given flag (e.g. b) - if the flag value is FALSE.
{L}User name. This mask can be used only for the Display mask.
{N}Object name.
Note: In pictures, when displaying the object name for structure items, which contain indirect objects, there will be displayed the name of the indirect object instead of the structure name. If the indirect object is not used, there will be displayed the structure name, row number and column name.
{T}Object value time.
{Tmask}Object value time together with the time mask.
{tmask}Numeric object value displayed as a time data according to the entered mask for time data.
{U}Technical units of the object.
Note: In pictures, when displaying the object technical units for structure items, which contain indirect objects, there will be displayed the technical units of the indirect object instead of the technical units of the structure.
{V}Object value - if the object has status text then the status text will be displayed, if not the object value will be displayed
{V+}Object value - if the object has status text then the status text is displayed and the value of the object is displayed in parentheses, if not the value of the object is displayed
{V-}Object value - the value of the object is displayed, even if the object has a status text
{PV}, {PU}, {PT}, {PTmask}, {Ptmask}, {PF}, {PFflags}The letter P, typed in the format mask, will display the previous value of a given attribute.
Warning: The letter O, used in format masks, can be used just for the definition of the Display mask.

Combined format masks

...

The aforementioned text of this topic describes the simple format mask, by means of which it is possible to display the value of one particular attribute of complex object value (e.g. object value, value occurrence time, ...). There can be also used as the so-called combined format masks, besides simple format masks. These masks, unlike simple ones, display values of several attributes of complex object value.

The combined format mask are is defined within the frame of one text string inserted into the picture as graphic object Text.

The examples of combined format mask masks are shown in the following table.

MaskDisplayed The displayed attribute of linked object complex value
{N} {V}Name and value of the object.
{V} {U}Value and technical units of the object.
{N} {T} {F}Name, occurrence time and flags of the object.

Note 

  • In case that there are defined both the mask for the given attribute (e.g. {V}, {T} ...) and the and the mask, defining own value format (e.g. {##.#}, {# ### K} ...) within the frame of one combined format mask, there is valid the mask with the value format.

...

The decimal point in the real numbers

...

Real numbers display in the D2000 HI

The decimal point in the real numbers is represented by a separator (in the D2000 HI only) as it is set in the Regional Settings. Both "full stop" and "comma" are supported.

Warning:

  • Do not set any other mark marks than "full stop" or "comma" as a decimal point in the Regional Settings.
  • In the definition of display mask, there is always used "full stop" to separate the integer part from the fractional one. It is, then, replaced by the mark from the Regional Settings. Therefore, we recommend you to use neither "comma" nor "full stop" for the thousands separator in the masks. For example, if you use the mask: "###,###.###,###", and in the regional settings is "comma" as a decimal point, you will get a strange value, for example "121,652,791,654".

...