Echelon IzoT Resource Editos User Manual

Page 70

Advertising
background image

62

Creating and Modifying Resources

Following are example formats using scaling factors.

E

XAMPLE

1:

The following format definitions define SI and US formats for the SNVT_temp_f
standard network variable type:

SNVT_temp_f#SI:

text("%f", *1+0(0:854));

! degrees C


SNVT_temp_f#US:

text("%f", *1.8+32(0:855));

! degrees F

The SI format multiplies the value by 1 and adds 0 (i.e. shows the raw value) and
appends “degrees C” (scope 0, string index 854). The US format multiplies the value by
1.8 and adds 32 and appends “degrees F” (scope 0, string index 855).

E

XAMPLE

2:

The following format definitions define the SI and US formats for the SCPTsetPnts
standard configuration property type:

SCPTsetPnts#SI:

text("%f,%f,%f,%f,%f,%f",

! degrees C

occupied_cool, standby_cool, unoccupied_cool,

occupied_heat, standby_heat, unoccupied_heat);


SCPTsetPnts#US:

text("%f,%f,%f,%f,%f,%f",

! degrees F

occupied_cool*1.8+32(0:855),

standby_cool*1.8+32(0:855),

unoccupied_cool*1.8+32(0:855),

occupied_heat*1.8+32(0:855),

standby_heat*1.8+32(0:855),

unoccupied_heat*1.8+32(0:855));

Using Localized List Separators

You can include a locale-specific list-separator character in a format string. To do this,
specify a localized (“#LO”) modifier and include a vertical bar (‘|’) where you want the
list separator in the format string. The vertical bar is translated to the operating system
list-separator character for the current operating system default locale. The current
setting of the Windows list-separator character may be found in the List Separator
setting on the Number tab of the Regional Options in the Windows Control Panel. The
list-separator character can only be used with localized alternate formats, as described in
Creating and Modifying a Resource Format.

Using Localized Time and Date Formats

You can include time and date localization functions to format a time or date value as
specified by the operating system default locale method. The date format specifier
requires three parameters, which specify the data fields where it will find the year,
month, and day values to be formatted. The time format specifier requires two to four
parameters, specifying hour and minute values to be formatted, and optionally, second
and millisecond values.

For the Windows operating system, the current setting of the date format may be found
under Short Date Style on the Date tab of Regional Settings in the Windows Control
Panel. The current setting of the time format may be found under Time Style on the
Time tab of the Regional Settings, with the following exceptions:

Advertising