078-0422-01B I.lon Vision 2.2 Users Guide
078-0422-01B I.lon Vision 2.2 Users Guide
2
User’s Guide
078-0422-01B
Echelon, LON, LONWORKS, LonTalk, Neuron, LONMARK,
3120, 3150, LNS, LonMaker, and the Echelon logo are
trademarks of Echelon Corporation registered in the
United States and other countries. LonPoint and
LonSupport are trademarks of Echelon Corporation.
ii
Table of Contents
Preface.....................................................................................................vi
Purpose ............................................................................................................ vii
Audience .......................................................................................................... vii
Hardware Requirements..................................................................................... vii
SmartServer 2.2 Documentation ......................................................................... vii
Content ........................................................................................................... viii
For More Information and Technical Support ..................................................... viii
1 Introduction ........................................................................................1
Introduction ....................................................................................................... 2
i.LON Vision 2.2 Compatibility with i.LON Vision 1.0 .................................. 2
Installing Echelon i.LON Vision 2.2 Software ................................................ 2
2 Quick-Start Exercise............................................................................7
Introduction ....................................................................................................... 8
Step 1: Creating a Web Site Connection ........................................................ 8
Step 2: Creating a Custom SmartServer Web Page ....................................... 10
Step 3: Adding i.LON Vision Objects.......................................................... 13
Step 4: Linking a Custom Web Page to the SmartServer Home Page .............. 22
3 Creating Custom SmartServer 2.2 Web Pages ....................................27
Introduction ..................................................................................................... 28
Configuring i.LON Vision 2.2 Preferences ......................................................... 28
Upgrading Custom Web Pages to SmartServer 2.2 Pages..................................... 30
Upgrading SmartServer 1.0 Web Pages to SmartServer 2.2 Pages .................. 31
Upgrading e3 Web Pages to SmartServer 2.2 Pages ...................................... 31
Adding i.LON Vision Objects to your Custom Web Pages ................................... 32
Adding Data Point Read/Write Objects........................................................ 33
Show Value ........................................................................................ 35
Text Field ........................................................................................... 41
Text Area ........................................................................................... 47
Combo Box ........................................................................................ 53
Image Swapper ................................................................................... 59
Radio Buttons ..................................................................................... 66
Select Box .......................................................................................... 71
Check Box .......................................................................................... 75
SVG Object ........................................................................................ 80
Custom JavaScript Object .................................................................... 87
Adding Application Objects ..................................................................... 105
Data Point View ................................................................................ 106
Data Log View ................................................................................. 111
Scheduler ......................................................................................... 113
Alarm Notifier .................................................................................. 116
Changing the Page Title ........................................................................... 118
Setting the Poll Rate ................................................................................ 118
Adding Link Objects ................................................................................ 119
Adding a Navigation System to your Web Design ............................................. 122
Creating a Home Page .............................................................................. 122
Manually Creating the Home Page...................................................... 122
Using an Echelon Frameset Template to Create the Home Page ............ 126
Designing the Menu Frame ....................................................................... 127
Opening the Menu.htm File................................................................ 127
Adding a Menu Bar to the Menu Frame .............................................. 128
iv
Preface
i.LON Vision 2.2 is a Web publishing tool that you can use to create custom Web
pages for monitoring and controlling the data points on your SmartServer 2.2.
vi
Purpose
This document describes how to create custom Web pages for monitoring and controlling LONWORKS
networks and other control networks.
Audience
This guide is intended for system designers and integrators with an understanding of control networks.
Hardware Requirements
Requirements for the running the i.LON Vision 2.2 software are listed below:
• 64-bit and 32-bit Microsoft® Windows 8, 64-bit and 32-bit Microsoft Windows 7or 32-bit
Microsoft Windows XP.
• Intel® Pentium® III 1.3 GHz processor or faster, and meeting the minimum Windows
requirements for the selected version of Windows (Pentium IV 1.5 GHz or faster if running
Echelon Enterprise Services 2.2).
• 50 to 530 megabytes (MB) free hard-disk space, plus the minimum Windows requirements for the
selected version of Windows.
o The i.LON Vision 2.2 software requires 44 MB of free space.
o If you install Echelon Enterprise Services 2.2 from the SmartServer 2.2 DVD, you need an
additional 270 MB of free space. Echelon Enterprise Services 2.2 is required for monitoring
and controlling the data points of external devices with custom SmartServer 2.2 Web pages.
If you are running Echelon Enterprise Services 2.2, OpenLNS Server or LNS Turbo Editions
(3.25) or later must be installed on the OpenLNS or LNS Server computer. See the Echelon
Enterprise Services 2.2 User’s Guide for more information on installing Echelon Enterprise
Services 2.2 and LNS Server Service Pack 5 from the SmartServer 2.2 DVD.
o If you install Adobe® Reader 9.1 from the SmartServer 2.2 DVD, you need an additional 204
MB of free space. You need Adobe Reader or another PDF viewer to view the i.LON Vision
2.2 documentation.
• DVD-ROM drive.
• 1024x768 or higher-resolution display with at least 256 colors.
• Mouse or compatible pointing device.
• If you are running Echelon Enterprise Services 2.2 on your computer, LNS Turbo Editions (3.25),
OpenLNS, or later is required.
• Microsoft Internet Explorer 8 or higher, or Mozilla Firefox 18 or higher, Google Chrome 24 or
higher or Apple Safari 6.0 or higher.
Content
This guide includes the following content:
• Introduction: Introduces i.LON Vision 2.2, describes the compatibility of i.LON Vision 2.2 with
i.LON Vision 1.0, and describes how to install the i.LON Vision 2.2 software.
• Quick-Start Exercise. Describes how to create a simple custom SmartServer 2.2 Web page that
you can use to control and monitor a digital relay output on the SmartServer.
• Creating Custom SmartServer 2.2 Web Pages. Describes how to create simple custom
SmartServer 2.2 Web pages and more complex Web designs that include a navigation system. It
describes how to upgrade existing custom Web pages to SmartServer 2.2 Web pages, add i.LON
Vision objects to your custom Web pages, and design a navigation system for your Web design.
• Advanced SmartServer 2.2 Web Page Topics. Describes how to use data point priorities, how to
use data point substitution tags, translate custom SmartServer 2.2 Web pages into different
languages, and open the SmartServer’s built-in applications from custom SmartServer 2.2 Web
pages. Describes how to secure and troubleshoot custom SmartServer 2.2 Web pages.
• i.LON Vision 2.2 API. Describes the programming interface for i.LON Vision objects so that you
can use any Web publishing tool to edit custom SmartServer 2.2 Web pages.
viii
Using the i.LON Vision 2.2 Online Help Files
If you need more information on how to use a particular i.LON Vision 2.2 dialog, you can click Help
in the bottom right-hand corner of the dialog to open a new window with context-sensitive help for that
dialog.
x
1
Introduction
2
SmartServer 2.2 files from the shared drive to your computer and install the various SmartServer
2.2 products.
2. If the SmartServer 2.2 setup application does not launch immediately, click Start on the taskbar
and then and click Run. Browse to the setup.exe file in the root directory of the SmartServer 2.2
DVD and click Open. The Echelon i.LON SmartServer 2.2 main menu opens.
4. Click Echelon i.LON Vision SmartServer 2.2. The i.LON Vision 2.2 Software installer opens.
6. Read the license agreement (you can read a printed version of the license agreement in Appendix
E of the SmartServer 2.2 User’s Guide). If you agree with the terms, click Accept the Terms and
then click Next. The Customer Information window appears.
4
7. Enter your name and company name in the appropriate fields. The name and company may be
entered automatically based on the user currently logged on and whether other Echelon products
are installed on your computer. Click Next. The Destination Folder window opens.
11. Click Finish, and then read the i.LON Vision 2.2 ReadMe document.
6
2
Quick-Start Exercise
8
2. In the language box at the bottom left-hand corner, select the language to be used for the
SmartServer Web interface. You can use i.LON Vision 2.2 in English (the default), German, and
French.
3. Click Manage Connections in the Sites pane on the left side, or click File and then click Site
Manager. The Site Manager dialog opens.
6. Click OK twice. A link with the IP address of your SmartServer is added to the Sites pane.
7.
10
1. Click the New button on the Editor toolbar ( ), or click File and then click New Page. The
Select Folder dialog opens.
2. Expand the SmartServer icon, expand and click the user folder (you must create the new folder in
the /web/user directory on the SmartServer flash disk), and then click the New Folder icon to
create the directory for your custom SmartServer 2.2 Web page.
4. Click the custom SmartServer 2.2 Web page folder you created in step 3, and then click OK.
5. Click Publish on the Editor toolbar ( ), click the Browse tab, or click File and then click
Publish. The Publish As dialog opens.
6. In the File Name property, enter the name of the .htm file (one word with no spaces). For this
example, enter CustomWebPage. Click OK.
7. Optionally, you change the title of your custom SmartServer 2.2 Web page and the poll rate of the
objects in your custom Web page following these steps:
a. Click Format and then click Page Title Properties. The Page Properties dialog opens.
b. In the Page Title box, enter a descriptive page title and then click OK.
c. In the Poll Interval box, set how frequently (in seconds) that all the i.LON Vision objects in
your custom Web page poll the SmartServer’s internal data server for data point updates. If
you do not specify a poll rate, the default poll rate is 1 second.
Note: You can set the frequency in which individual i.LON Vision objects poll their
specified data points by setting the Max Age property in the object’s respective properties
dialog.
d. Click OK.
8. You can begin editing your custom SmartServer 2.2 Web page by adding i.LON Vision objects to
it, as described in the next section.
12
Step 3: Adding i.LON Vision Objects
To add i.LON Vision objects to your custom SmartServer 2.2 Web page, follow these steps:
14
d. The Name and Format boxes of the Data Point property in the Image Swapper dialog are
updated to reflect the selected data point.
16
c. Click OK to return to the Image Swapper dialog.
7. Select the image to represent the nviClaValue_1.state data point when it is OFF following these
steps:
a. In the Images list in the lower part of the Image Swapper dialog, select OFF and then click
Select. The Select File dialog opens.
b. Browse to the Desktop\C:\LonWorks\iLON\iLonVision\graphics\switch folder, click a
graphic of a switch in the OFF position, and then click OK. This graphic will be displayed
when the data point is set to OFF and the Digital Output is disabled. Because the Switchable
check box is selected, you can click the graphic to enable the Digital Output from your
custom SmartServer 2.2 Web page. This example uses the switchDownOff.gif graphic.
18
9. Click OK to return to your custom Web page. The switch image you selected appears in the upper
left-hand corner of the Web page.
10. Click the image so that a move icon and a solid black box appear on top and around the image,
respectively.
20
13. Add a lamp graphic to your custom Web page following these steps:
a. Click Insert and then select Image Swapper.
b. In the Data Point property, click Select. The Select Data Points dialog opens.
c. Select the Net/LON/i.LON App/Digital Output 1/nvoClaValueFB_1.state data point.
d. Click OK to return to the Image Swapper dialog.
e. Clear the Switchable check box. This is because the lamp graphic is not used to write values
to the nvoClaValueFB_1.state data point, instead it is reading the value of the data point.
f. Select Use Local Presets, and then click Edit. The Local Presets dialog opens.
g. Create local ON and OFF presets for the Net/LON/i.LON App/Digital Output
1/nvoClaValueFB_1.state data point.
• In the Preset box, enter “ON”, in the Value box enter “1”, and then click Save.
• In the Preset box, enter “OFF”, in the Value box enter “0”, and then click Save.
• Click OK to return to the Image Swapper dialog.
h. In the Images list, select OFF and then click Select. The Select File dialog opens.
i. Browse to the Desktop\C:\LonWorks\iLON\iLonVision\graphics\lamp folder on your
computer, choose a graphic of a lamp in the OFF state, and then click Select. This graphic
will be displayed when the Digital Output is disabled.
j. In the Images list, select ON and then click Select. The Select File dialog opens.
k. Browse to the Desktop\C:\LonWorks\iLON\iLonVision\graphics\lamp folder on your
computer, choose a graphic of a lamp in the ON state, and then click Select. This graphic will
be displayed when the Digital Output is enabled.
14. Click OK to return to your custom Web page. The lamp image you selected appears in the upper
left-hand corner of the Web page.
15. Click the image so that a move icon and a solid black box appear on top and around the image,
respectively. Click the move icon so that the box becomes red, which indicates that the layer has
been selected, and then drag the layer to the middle of the window.
17. Clear the Ask Next Time check box to prevent this dialog from appearing each time you try to
publish a custom Web page. Click Yes to publish your custom Web page.
1. Click the Choose button ( ) on the Editor toolbar. The Select File dialog opens.
2. Click the index.htm file on the SmartServer flash disk.
22
3. Click OK. Your SmartServer’s home page appears in the browser.
4. Enter the user name and password for logging in to your SmartServer, if prompted. The default
user name and password are ilon.
5. Click Edit on the Editor toolbar ( ) or click the Layout tab to begin editing your SmartServer’s
home page.
6. Create a button that will the link to your custom SmartServer 2.2 Web page following these steps:
a. Click the ATU Page button after the ‘e’ in “Page” and then press ENTER. A new button is
added directly below the ATU Page button.
e. Click OK. A “Custom Web Page” link appears on the new button.
24
7. Click Publish on the Editor toolbar ( ), click File and then click Publish, or click the
Browse tab to publish your custom Web page.
8. Test the link to your custom Web page by clicking the Custom Web Page button. Your custom
Web page opens in the i.LON Vision 2.2 browser.
9. Click the switch icon to enable and disable Digital Output 1. When you click the switch icon, the
lamp icon turns on and off, indicating the current state of Digital Output 1. In addition, the
Output 1 LED on the SmartServer hardware lights and turns off when you click the switch icon.
Note: You can modify the SmartServer’s factory home page, including adding your own buttons
that link to your custom Web pages, by editing the index.htm file in the /web folder. If you
modify the SmartServer home page, you must preserve the Configuration & Service and Login
buttons at the top of the page.
This chapter describes how to create simple custom SmartServer 2.2 Web pages and
more complex Web designs that include a navigation system. It describes how to
upgrade existing custom Web pages to SmartServer 2.2 Web pages. It describes how
to add i.LON Vision objects to your custom Web pages, and design a navigation
system for your Web design.
28
2. The Preferences dialog opens.
30
Upgrading SmartServer 1.0 Web Pages to SmartServer 2.2 Pages
To automatically upgrade all existing custom SmartServer 1.0 Web pages within a folder on your
SmartServer flash disk to the SmartServer 2.2 format, follow these steps:
1. Click File and then click Convert Folder to Actual Format.
2. The Select Folder dialog opens.
3. Select the folder on your SmartServer containing the custom SmartServer 1.0 Web pages to be
upgraded, and then click OK.
4. The Converting dialog opens and the custom Web pages in the selected folder are upgraded to the
SmartServer 2.2 Web page format.
5. When all the files have been converted, click OK to close the Converting dialog.
32
Adding Data Point Read/Write Objects
You can use data point read/write objects to monitor and control SmartServer data points. Controlling
data points with these objects typically entails one click or a simple text entry. You can also use these
objects to monitor data points as they indicate the current value stored in the data point.
The following table lists, summarizes, and demonstrates the data point read and write objects that you
can add to your custom Web pages. The right column shows how each object will appear on your
published Web page when it is monitoring and controlling a SNVT_switch data point. Each object
appears slightly different when you are editing the Web page. For example, the data point name will
be displayed below the object when you edit the Web page, but not after the Web page has been
published.
i.LON Vision
Read/Write Description Graphic
Object
34
Show Value
You can use the Show Value object ( ) to display the value of a data point, the value of an
enumerated data point, or a field within a structured data point. You can use the Show Value object to
create a simple monitoring application. For example, you could use it to monitor a building with
multiple floors. You can create a Web page containing a table with rows for each floor on the
building. In each row, you can display the values of the data points used to monitor the conditions on
that floor, including the temperature, occupancy state, and any other desired settings. To add a Show
Value object to your custom SmartServer 2.2 Web page, follow these steps:
36
b. To view all the network objects on the SmartServer, including those that are currently hidden
in the navigation pane, select the Show Hidden Items check box. By default, this check box
is cleared, meaning that you can only select those objects that are currently shown on the
navigation pane.
c. Select the method for searching for the data point to be monitored. You have two choices:
• Real Name. The data points are organized in the SmartServer tree by their parent objects
using the following network hierarchy: <network>/<channel>/<device>/<functional
block>/<data point>. This is the default.
• Alias Name. Data points are alphabetized by their alias names, which correspond to their
locations in the navigation pane. You can add, edit, and enable/disable alias names for a
data point from its Configure - Data Points Web Page in the built-in SmartServer Web
pages. To do this, click the General option above the navigation pane, and then click the
data point in the navigation pane. The Alias Name property is located near the top of the
Web page. If you select this option, the data points are listed in the SmartServer tree as
follows:
o The data points of the external devices connected to the SmartServer that do not have
default alias names are listed under the [no alias] icon.
o The data points on the i.LON App (Internal) device under the LON channel are
listed in the tree with the “NVL” prefix.
38
Max Age Set the maximum period of time (in seconds) that the value of the data
point is cached before the Show Value object receives updated values.
This enables you to control the amount of traffic that is generated on a
specific channel by the object.
The SmartServer compares the Max Age value of the Show Value
object to the amount of time the data point value has been cached in its
internal data server, and then does the following:
• If Max Age is less than the period of time the data point value has
been cached, the SmartServer’s internal data server polls the data
point and returns the updated value to the object.
• If Max Age is greater than the period of time the data point value
has been cached, the SmartServer’s internal data server returns the
cached value to the object.
• If Max Age is disabled, the SmartServer’s internal data server
returns a cached value to the object regardless how old the data
point is. This is the default.
• If Max Age is set to 0, the SmartServer’s internal data server polls
the data point and returns the updated value to the object
regardless how current the data point is.
Precision Enter the number of significant decimal digits with which a data point
value is expressed.
For example, a data point value of 32.568 is rounded to 32.6 (rounded
to the tenth digit) if the precision is 1, and it is rounded to 32.57
(rounded to the hundredth digit) if the precision is 2.
The default and maximum precision are both 3, meaning the decimal
values are rounded to the thousandth digit.
Show Presets Select this option to display the data point’s global presets (if
defined) instead of its raw value. This option is cleared by default
meaning that the raw value of the data point is displayed.
A preset is a string that represents a specific raw value for a data point.
A global preset is a preset that is defined in the data point's
configuration. Global presets are available in all instances of all
applicable i.LON Vision objects.
You can add, edit, and delete global presets for a data point from its
Configure - Data Points Web Page in the built-in SmartServer Web
pages. To do this, click the General option above the navigation pane,
and then click the data point in the navigation pane. The options for
presets are located at the bottom of the Web page.
Notes: To use a preset for a field within a structured data point, select
the Use Local Presets check box, click Edit, and create presets for the
field. The Show Presets option is incompatible with the fields of
structured data points. If you selected a data point field in step 4,
selecting this option resets the data point to the entire structure.
6. Click OK. The Show Value object is added to your custom SmartServer 2.2 Web page. By
default, the object is positioned in the upper-left hand corner of your Web page (unless you
specified its position with the Left and Top properties). If you selected the Layer option, drag the
layer containing the object to the desired position on your custom SmartServer 2.2 Web page.
40
7. Click Publish on the Editor toolbar ( ), click File and then click Publish, or click the
Browse tab to publish your custom Web page.
Text Field
The Text Field object ( ) is a text box that displays the current value of a scalar
data point, an enumerated data point, or a field within a structured data point. The user can write to the
data point or field by entering a new value in the text box. To add a Text Field object to your custom
SmartServer 2.2 Web page, follow these steps:
42
o The virtual data points on the i.LON App (System) device are listed in the tree with
the “iLON System” prefix.
Note: Only select the Prog button if you are creating a custom app configuration
Web page.
d. Expand the network, channel, device, and then the functional block of the data point to be
monitored, and then click the desired data point. If the data point has a structured type, you
can expand the data point and select a field within the structure.
e. Click OK to return to the Text Field dialog. The Name property is updated to show the name
of the data point in the following format: <network>/<channel>/<device>/<functional
block>/<data point>.
The Format property is updated to show the format description of the selected data point.
The format description consists of the data point’s program ID; SNVT, SCPT, UNVT, UCPT,
or built-in data type; and format (for example, SI metric or US customary). If the data point
supports multiple formats, you can manually change the format used for the data point. Using
a SNVT_temp_f data point for example, you can change the format to #US, #SI, or #US_Diff
or append one of these formats to the data point name if no format is specified.
5. Optionally, if you selected a field within a structured data point, you can set constant values to be
written to one to all of the other fields in the data point automatically when a value is written to
the selected field. This ensures that the other field or fields in the structured data point are set to
specific values whenever the Text Field object is used on the selected field.
Using a SNVT_switch data point for example, you can have SNVT_switch.state be set to 1 each
time a value is written to SNVT_switch.value.
To set constant values for the other fields in a structured data point, follow these steps:
a. Click Const Fields. The Constant Fields dialog opens.
44
Max Age Set the maximum period of time (in seconds) that the value of the data
point is cached before the Text Field object receives updated values.
This enables you to control the amount of traffic that is generated on a
specific channel by the object.
The SmartServer compares the Max Age value of the Text Field
object to the amount of time the data point value has been cached in its
internal data server, and then does the following:
• If Max Age is less than the period of time the data point value has
been cached, the SmartServer’s internal data server polls the data
point and returns the updated value to the object.
• If Max Age is greater than the period of time the data point value
has been cached, the SmartServer’s internal data server returns the
cached value to the object.
• If Max Age is disabled, the SmartServer’s internal data server
returns a cached value to the object regardless how old the data
point is. This is the default.
• If Max Age is set to 0, the SmartServer’s internal data server polls
the data point and returns the updated value to the object
regardless how current the data point is.
Precision Enter the number of significant decimal digits with which a data point
value is expressed.
For example, a data point value of 32.568 is rounded to 32.6 (rounded
to the tenth digit) if the precision is 1, and it is rounded to 32.57
(rounded to the hundredth digit) if the precision is 2.
The default and maximum precision are both 3, meaning the decimal
values are rounded to the thousandth digit.
Write Priority Assign the priority the Text Field object has for writing updated
values to the data point. This value may range from 0 to 255 (highest
to lowest priority).
The priority you specify must be equal to or higher than the priority
used by the last application that updated the data point. If you set a
priority that is less than priority used by the last application that
updated the data point, a red hand icon ( ) appears to the left of the
data point when you publish your custom Web page. You will need to
edit the page and enter a higher priority in this dialog to be able to
write to the data point.
If you set a priority that is equal to or higher than that assigned to the
last application or object that updated the data point, a green hand icon
( ) appears to the left of the data point. Lower priority applications or
objects can write to the data point when one of the following events
occurs:
• The user clicks the green hand icon to unlock the data point
(temporarily reset the Text Field object’s priority to 255) so that
lower priority applications or objects can write to the data point.
When the user enters an updated value in the text field, the Text
Field object will have the data point locked again (the priority
returns to the value you specified).
46
Show Unit Select this option to display the data point’s unit string (if enabled and
defined). This option is cleared by default meaning that the unit string
is not displayed.
You can enable/disable and edit the unit string defined for a data point
on its Configure - Data Points Web page on the SmartServer. You
can access this Web page from the built-in SmartServer Web interface
by clicking General, and then clicking the data point in the
SmartServer tree.
By default, the Unit String option in the Configure - Data Points
Web page is selected, meaning that the unit string can be displayed on
your custom Web pages. You can edit the unit string and the revised
unit string will appear in your custom Web pages. You can clear Unit
String to disable the appearance of the unit string on your custom Web
pages.
Use Local Presets Select this option and click Edit to open the Local Presets dialog, and
create presets for this individual Text Field object. This option is
cleared by default meaning that local presets are not used.
A local preset is a preset that applies to a specific instance of an i.LON
Vision object. Local presets are especially useful if you selected a
field within a structured data point and you want to represent the
current value of the field using a simple, meaningful string instead of a
raw value. You cannot select the Show Presets check box to use
“global” presets for a field within a structured data point.
8. Click OK. The Text Field object is added to your custom SmartServer 2.2 Web page. By
default, the object is positioned in the upper-left hand corner of your Web page (unless you
specified its position with the Left and Top properties). If you selected the Layer option, drag the
layer containing the object to the desired position on your custom SmartServer 2.2 Web page.
9. Click Publish on the Editor toolbar ( ), click File and then click Publish, or click the
Browse tab to publish your custom Web page.
Text Area
The Text Area object ( ) is a text box that lists the most recent values assigned to a
scalar data point, an enumerated data point, or a field within a structured data point. Optionally, you
can configure this object to allow a user to write to the data point or field by entering a new value in
the text area. To add a Text Area object to your custom SmartServer 2.2 Web page, follow these
steps:
4. Select the data point to be monitored by the Text Area object following these steps:
a. In the Data Point property, click Select. The Select Data Points dialog opens.
b. To view all the network objects on the SmartServer, including those that are currently hidden
in the navigation pane, select Show Hidden Items. By default, this option is cleared,
meaning that you can only select those objects that are currently shown on the navigation
pane.
48
c. Select the method for searching for the data point to be monitored. You have two choices:
• Real Name. The data points are organized in the SmartServer tree by their parent objects
using the following network hierarchy: <network>/<channel>/<device>/<functional
block>/<data point>. This is the default.
• Alias Name. Data points are alphabetized by their alias names, which correspond to their
locations in the navigation pane. You can add, edit, and enable/disable alias names for a
data point from its Configure - Data Points Web Page in the built-in SmartServer Web
pages. To do this, click the General option above the navigation pane, and then click the
data point in the navigation pane. The Alias Name property is located near the top of the
Web page. If you select this option, the data points are listed in the SmartServer tree as
follows:
o The data points of the external devices connected to the SmartServer that do not have
default alias names are listed under the [no alias] icon.
o The data points on the i.LON App (Internal) device under the LON channel are
listed in the tree with the “NVL” prefix.
o The virtual data points on the i.LON App (System) device are listed in the tree with
the “iLON System” prefix.
Note: Only select the Prog button if you are creating a custom app configuration Web
page.
d. Expand the network, channel, device, and then the functional block of the data point to be
monitored, and then click the desired data point. If the data point has a structured type, you
can expand the data point and select a field within the structure.
e. Click OK to return to the Text Area dialog. The Name property is updated to show the name
of the data point in the following format: <network>/<channel>/<device>/<functional
block>/<data point>.
The Format property is updated to show the format description of the selected data point.
The format description consists of the data point’s program ID; SNVT, SCPT, UNVT, UCPT,
or built-in data type; and format (for example, SI metric or US customary). If the data point
supports multiple formats, you can manually change the format used for the data point. Using
a SNVT_temp_f data point for example, you can change the format to #US, #SI, or #US_Diff
or append one of these formats to the data point name if no format is specified.
5. Optionally, if you selected a field within a structured data point, you can set constant values to be
written to one to all of the other fields in the data point automatically when a value is written to
the selected field. This ensures that the other field or fields in the structured data point are set to
specific values whenever the Text Area object is used on the selected field.
Using a SNVT_switch data point for example, you can have SNVT_switch.state be set to 1 each
time a value is written to SNVT_switch.value.
To set constant values for the other fields in a structured data point, follow these steps:
a. Click Const Fields. The Constant Fields dialog opens.
b. The data point field you selected in step 4 is marked as “[dynamic]”.
c. Click the data point field to be set to a constant value.
d. In the Value field, set the constant value to be written to the data point field selected in step d.
e. Click Save.
f. Repeat steps c–e for any other fields in the structured data point to be set to constant values.
g. Click OK to return to the Text Area dialog.
50
Max Age Set the maximum period of time (in seconds) that the value of the data
point is cached before the Text Area object receives updated values.
This enables you to control the amount of traffic that is generated on a
specific channel by the object.
The SmartServer compares the Max Age value of the Text Area
object to the amount of time the data point value has been cached in its
internal data server, and then does the following:
• If Max Age is less than the period of time the data point value has
been cached, the SmartServer’s internal data server polls the data
point and returns the updated value to the object.
• If Max Age is greater than the period of time the data point value
has been cached, the SmartServer’s internal data server returns the
cached value to the object.
• If Max Age is disabled, the SmartServer’s internal data server
returns a cached value to the object regardless how old the data
point is. This is the default.
• If Max Age is set to 0, the SmartServer’s internal data server polls
the data point and returns the updated value to the object
regardless how current the data point is.
Precision Enter the number of significant decimal digits with which a data point
value is expressed.
For example, a data point value of 32.568 is rounded to 32.6 (rounded
to the tenth digit) if the precision is 1, and it is rounded to 32.57
(rounded to the hundredth digit) if the precision is 2.
The default and maximum precision are both 3, meaning the decimal
values are rounded to the thousandth digit.
Write Priority Assign the priority the Text Area object has for writing updated values
to the data point. This value may range from 0 to 255 (highest to
lowest priority).
The priority you specify must be equal to or higher than the priority
used by the last application that updated the data point. If you set a
priority that is less than priority used by the last application that
updated the data point, a red hand icon ( ) appears to the left of the
data point when you publish your custom Web page. You will need to
edit the page and enter a higher priority in this dialog to be able to
write to the data point.
If you set a priority that is equal to or higher than that assigned to the
last application or object that updated the data point, a green hand icon
( ) appears to the left of the data point. Lower priority applications or
objects can write to the data point when one of the following events
occurs:
• The user clicks the green hand icon to unlock the data point
(temporarily reset the Text Area object’s priority to 255) so that
lower priority applications or objects can write to the data point.
When the user enters an updated value in the text field, the Text
Area object will have the data point locked again (the priority
returns to the value you specified).
52
Force Round to Rounds the raw value of the data point to the raw value of the nearest
Preset preset defined for the data point so that the preset is displayed on your
custom Web page. This property is only available if the Show Presets
option is selected.
Consider a SNVT_temp_p data point, which has the following presets
defined for it:
OCCUPIED 69.8
UNOCCUPIED 60.8
STANDBY 19.994
If the raw value of the SNVT_temp_p data point is 30, STANDBY is
displayed on your custom Web page. If the raw value of the data point
is 45, UNOCCUPIED is displayed.
Show Unit Select this option to display the data point’s unit string (if enabled and
defined). This option is cleared by default meaning that the unit string
is not displayed.
You can enable/disable and edit the unit string defined for a data point
on its Configure - Data Points Web page on the SmartServer. You
can access this Web page from the built-in SmartServer Web interface
by clicking General, and then clicking the data point in the
SmartServer tree.
By default, the Unit String check box in the Configure - Data Points
Web page is selected, meaning that the unit string can be displayed on
your custom Web pages. You can edit the unit string and the revised
unit string will appear in your custom Web pages. You can clear the
Unit String option to disable the appearance of the unit string on your
custom Web pages.
Use Local Presets Select this option and click Edit to open the Local Presets dialog, and
create presets for this individual Text Field object. This option is
cleared by default meaning that local presets are not used.
A local preset is a preset that applies to a specific instance of an i.LON
Vision object. Local presets are especially useful if you selected a
field within a structured data point and you want to represent the
current value of the field using a simple, meaningful string instead of a
raw value. You cannot select Show Presets to use global presets for a
field within a structured data point.
8. Click OK. The Text Area object is added to your custom SmartServer 2.2 Web page. By default,
the object is positioned in the upper-left hand corner of your Web page (unless you specified its
position with the Left and Top properties). If you selected the Layer option, drag the layer
containing the object to the desired position on your custom SmartServer 2.2 Web page.
9. Click Publish on the Editor toolbar ( ), click File and then click Publish, or click the
Browse tab to publish your custom Web page.
Combo Box
The Combo Box object ( ) is a combo box that displays the current value of a scalar data
point, an enumerated data point, or a field within a structured data point. The user can write to the data
point or field by entering a value in the text box or selecting one of the presets defined for the data
4. Select the data point to be monitored and controlled by the Combo Box object following these
steps:
a. In the Data Point box, click Select. The Select Data Points dialog opens.
54
b. To view all the network objects on the SmartServer, including those that are currently hidden
in the navigation pane on the built-in SmartServer Web interface, select Show Hidden Items.
By default, this option is cleared, meaning that you can only select those objects that are
currently shown on the navigation pane.
c. Select the method for searching for the data point to be monitored. You have two choices:
• Real Name. The data points are organized in the SmartServer tree by their parent objects
using the following network hierarchy: <network>/<channel>/<device>/<functional
block>/<data point>. This is the default.
• Alias Name. Data points are alphabetized by their alias names, which correspond to their
locations in the navigation pane. You can add, edit, and enable/disable alias names for a
data point from its Configure - Data Points Web Page in the built-in SmartServer Web
pages. To do this, click the General option above the navigation pane, and then click the
data point in the navigation pane. The Alias Name property is located near the top of the
Web page. If you select this option, the data points are listed in the SmartServer tree as
follows:
o The data points of the external devices connected to the SmartServer that do not have
default alias names are listed under the [no alias] icon.
o The data points on the i.LON App (Internal) device under the LON channel are
listed in the tree with the “NVL” prefix.
o The virtual data points on the i.LON App (System) device are listed in the tree with
the “iLON System” prefix.
Note: Only select the Prog button if you are creating a custom app configuration Web
page.
d. Expand the network, channel, device, and then the functional block of the data point to be
monitored, and then click the desired data point. If the data point has a structured type, you
can expand the data point and select a field within the structure.
e. Click OK to return to the Combo Box dialog. The Name property is updated to show the
name of the data point in the following format: <network>/<channel>/<device>/<functional
block>/<data point>.
The Format property is updated to show the format description of the selected data point.
The format description consists of the data point’s program ID; SNVT, SCPT, UNVT, UCPT,
or built-in data type; and format (for example, SI metric or US customary). If the data point
supports multiple formats, you can manually change the format used for the data point. Using
a SNVT_temp_f data point for example, you can change the format to #US, #SI, or #US_Diff
or append one of these formats to the data point name if no format is specified.
5. Optionally, if you selected a field within a structured data point, you can set constant values to be
written to one to all of the other fields in the data point automatically when a value is written to
the selected field. This ensures that the other field or fields in the structured data point are set to
specific values whenever the Combo Box object is used on the selected field.
Using a SNVT_switch data point for example, you can have SNVT_switch.state be set to 1 each
time a value is written to SNVT_switch.value.
To set constant values for the other fields in a structured data point, follow these steps:
a. Click Const Fields. The Constant Fields dialog opens.
b. The data point field you selected in step 4 is marked as “[dynamic]”.
c. Click the data point field to be set to a constant value.
d. In the Value field, set the constant value to be written to the data point field selected in step d.
56
Max Age Set the maximum period of time (in seconds) that the value of the data
point is cached before the Combo Box object receives updated values.
This enables you to control the amount of traffic that is generated on a
specific channel by the object.
The SmartServer compares the Max Age value of the Combo Box
object to the amount of time the data point value has been cached in its
internal data server, and then does the following:
• If Max Age is less than the period of time the data point value has
been cached, the SmartServer’s internal data server polls the data
point and returns the updated value to the object.
• If Max Age is greater than the period of time the data point value
has been cached, the SmartServer’s internal data server returns the
cached value to the object.
• If Max Age is disabled, the SmartServer’s internal data server
returns a cached value to the object regardless how old the data
point is. This is the default.
• If Max Age is set to 0, the SmartServer’s internal data server polls
the data point and returns the updated value to the object
regardless how current the data point is.
Precision Enter the number of significant decimal digits with which a data point
value is expressed.
For example, a data point value of 32.568 is rounded to 32.6 (rounded
to the tenth digit) if the precision is 1, and it is rounded to 32.57
(rounded to the hundredth digit) if the precision is 2.
The default and maximum precision are both 3, meaning the decimal
values are rounded to the thousandth digit.
58
Force Round to Rounds the raw value of the data point to the raw value of the nearest
Preset preset defined for the data point so that the preset is displayed on your
custom Web page. This property is only available if Show Presets is
selected.
Consider a SNVT_temp_p data point, which has the following presets
defined for it:
OCCUPIED 69.8
UNOCCUPIED 60.8
STANDBY 19.994
If the raw value of the SNVT_temp_p data point is 30, STANDBY is
displayed on your custom Web page. If the raw value of the data point
is 45, UNOCCUPIED is displayed.
Show Unit Select this option to display the data point’s unit string (if enabled and
defined). This option is cleared by default meaning that the unit string
is not displayed.
You can enable/disable and edit the unit string defined for a data point
on its Configure - Data Points Web page on the SmartServer. You
can access this Web page from the built-in SmartServer Web interface
by clicking General, and then clicking the data point in the
SmartServer tree.
By default, Unit String in the Configure - Data Points Web page is
selected, meaning that the unit string can be displayed on your custom
Web pages. You can edit the unit string and the revised unit string will
appear in your custom Web pages. You can clear the Unit String
option to disable the appearance of the unit string on your custom Web
pages.
Use Local Presets Select this option and click Edit to open the Local Presets dialog, and
create presets for this individual Combo Box object. This option is
cleared by default meaning that local presets are not used.
A local preset is a preset that applies to a specific instance of an i.LON
Vision object. Local presets are especially useful if you selected a
field within a structured data point and you want to represent the
current value of the field using a simple, meaningful string instead of a
raw value. You cannot select Show Presets to use global presets for a
field within a structured data point.
8. Click OK. The Combo Box object is added to your custom SmartServer 2.2 Web page. By
default, the object is positioned in the upper-left hand corner of your Web page (unless you
specified its position with the Left and Top properties). If you selected the Layer check box, drag
the layer containing the object to the desired position on your custom SmartServer 2.2 Web page.
9. Click Publish on the Editor toolbar ( ), click File and then click Publish, or click the
Browse tab to publish your custom Web page.
Image Swapper
You can use the Image Swapper object to add dynamic images representing the presets defined for the
data point. When the data point is set to the value defined for the preset name, the image specified for
that data point preset appears on the Web page. Optionally, you can configure the Image Swapper
object so that the user can write to the data point by clicking the image on the Web page. To add an
Image Swapper object ( ) to your custom SmartServer 2.2 Web page, follow these steps:
60
4. Select the data point to be monitored by the Image Swapper object following these steps:
a. In the Data Point box, click Select. The Select Data Points dialog opens.
b. To view all the network objects on the SmartServer, including those that are currently hidden
in the navigation pane on the built-in SmartServer Web interface, select Show Hidden Items.
By default, this option is cleared, meaning that you can only select those objects that are
currently shown on the navigation pane.
c. Select the method for searching for the data point to be monitored. You have two choices:
• Real Name. The data points are organized in the SmartServer tree by their parent objects
using the following network hierarchy: <network>/<channel>/<device>/<functional
block>/<data point>. This is the default.
• Alias Name. Data points are alphabetized by their alias names, which correspond to their
locations in the navigation pane. You can add, edit, and enable/disable alias names for a
data point from its Configure - Data Points Web Page in the built-in SmartServer Web
pages. To do this, click the General option above the navigation pane, and then click the
data point in the navigation pane. The Alias Name property is located near the top of the
62
b. Click Select to open the Select File dialog, browse to the LONWORKS
iLON\iLonVision\graphics\<category> folder on your computer or the /web/images and
/web/user/demo/images folders on your SmartServer flash disk, click the desired image, and
then click OK. The selected image appears in the Images box.
c. Optionally, you can define a default image to be displayed when the value stored in the data
point does not correspond to any of the presets defined for it. To do this, click <default>: in
the Images box, and follow step b to select a default image.
d. To change the image assigned to a preset, select the preset from the Images box and click
Select to associate a new image with the preset. To remove an image from a preset so that it
has no graphics associated with it, select the preset from the Images box and click Delete. To
change the order of the presets, click Up or Down. To refresh the list of presets displayed,
click Refresh.
Note: You can add, edit, and delete presets for a data point from its Configure - Data Points
Web Page in the built-in SmartServer Web pages. To do this, click the General button above
the navigation pane on the left side of the SmartServer Web interface, and then click the data
point in the navigation pane. The options for presets are located at the bottom of the Web
page.
64
Write Priority Assign the priority the Image Swapper object has for writing updated
values to the data point. This value may range from 0 to 255 (highest
to lowest priority).
The priority you specify must be equal to or higher than the priority
used by the last application that updated the data point. If you set a
priority that is less than priority used by the last application that
updated the data point, a red hand icon ( ) appears to the left of the
data point when you publish your custom Web page. You will need to
edit the page and enter a higher priority in this dialog to be able to
write to the data point.
If you set a priority that is equal to or higher than that assigned to the
last application or object that updated the data point, a green hand icon
( ) appears to the left of the data point. Other applications or objects
can write to the data point when one of the following events occurs:
• The user clicks the green hand icon to unlock the data point
(temporarily reset the Image Swapper object’s priority to 255) so
that lower priority applications or objects can write to the data
point. When the user enters an updated value in the text field, the
Image Swapper object will have the data point locked again (the
priority returns to the value you specified).
• The lower priority application or object specifies a priority that is
equal to or higher than the one you specified for the Image
Swapper object.
For more information on using priorities, see Using Data Point
Priorities later in this chapter.
Switchable By default, a user can click the image to change the data point’s value.
You can clear this option if the value of the selected data point is to be
monitored only.
The value written to the data point when the image is clicked depends
on the order that the presets are listed in the Images List box. The
SmartServer will proceed through the list from top to bottom each time
the image is clicked.
Consider a data point that has the following five presets (listed in
order): OFF, ON, HOLIDAY, WEEKEND, CLOSED. If the data
point is set to OFF and a user clicks the image, it will be set to ON,
which is the next value in the list. If the user clicks it again, it will be
set to HOLIDAY. If the user clicks it again, it will be set to
WEKEND, and then CLOSED, and so on. When it reaches the bottom
of the list, the SmartServer will start over from the top.
9. Click OK. The Image Swapper object is added to your custom SmartServer 2.2 Web page. By
default, the object is positioned in the upper-left hand corner of your Web page (unless you
specified its position with the Left and Top properties). If you selected the Layer option, drag the
layer containing the object to the desired position on your custom SmartServer 2.2 Web page.
10. Click Publish on the Editor toolbar ( ), click File and then click Publish, or click the
Browse tab to publish your custom Web page.
Radio Buttons
The Radio Buttons object provides radio buttons for each preset or enumerated value defined for a
scalar data point, or each enumerated value defined for a field within a structured data point. The
current value stored in the data point is indicated by the button that is selected. The user can write to
the data point by selecting one of the buttons. To add a Radio Buttons object to your custom
SmartServer 2.2 Web page, follow these steps:
66
3. The Radio Buttons dialog opens.
4. Select the data point to be monitored by the Radio Buttons object following these steps:
a. In the Data Point property, click Select. The Select Data Points dialog opens.
b. To view all the network objects on the SmartServer, including those that are currently hidden
in the navigation pane on the built-in SmartServer Web interface, select Show Hidden Items.
By default, this option is cleared, meaning that you can only select those objects that are
currently shown on the navigation pane.
c. Select the method for searching for the data point to be monitored. You have two choices:
• Real Name. The data points are organized in the SmartServer tree by their parent objects
using the following network hierarchy: <network>/<channel>/<device>/<functional
block>/<data point>. This is the default.
68
object will be disabled temporarily until the specified Feedback data point receives the data point
update.
Note: You can bind the Feedback data point you selected to the Data Point via device hardware,
a LONWORKS connection, or a Web connection.
7. Optionally, configure the following properties of the Radio Buttons object:
Layer By default, the Layer option is selected. This means that the Radio
Buttons object is embedded in a Layer object, which lets you freely
move the Radio Buttons object in your custom Web page. To move a
Layer, click its moving icon, and then use the arrow keys to move it.
Clearing this option means that you must position the Radio Buttons
object as you would any other HTML object. This may be useful if
you want to place the Radio Buttons object in a table.
You can set the following properties to position and size the object:
• The Left and Top properties determine the object’s position from
the upper left-hand corner of the Web page (in pixels). You can
set these properties to position the object instead of dragging the
Layer object containing it.
• The Width and the Height properties determine the size of the
object (in pixels). You can set these properties to size the object
instead of expanding and collapsing the Layer object containing it.
• The Z-Index property determines the object’s background depth
compared to objects it overlaps with, with 1 (the default) being in
the back and higher values being in front.
When positioning the Radio Buttons object, leave space for menu,
page title, or sidebar objects that you may want to add to your Web
page. This will help prevent you from accidentally overlapping
objects.
Max Age Set the maximum period of time (in seconds) that the value of the data
point is cached before the Radio Buttons object receives updated
values. This enables you to control the amount of traffic that is
generated on a specific channel by the object.
The SmartServer compares the Max Age value of the Radio Buttons
object to the amount of time the data point value has been cached in its
internal data server, and then does the following:
• If Max Age is less than the period of time the data point value has
been cached, the SmartServer’s internal data server polls the data
point and returns the updated value to the object.
• If Max Age is greater than the period of time the data point value
has been cached, the SmartServer’s internal data server returns the
cached value to the object.
• If Max Age is disabled, the SmartServer’s internal data server
returns a cached value to the object regardless how old the data
point is. This is the default.
• If Max Age is set to 0, the SmartServer’s internal data server polls
the data point and returns the updated value to the object
regardless how current the data point is.
Note: You can add, edit, and delete presets for a data point from its Configure - Data Points Web
Page in the built-in SmartServer Web pages. To do this, click the General button above the
navigation pane, and then click the data point in the navigation pane. The options for presets are
located at the bottom of the Web page.
8. Click OK. The Radio Buttons object is added to your custom SmartServer 2.2 Web page. By
default, the object is positioned in the upper-left hand corner of your Web page (unless you
specified its position with the Left and Top properties). If you selected the Layer check box, drag
the layer containing the object to the desired position on your custom SmartServer 2.2 Web page.
70
9. Click Publish on the Editor toolbar ( ), click File and then click Publish, or click the
Browse tab to publish your custom Web page.
Select Box
The Select Box object is a drop-down combo box that displays the current value of a scalar data point,
enumerated data point, or a field within a structured data point. The user can write to the data point or
field by selecting a preset or enumeration from the attached list box. To add a Select Box object to
your custom SmartServer 2.2 Web page, follow these steps:
72
d. Expand the network, channel, device, and then the functional block of the data point to be
monitored, and then click the desired data point. If the data point has a structured type, you
can expand the data point and select a field within the structure.
e. Click OK to return to the Select Box dialog. The Name property is updated to show the
name of the data point in the following format: <network>/<channel>/<device>/<functional
block>/<data point>.
The Format property is updated to show the format description of the selected data point.
The format description consists of the data point’s program ID; SNVT, SCPT, UNVT, UCPT,
or built-in data type; and format (for example, SI metric or US customary). If the data point
supports multiple formats, you can manually change the format used for the data point. Using
a SNVT_temp_f data point for example, you can change the format to #US, #SI, or #US_Diff
or append one of these formats to the data point name if no format is specified.
5. Optionally, if you selected a field within a structured data point, you can set constant values to be
written to one to all of the other fields in the data point automatically when a value is written to
the selected field. This ensures that the other field or fields in the structured data point are set to
specific values whenever the Select Box object is used on the selected field.
Using a SNVT_switch data point for example, you can have SNVT_switch.state be set to 1 each
time a value is written to SNVT_switch.value.
To set constant values for the other fields in a structured data point, follow these steps:
a. Click Const Fields. The Constant Fields dialog opens.
b. The data point field you selected in step 4 is marked as “[dynamic]”.
c. Click the data point field to be set to a constant value.
d. In the Value field, set the constant value to be written to the data point field.
e. Click Save.
f. Repeat steps c–e for any other fields in the structured data point to be set to constant values.
g. Click OK to return to the Select Box dialog.
6. Optionally, you can specify a feedback data point. To do this, you click Select in the Feedback
property, and select the feedback data point in the Data Points dialog following step 4.
The Select Box object will display the value of the specified Feedback data point, as updated
values are being written to the data point specified in the Data Point field (the data point you
selected in step 4). If you use the Select Box object to write a value to the Data Point, the object
will be disabled temporarily until the specified Feedback data point receives the data point
update.
Note: You can bind the Feedback data point you selected to the Data Point via device hardware,
a LONWORKS connection, or a Web connection.
7. Optionally, configure the following properties of the Select Box object:
74
Write Priority Assign the priority the Select Box object has for writing updated
values to the data point. This value may range from 0 to 255 (highest
to lowest priority).
The priority you specify must be equal to or higher than the priority
used by the last application that updated the data point. If you set a
priority that is less than priority used by the last application that
updated the data point, a red hand icon ( ) appears to the left of the
data point when you publish your custom Web page. You will need to
edit the page and enter a higher priority in this dialog to be able to
write to the data point.
If you set a priority that is equal to or higher than that assigned to the
last application or object that updated the data point, a green hand icon
( ) appears to the left of the data point. Other applications or objects
can write to the data point when one of the following events occurs:
• The user clicks the green hand icon to unlock the data point
(temporarily reset the Select Box object’s priority to 255) so that
lower priority applications or objects can write to the data point.
When the user enters an updated value in the text field, the Select
Box object will have the data point locked again (the priority
returns to the value you specified).
• The lower priority application or object specifies a priority that is
equal to or higher than the one you specified for the Select Box
object.
For more information on using priorities, see Using Data Point
Priorities in Chapter 4.
Width Optionally, you can enter the width of the select box (in pixels). By
default, the width of the Select Box object is set to fit the preset or
enumerated value with the longest name.
Height Enter the height of the Select Box object (in pixels). The default
height is 1.
Use Local Presets Select this option and click Edit to open the Local Presets dialog, and
create presets for this individual Select Box object. This option is
cleared by default meaning that local presets are not used.
A local preset is a preset that applies to a specific instance of an i.LON
Vision object. Local presets are especially useful if you selected a
field within a structured data point and you want to represent the
current value of the field using a simple, meaningful string instead of a
raw value.
8. Click OK. The Select Box object is added to your custom SmartServer 2.2 Web page. By
default, the object is positioned in the upper-left hand corner of your Web page (unless you
specified its position with the Left and Top properties). If you selected the Layer option, drag the
layer containing the object to the desired position on your custom SmartServer 2.2 Web page.
9. Click Publish on the Editor toolbar ( ), click File and then click Publish, or click the
Browse tab to publish your custom Web page.
Check Box
The Check Box object is a check box that represents the first preset defined for the data point when
checked, and representing the second preset defined for the data point when cleared. The user can
4. Select the data point to be monitored by the Check Box object following these steps:
a. In the Data Point property, click Select. The Select Data Points dialog opens.
b. To view all the network objects on the SmartServer, including those that are currently hidden
in the navigation pane on the built-in SmartServer Web interface, select Show Hidden Items.
76
By default, this option is cleared, meaning that you can only select those objects that are
currently shown on the navigation pane.
c. Select the method for searching for the data point to be monitored. You have two choices:
• Real Name. The data points are organized in the SmartServer tree by their parent objects
using the following network hierarchy: <network>/<channel>/<device>/<functional
block>/<data point>. This is the default.
• Alias Name. Data points are alphabetized by their alias names, which correspond to their
locations in the navigation pane. You can add, edit, and enable/disable alias names for a
data point from its Configure - Data Points Web Page in the built-in SmartServer Web
pages. To do this, click the General option above the navigation pane, and then click the
data point in the navigation pane. The Alias Name property is located near the top of the
Web page. If you select this option, the data points are listed in the SmartServer tree as
follows:
o The data points of the external devices connected to the SmartServer that do not have
default alias names are listed under the [no alias] icon.
o The data points on the i.LON App (Internal) device under the LON channel are
listed in the tree with the “NVL” prefix.
o The virtual data points on the i.LON App (System) device are listed in the tree with
the “iLON System” prefix.
Note: Only select the Prog button if you are creating a custom app configuration Web
page.
d. Expand the network, channel, device, and then the functional block of the data point to be
monitored, and then click the desired data point. If the data point has a structured type, you
can expand the data point and select a field within the structure.
e. Click OK to return to the Check Box dialog. The Name property is updated to show the
name of the data point in the following format: <network>/<channel>/<device>/<functional
block>/<data point>.
The Format property is updated to show the format description of the selected data point.
The format description consists of the data point’s program ID; SNVT, SCPT, UNVT, UCPT,
or built-in data type; and format (for example, SI metric or US customary). If the data point
supports multiple formats, you can manually change the format used for the data point. Using
a SNVT_temp_f data point for example, you can change the format to #US, #SI, or #US_Diff
or append one of these formats to the data point name if no format is specified.
5. Optionally, you can specify a feedback data point. To do this, click Select in the Feedback
property, and select the feedback data point in the Data Points dialog following step 4.
The Check Box object will display the value of the specified Feedback data point, as updated
values are being written to the data point specified in the Data Point field (the data point you
selected in step 4). If you use the Check Box object to write a value to the Data Point, the object
will be disabled temporarily until the specified Feedback data point receives the data point
update.
Note: You can bind the Feedback data point you selected to the Data Point via device hardware,
a LONWORKS connection, or a Web connection.
6. Specify the presets to be written to the data point when the user selects and clears the check box.
If the data point has pre-defined ON and OFF presets such as a SNVT_switch data point, you can
skip this step. To specify the presets for the data point, follow these steps:
a. In the Checked Value and Unchecked Value properties, click Preset. The Select Preset
dialog opens.
78
Max Age Set the maximum period of time (in seconds) that the value of the data
point is cached before the Check Box object receives updated values.
This enables you to control the amount of traffic that is generated on a
specific channel by the object.
The SmartServer compares the Max Age value of the Check Box
object to the amount of time the data point value has been cached in its
internal data server, and then does the following:
• If Max Age is less than the period of time the data point value has
been cached, the SmartServer’s internal data server polls the data
point and returns the updated value to the object.
• If Max Age is greater than the period of time the data point value
has been cached, the SmartServer’s internal data server returns the
cached value to the object.
• If Max Age is disabled, the SmartServer’s internal data server
returns a cached value to the object regardless how old the data
point is. This is the default.
• If Max Age is set to 0, the SmartServer’s internal data server polls
the data point and returns the updated value to the object
regardless how current the data point is.
Write Priority Assign the priority the Check Box object has for writing updated
values to the data point. This value may range from 0 to 255 (highest
to lowest priority).
The priority you specify must be equal to or higher than the priority
used by the last application that updated the data point. If you set a
priority that is less than priority used by the last application that
updated the data point, a red hand icon ( ) appears to the left of the
data point when you publish your custom Web page. You will need to
edit the page and enter a higher priority in this dialog to be able to
write to the data point.
If you set a priority that is equal to or higher than that assigned to the
last application or object that updated the data point, a green hand icon
( ) appears to the left of the data point. Other applications or objects
can write to the data point when one of the following events occurs:
• The user clicks the green hand icon to unlock the data point
(temporarily reset the Check Box object’s priority to 255) so that
lower priority applications or objects can write to the data point.
When the user enters an updated value in the text field, the Check
Box object will have the data point locked again (the priority
returns to the value you specified).
• The lower priority application or object specifies a priority that is
equal to or higher than the one you specified for the Check Box
object.
For more information on using priorities, see Using Data Point
Priorities in Chapter 4.
8. Click OK. The Check Box object is added to your custom SmartServer 2.2 Web page. By
default, the object is positioned in the upper-left hand corner of your Web page (unless you
specified its position with the Left and Top properties). If you selected the Layer option, drag the
layer containing the object to the desired position on your custom SmartServer 2.2 Web page.
9. Click Publish on the Editor toolbar ( ), click File and then click Publish, or click the
Browse tab to publish your custom Web page.
SVG Object
You can use the SVG Object to add a horizontal or vertical slider, gauge, knob, meter, or thermometer
representing the value of a data point or the field of a structured data point as a percentage. The user
can write to the data point or field by adjusting the object. The SVG Object is ideal for controlling
light and power levels. The following graphic illustrates the SVG object that you insert in your custom
Web pages.
To add a SVG Object to your custom SmartServer 2.2 Web page, follow these steps:
80
3. The SVG Object dialog opens.
4. Select the data point to be monitored by the SVG Object following these steps:
a. In the Data Point property, click Select. The Select Data Points dialog opens.
82
e. Click Save.
f. Repeat steps c–e for any other fields in the structured data point to be set to constant values.
g. Click OK to return to the SVG Object dialog.
6. Optionally, you can specify a feedback data point. To do this, click Select in the Feedback
property, and select the feedback data point in the Data Points dialog following step 4.
The SVG Object will display the value of the specified Feedback data point, as updated values
are being written to the data point specified in the Data Point field (the data point you selected in
step 4). If you use the SVG Object to write a value to the Data Point, the object will be disabled
temporarily until the specified Feedback data point receives the data point update.
Note: You can bind the Feedback data point you selected to the Data Point via device hardware,
a LONWORKS connection, or a Web connection.
7. Set the Minimum and Maximum values on a continuous range of possible values that the SVG
Object can represent. To write to data points without scaling their raw values, you can set the
minimum to 0 and the maximum to 100. This is useful for data points or fields within a structured
data point that have valid ranges between 0–100, such as the value field in a SNVT_switch data
point.
8. In the Presentation property, select the type of slider to be used: Horizontal Slider (the default),
Horizontal Slider 3D, Knob, Knob 3D, Vertical Slider, Vertical Slider 3D, Gauge, vuMeter.
The horizontal and vertical sliders are ideal for controlling lighting levels; the knobs and vuMeter
are ideal for controlling power levels; the thermometer is ideal for controlling temperature
setpoints and monitoring temperatures. An image of the selected SVG Object appears in the
Presentation box.
10. Click OK. The SVG Object is added to your custom SmartServer 2.2 Web page. By default, the
object is positioned in the upper-left hand corner of your Web page (unless you specified its
position with the Left and Top properties). If you selected the Layer option, drag the layer
containing the object to the desired position on your custom SmartServer 2.2 Web page.
Notes:
• When you publish a custom SmartServer Web page that includes an SVG object, the SVG
object and its image (.svg and .gif files) are copied from the LONWORKS
iLON/iLonVision/extensions/{53D26F30-C12B-11DD-9FAE-
D50A1A6F0FEF}/chrome/content/custom/svgcontrol folder on your computer to the
/web/images/iLonVisionExtensions/ folder on the SmartServer flash disk.
86
• If you want to implement an updated SVG object in an existing custom SmartServer Web
page, you need to delete the SVG object’s .svg and .gif files from the
/web/images/iLonVisionExtensions folder on the SmartServer flash disk, open the Web
pages containing the existing SVG object, double-click the SVG object, select the updated
SVG object in the Presentation property in the SVG dialog, and then publish your Web page.
11. Click Publish on the Editor toolbar ( ), click File and then click Publish, or click the
Browse tab to publish your custom Web page.
88
8. In the Script property, select your <Class Name>.js file.
9. Select the data points to be monitored and controlled by the Custom JavaScript object following
these steps:
a. Click Add. The Data Point Properties dialog opens.
g. Optionally, if you selected a field within a structured data point, you can set constant values to
be written to one to all of the other fields in the data point automatically when a value is
written to the selected field. This ensures that the other field or fields in the structured data
point are set to specific values whenever the SVG Box object is used on the selected field.
90
Using a SNVT_switch data point for example, you can have SNVT_switch.state be set to 1
each time a value is written to SNVT_switch.value.
To set constant values for the other fields in a structured data point, follow these steps:
i. Click Const Fields. The Constant Fields dialog opens.
ii. The data point field you selected in step 4 is marked as “[dynamic]”.
iii. Click the data point field to be set to a constant value.
iv. In the Value field, set the constant value to be written to the data point field.
v. Click Save.
vi. Repeat steps iii–v for any other fields in the structured data point to be set to constant
values.
vii. Click OK to return to the Select Box dialog.
h. Optionally, in the Max Age property, you can set the maximum period of time (in seconds)
that the value of the data point is cached before the Data Point View object receives updated
values. This enables you to control the amount of traffic that is generated on a specific
channel by the object.
The SmartServer compares the Max Age value of the Data Point View object to the amount
of time the data point value has been cached in its internal data server, and then does the
following:
• If Max Age is less than the period of time the data point value has been cached, the
SmartServer’s internal data server polls the data point and returns the updated value to
the object.
• If Max Age is greater than the period of time the data point value has been cached, the
SmartServer’s internal data server returns the cached value to the object.
• If Max Age is disabled, the SmartServer’s internal data server returns a cached value to
the object regardless how old the data point is. This is the default.
• If Max Age is set to 0, the SmartServer’s internal data server polls the data point and
returns the updated value to the object regardless how current the data point is.
i. Click OK to return to the Custom JavaScript dialog. The name of the selected data point,
field (if selected for a structured data point), and the Max Age property (if set) is listed in the
Data Points box.
12. Click Publish on the Editor toolbar ( ), click File and then click Publish, or click the
Browse tab to publish your custom Web page. The i.LON Vision library starts polling the
selected data points and passes them to the update method in your Custom JavaScript object if any
of their properties change.
92
Custom JavaScript Example: Reading Data Points
The following JavaScript class demonstrates how to read data point properties in a custom JavaScript
object. This JavaScript class creates four text objects that display the name, value and unit string,
status, and priority of the data point, respectively.
Note: You can use this object on any data point type.
Echelon.CustomJavascript[Show_DataPoint_Properties_Example] =
function(argObj)
{
this.update =
{
if (type==“Dp_Data”)
{
m_text0.innerHTML = item.UCPTname.get();
m_text1.innerHTML = item.UCPTvalue[0].get();
m_text1_format.innerHTML = item.UCPTvalue[0].Unit.get();
m_text2.innerHTML = item.UCPTpointStatus.get();
m_text3.innerHTML = item.UCPTpriority.get();
}
};
//read DP Name
var DP_name_text =
m_domObj.appendChild(document.createTextNode(“Data Point Name =
“));
var m_text0 =
m_domObj.appendChild(document.createElement(“text”));
var DP_value_text =
m_domObj.appendChild(document.createTextNode(“Value = “));
var m_text1 =
m_domObj.appendChild(document.createElement(“text”));
var m_text1_format =
m_domObj.appendChild(document.createElement(“text”));
var break1 = m_domObj.appendChild(document.createElement(“br”));
//read DP status
var DP_status_text =
m_domObj.appendChild(document.createTextNode(“Status = “));
//read DP priority
var DP_value_text =
m_domObj.appendChild(document.createTextNode(“Priority = “));
var m_text3 =
m_domObj.appendChild(document.createElement(“text”));
Echelon.CustomJavascript[Simple_Add_Subtract_Example] =
function(argObj)
{
this.update =
{
if (type==“Dp_Data”)
{
m_textarea.innerHTML = item.UCPTvalue[0].get();
m_span.innerHTML = item.UCPTname.get();
m_myDp = item;
}
};
94
value--;
m_myDp.UCPTvalue.splice(0, m_myDp.UCPTvalue.length-1);
m_myDp.UCPTvalue[0].set(value);
m_sso.Write(m_myDp);
}
var m_myDp;
var m_sso = argObj.sso;
var m_domObj = argObj.domObj;
var m_incrementButton =
m_domObj.appendChild(document.createElement(“button”));
var m_decrementButton =
m_domObj.appendChild(document.createElement(“button”));
m_incrementButton.innerHTML = “Up”;
m_decrementButton.innerHTML=“Down”;
m_incrementButton.attachEvent(“onclick”, handleIncrement);
m_decrementButton.attachEvent(“onclick”, handleDecrement);
var m_textarea =
m_domObj.appendChild(document.createElement(“textarea”));
};
Echelon.CustomJavascript[SetValues_struct] = function(argObj)
{
this.update =
{
var m_myDp;
var m_sso = argObj.sso;
var m_domObj = argObj.domObj;
96
var m_HighButton = m_domObj.appendChild(document.createElement(“button”));
var m_OnButton = m_domObj.appendChild(document.createElement(“button”));
//add break
m_OffButton.innerHTML = “Off”;
m_LowButton.innerHTML = “Low”;
m_MediumButton.innerHTML = “Medium”;
m_HighButton.innerHTML = “High”;
m_OnButton.innerHTML = “On”;
m_OffButton.attachEvent(“onclick”, handleOff);
m_LowButton.attachEvent(“onclick”, handleLow);
m_MediumButton.attachEvent(“onclick”, handleMedium);
m_HighButton.attachEvent(“onclick”, handleHigh);
m_OnButton.attachEvent(“onclick”, handleOn);
var m_spanName =
m_domObj.appendChild(document.createElement(“span”));
var DP_value_text = m_domObj.appendChild(document.createTextNode(“ = “));
var m_spanValue =
m_domObj.appendChild(document.createElement(“span”));
};
Custom JavaScript Example: Writing Enumerated Data Points
The following JavaScript class demonstrates how to write formatted values to an enumerated data
point in a custom JavaScript object. This JavaScript class creates two buttons that you can use to set
the value of a SNVT_hvac_mode data point, and a span that displays the name of the data point and
the current value stored in it. The UCPTvalue[index].LonFormat property is set to
“#0000000000000000[0].SNVT_hvac_mode” in order to write to the enumerated SNVT_hvac_mode
data point. Enumerated values to be written to the data point are written as strings.
Echelon.CustomJavascript[SetValues_enumeration] = function(argObj)
{
this.update =
{
if (type==“Dp_Data”)
{
m_spanValue.innerHTML = item.UCPTvalue[0].get();
m_spanName.innerHTML = item.UCPTname.get();
m_myDp = item;
}
m_myDp.UCPTvalue.splice(0, m_myDp.UCPTvalue.length-1);
m_myDp.UCPTvalue[0].LonFormat.set(“#0000000000000000[0].SNVT_hvac_mode”);
m_myDp.UCPTvalue[0].set(“HVAC_HEAT”);
m_sso.Write(m_myDp);
m_myDp.UCPTvalue.splice(0, m_myDp.UCPTvalue.length-1);
m_myDp.UCPTvalue[0].LonFormat.set(“#0000000000000000[0].SNVT_hvac_mode”);
m_myDp.UCPTvalue[0].set(“HVAC_COOL”);
m_sso.Write(m_myDp);
var m_myDp;
var m_sso = argObj.sso;
var m_domObj = argObj.domObj;
//add break
m_ACButton.innerHTML = “AC”;
m_HeatButton.innerHTML = “Heat”;
m_ACButton.attachEvent(“onclick”, handleCool);
m_HeatButton.attachEvent(“onclick”, handleHeat);
var m_spanName =
m_domObj.appendChild(document.createElement(“span”));
var DP_value_text = m_domObj.appendChild(document.createTextNode(“ = “));
var m_spanValue =
m_domObj.appendChild(document.createElement(“span”));
};
98
Custom JavaScript Example: Writing Data Point Fields (Not Integer or Float)
The following JavaScript class demonstrates how to write formatted values to a data point field that is
not of an integral or floating-point type in a custom JavaScript object. This JavaScript class creates
two buttons that you can use to set the value of a SNVT_switch.state data point, and a span that
displays the name of the data point and the current value stored in it. The
UCPTvalue[index].LonFormat property is set to “#0000000000000000[0].SNVT_switch.state” in
order to write to the state field of the SNVT_switch data point. Values to be written to the data point
are written as strings.
Echelon.CustomJavascript[SetValues_field] = function(argObj)
{
this.update =
{
if (type==“Dp_Data”)
{
m_spanValue.innerHTML = item.UCPTvalue[0].get();
m_spanName.innerHTML = item.UCPTname.get();
m_myDp = item;
}
};
var m_myDp;
var m_sso = argObj.sso;
var m_domObj = argObj.domObj;
//add break
m_OffButton.innerHTML = “Off”;
m_OnButton.innerHTML = “On”;
m_OffButton.attachEvent(“onclick”, handleOff);
m_OnButton.attachEvent(“onclick”, handleOn);
var m_spanName =
m_domObj.appendChild(document.createElement(“span”));
var DP_value_text = m_domObj.appendChild(document.createTextNode(“ = “));
var m_spanValue =
m_domObj.appendChild(document.createElement(“span”));
};
Using Custom Arguments
You can define custom arguments in your JavaScript code and then specify values for them with the
Custom JavaScript object. This feature lets you create reusable Custom JavaScript objects. For
example, you can define upper and lower limit arguments in your JavaScript code and then define
values for those limits with the Custom JavaScript object. When the data point value reaches one of
the limits, you could, for example, change the color of the text in the Custom JavaScript object. The
upper and lower limits may depend on the data point type, a specific network condition, or other
scenario.
To use custom arguments in your JavaScript code, follow these steps:
1. In your JavaScript code, create a reference to argObj.customArgs in the constructor, and
define some descriptive placeholder for the customArgs property of the reference.
The following code sample demonstrates how to use custom arguments in your JavaScript code.
In this example, the value and format of the data point are colored differently based on whether the
data point value has exceeded the upper and lower limits specified by the custom arguments.
function CustomArgsExample(argObj)
{
this.update = function
{
if (type==“Dp_Data”)
{
m_span.innerHTML = item.UCPTname.get();
m_text.innerHTML = item.UCPTvalue[0].get();
m_text1_format.innerHTML = item.UCPTvalue[0].Unit.get();
m_myDp = item;
if (m_text.innerHTML>m_myArgs.UPPER_LIMIT)
{
m_text.style.color = “red”;
m_text1_format.style.color = “red”;
}
else if (m_text.innerHTML<m_myArgs.LOWER_LIMIT)
{
100
m_text.style.color = “blue”;
m_text1_format.style.color = “blue”;
}
else
{
m_text.style.color = “green”;
m_text1_format.style.color = “green”;
}
};
}
var m_myArgs = argObj.customArgs;
)
2. Create a new custom JavaScript object and select the data point to be monitored and controlled by
it following steps 5–9 in the previous Custom JavaScript Object section.
3. Click Edit in the Custom Args box.
4. The Custom Argument Values dialog opens.
102
The value and format of the data point are colored differently based on whether the data point has
exceeded the upper or lower limits specified by the custom arguments. For a SNVT_temp_f#US data
point, the UPPPER_LIMIT custom argument has been defined as 78°F, and the LOWER_LIMIT
custom argument has been defined as 68°F in the Custom Argument Values dialog.
function CustomArgExample(argObj)
{
this.update =
{
if (type==“Dp_Data”)
{
m_span.innerHTML = item.UCPTname.get();
m_text.innerHTML = item.UCPTvalue[0].get();
m_text1_format.innerHTML = item.UCPTvalue[0].Unit.get();
m_myDp = item;
else
{
m_text.style.color = “green”;
m_text1_format.style.color = “green”;
}
};
var m_incrementButton =
m_domObj.appendChild(document.createElement(“button”));
var m_decrementButton =
m_domObj.appendChild(document.createElement(“button”));
m_incrementButton.innerHTML = “Up”;
m_decrementButton.innerHTML=“Down”;
m_incrementButton.attachEvent(“onclick”, handleIncrement);
m_decrementButton.attachEvent(“onclick”, handleDecrement);
var DP_name_text =
m_domObj.appendChild(document.createTextNode(“Data Point Name = “));
var DP_value_text =
m_domObj.appendChild(document.createTextNode(“Value = “));
104
var m_text1_format =
m_domObj.appendChild(document.createElement(“text”));
};
i.LON Vision
SmartServer Embedded
Application Description
Application(s)
Object
Data Point View View – Data Points Web page. This object includes a log that displays
the current values and states of the
selected data points, a trend graph that
charts the data point values over a
specified interval, and combo boxes for
writing values to the data points.
The user can use this object to monitor,
chart, and control specified data points.
Data Log View Data Logger: View Web page. A log that lists the data point updates
recorded by a specific data logger on
the SmartServer.
Alarm Notifier 1. Alarm Notifier: Summary This object can be one of the following:
Web page.
1. A log that that lists all currently
2. Alarm Notifier: History active alarms reported by the
Web page. SmartServer. The user can use this
object to acknowledge and clear
3. Configure E-mail dialog.
active alarms.
2. A log that lists all active and
cleared alarms recorded by the
SmartServer. The user can use this
object to view a historical list of
alarms.
3. An e-mail that the user can send to
a recipient (for example, a
technician or maintenance
company) notifying them of an
alarm condition.
106
4. In the Layout property under Presentation, select the elements of the View – Data Points Web
page to be added to your custom Web page. You have the following three choices:
• Graph. A trend graph that plots selected data points over a user-specified interval.
• Table. A log that lists the format, current value, and status of the selected data points. With
the combo box included in this element, the user can write to a data point or a field within the
data point by entering a value or selecting one of the presets or enumerations defined for the
data point.
• Graph and Table. Displays the data point trend graph and the log. The trend graph is
displayed on top of the log. The user can point to one of the data points listed in the log or
click its line on the trend graph to highlight the updates recorded for that data point on the
trend graph and show its corresponding scaling on the y-axis of the graph.
Note: For multiple data points to be scaled accurately on the trend graph at the same time,
they must have the same Unit String property. You can add a unit string to a data point or
edit the one defined for it in the Configure - Data Points Web page on the SmartServer. You
can access this Web page from the built-in SmartServer Web interface by clicking General,
and then clicking the data point in the SmartServer tree on the left side of the Web interface.
5. If you selected Graph or Graph and Table in step 4, you can add grid lines to the chart by
selecting the Show Grid check box. This check box is cleared by default.
6. In the Default Language property, select the language in which the property headers on the Data
Point View object are displayed. The default language is English, and you can select Deutsch
(German) or Français (French).
108
e. Expand the network, channel, device, and then the functional block of the data point to be
monitored, and then click the desired data point. If the data point has a structured type, you
can expand the data point and select a field within the structure.
f. Click OK to return to the Data Point Properties dialog. The Name property is updated to
show the name of the data point in the following format:
<network>/<channel>/<device>/<functional block>/<data point>.
The Format property is updated to show the format description of the selected data point.
The format description consists of the data point’s program ID; SNVT, SCPT, UNVT, UCPT,
or built-in data type; and format (for example, SI metric or US customary). If the data point
supports multiple formats, you can manually change the format used for the data point. Using
a SNVT_temp_f data point for example, you can change the format to #US, #SI, or #US_Diff
or append one of these formats to the data point name if no format is specified.
g. Optionally, if you selected a field within a structured data point, you can set constant values to
be written to one to all of the other fields in the data point automatically when a value is
written to the selected field. This ensures that the other field or fields in the structured data
point are set to specific values whenever the SVG Box object is used on the selected field.
Using a SNVT_switch data point for example, you can have SNVT_switch.state be set to 1
each time a value is written to SNVT_switch.value.
To set constant values for the other fields in a structured data point, follow these steps:
i. Click Const Fields. The Constant Fields dialog opens.
ii. The data point field you selected in step 4 is marked as “[dynamic]”.
iii. Click the data point field to be set to a constant value.
iv. In the Value field, set the constant value to be written to the data point field.
v. Click Save.
vi. Repeat steps iii–v for any other fields in the structured data point to be set to constant
values.
vii. Click OK to return to the Select Box dialog.
h. Optionally, in the Max Age property, you can set the maximum period of time (in seconds)
that the value of the data point is cached before the Data Point View object receives updated
values. This enables you to control the amount of traffic that is generated on a specific
channel by the object.
The SmartServer compares the Max Age value of the Data Point View object to the amount
of time the data point value has been cached in its internal data server, and then does the
following:
j. Repeat steps a–i for each data point to be monitored and controlled with the Data Point View
object.
Click Edit to put a placeholder in the data point name; edit the maximum age property of the
data point; change the selected field of the data point (if a structured data point); or change the
selected data point altogether. Click Delete to remove the data point from the Data Points
box.
9. Click OK. The Data Point View object is added to your custom SmartServer 2.2 Web page. By
default, the object is positioned in the upper-left hand corner of your Web page (unless you
specified its position with the Left and Top properties). Move the layer containing the object to
110
the desired position on your custom SmartServer 2.2 Web page. To move a layer, click its moving
icon, and then use the arrow keys to move it.
10. Click Publish on the Editor toolbar ( ), click File and then click Publish, or click the
Browse tab to publish your custom Web page. For information on using the graph and table in
the Data Point View object, see the Viewing Data Points section in Chapter 8, Data Logging.
112
6. In the Default Language property, select the language in which the property headers on the Data
Log View object are displayed. The default language is English, and you can select Deutsch
(German) or Français (French).
You can localize this object and all the SmartServer Web pages into any one-byte or two-byte
character language using either the demo version of the SmartServer 2.2 Programming Tools
included on the SmartServer 2.2 DVD or using the full version on the SmartServer 2.2
Programming Tools included on the SmartServer 2.2 Programming Tools DVD. For more
information on ordering the SmartServer 2.2 Programming Tools DVD, contact your Echelon
sales representative.
For more information on localizing the language of the SmartServer Web pages, see the
SmartServer 2.2 Programming Tools User’s Guide.
7. In the Minimum and Maximum properties, set the minimum and maximum values displayed on
the y-axis of the trend graph, if you selected Graph or Graph and Table in step 4.
8. In the Time Range property, you can set the time range that is displayed on the trend graph, if you
selected Graph or Graph and Table in step 4. For example, if you specify 10 minutes, the trend
graph will always display the data point updates recorded over the last 10 minutes. If you do not
specify a time range, the trend graph will include a slider and a selection box that the user can use
to display the data recorded over a specific time range.
9. In the Instance box, select the Data Logger functional block on the SmartServer to be used for the
Data Log View object. By default, the first Data Logger instance created on the SmartServer is
selected. Once you select a Data Logger functional block, all the data points added to that data
logger are listed in the Selected box under Data Points. To update the list of available Data
Loggers, click Refresh.
10. Optionally, you can hide data points that you do not want charted and/or listed in the Data Log
View object. To do this, click the data point in the Selected box and then click the left arrow to
move the data point into the Available box. You can show hidden data points by clicking them in
the Available box and then clicking the right arrow to move them back to the Selected box.
11. Click OK. The Data Log View object is added to your custom SmartServer 2.2 Web page. By
default, the object is positioned in the upper-left hand corner of your Web page (unless you
specified its position with the Left and Top properties). Move the layer containing the object to
the desired position on your custom SmartServer 2.2 Web page. To move a layer, click its moving
icon, and then use the arrow keys to move it.
12. Click Publish on the Editor toolbar ( ), click File and then click Publish, or click the
Browse tab to publish your custom Web page. For information on using the graph and table in the
Data Log View object, see the Viewing Data Logs section in Chapter 8, Data Logging.
Scheduler
You can use the Scheduler object to create a weekly calendar that lists the events to be executed
regularly each day the week, or a yearly calendar highlighting the days in which exceptions to the daily
schedule are to be executed. The user can click the weekly calendar to view and configure the events
regularly scheduled for that day, and they can click a date in the yearly calendar to view and configure
all the events scheduled for that day, including exceptions to the daily schedule. You can disable the
configuration functionality so that the user can only view the weekly or yearly calendar.
To use this object, there must be one or more configured Schedulers on your SmartServer. See
Chapter 8 of the SmartServer 2.2 User’s Guide for more information on adding and configuring a
Scheduler using the SmartServer’s built-in Web pages.
4. In the Instance property under Scheduler, select the Scheduler functional block on the
SmartServer to be used for the Scheduler object. To update the list of available Schedulers, click
Refresh.
5. In the Type property, select the type of calendar to be added to your custom Web page. You have
the following two choices:
114
• Week. A weekly calendar listing the events to be executed normally (without exceptions)
each day. The user can click a day to view or configure the daily schedule. This option
provides the functionality of the Scheduler: Daily Schedules Web page.
• Year. A yearly calendar highlighting the dates in which exceptions to the daily schedule are
to be executed. The user can view and configure the schedule for any date. This option
provides the functionality of the Scheduler: Exceptions Schedules Web page.
6. In the Usage property, select the functionality provided by the Scheduler object. You have the
following two choices:
• View. If you selected Week in step 5, the user can click a day in the weekly calendar to open
the View: Daily Schedules dialog. The user can then view the regular schedule for that day
(without exceptions), which includes only the events in the daily schedule.
If you selected Year in step 5, the user can click a date in the yearly calendar to open the
View: <yyyy-mm-dd> dialog. The user can then view the schedule for that date, which lists
the events in both the daily and exception schedules as they are programmed to be executed.
Dates in which the regular daily schedule is to be executed without any exceptions are
highlighted grey in the calendar; dates in which there are exceptions to the daily schedule are
highlighted light blue.
• Config. If you selected Week in step 5, the user can create separate schedules for individual
days and change the days for which a daily schedule is applicable. The user can also click a
day in the weekly schedule to open the Configure: Daily Schedules dialog. The user can use
this dialog to add, edit, and delete the events planned for a given set of days (weekdays,
weekend days, or other alignment). For more information on defining the daily schedule and
creating events for it, see the Creating Daily Schedules section in Chapter 7, Scheduling.
If you selected Year in step 5, the user can right-click anywhere in the yearly calendar to
create, edit, and delete exceptions to the daily schedule; create separate schedules for
individual days and change the days for which a daily schedule is applicable; and create and
edit exception groups. In addition, the user can click a date in the yearly calendar to open the
Configure: <yyyy-mm-dd> dialog. The user can then add, edit, and delete the events
scheduled for that date. For more information on using exception schedules and creating
events for them, see the Creating the Exception Schedule section in Chapter 7, Scheduling.
7. If you selected Year in step 5, select the method used to determine which week in January is
labeled week 1 under the Wk column. You have the following three options:
• ISO. Week 1 is based on ISO 8601. This is the default.
• Week of Jan 1st. The week containing January 1st is labeled Week 1.
• First Full Week. The first week in January containing seven dates that all fall in the month is
labeled Week 1.
8. In the Week Start box, select the first day to be shown in the weekly or yearly calendar. The
default first day of the week is Sunday.
9. If you selected Year in step 5 and you do want week numbers to be shown on the yearly calendar,
clear Show Week Number. This option is selected by default.
10. If you selected Year in step 5, select the maximum number of months displayed on the calendar at
one time by adjusting the Max Number of Columns and Max Number of Rows values. By
default, the calendar displays 12 months, using 3 columns and 4 rows. Months are displayed
contiguously over the specified number of columns. The maximum number of columns that can
be displayed in the yearly calendar is 3.
11. In the Default Language box, select the language in which the property headers on the Scheduler
object are displayed. The default language is English, and you can select Deutsch (German) or
Français (French).
13. Click Publish on the Editor toolbar ( ), click File and then click Publish, or click the
Browse tab to publish your custom Web page.
Alarm Notifier
You can use the Alarm Notifier object to create the following items: a log that that lists all currently
active alarms reported by the SmartServer, a log that lists all active and cleared alarms recorded by the
SmartServer, or an e-mail message to be sent to a technician, maintenance company, or other personnel
notifying them of an alarm condition.
To use this object, there must be one or more configured Alarm Notifiers on your SmartServer. See
Chapter 6 of the SmartServer 2.2 User’s Guide for more information on adding and configuring an
Alarm Notifier using the SmartServer’s built-in Web pages.
To add an Alarm Notifier object to your custom SmartServer 2.2 Web page, follow these steps:
116
4. In the Type property under Presentation, select the item to be added to your custom Web page.
You have the following two choices:
• Summary View. A log that that lists all currently active alarms reported by the SmartServer.
The user can use this log to acknowledge and clear active alarms. This option provides the
functionality of the Alarm Notifier: Summary Web page.
• History View. A log that lists all active and cleared alarms recorded by the SmartServer.
The user can use this object to view a historical list of alarms. This option provides the
functionality of the Alarm Notifier: History Web page.
For information on using the Alarm Notifier: Summary Web page and the Alarm Notifier:
History Web page, see Chapter 6, Alarming.
5. In the Default Language property, select the language in which the property headers on the
Alarm Notifier object are displayed. The default language is English, and you can select Deutsch
(German) or Français (French).
You can localize this object and all the SmartServer Web pages into any one-byte or two-byte
character language using either the demo version of the SmartServer 2.2 Programming Tools
included on the SmartServer 2.2 DVD or using the full version on the SmartServer 2.2
Programming Tools included on the SmartServer 2.2 Programming Tools DVD. For more
information on ordering the SmartServer 2.2 Programming Tools DVD, contact your Echelon
sales representative.
For more information on localizing the language of the SmartServer Web pages, see the
SmartServer 2.2 Programming Tools User’s Guide.
6. Select one or more Alarm Notifier functional blocks to be used for the for the Alarm Notifier
object.
14. Click Publish on the Editor toolbar ( ), click File and then click Publish, or click the
Browse tab to publish your custom Web page.
2. In the Page Title box, enter a descriptive page title and then click OK.
3. Click OK.
4. If you are using a navigation system that includes a menu frame, you can the display page title in
all your custom Web pages by adding the Page Title object to the menu frame. See Adding a
Page Title to the Menu Frame later in this chapter for how to do this.
118
2. In the Poll Interval box, set how frequently (in seconds) that all the i.LON Vision objects in your
custom Web page poll the SmartServer’s internal data server for data point updates. If you do not
specify a poll rate, the default poll rate is 1 second.
Note: You can set the frequency in which individual i.LON Vision objects poll their specified
data points by setting the Max Age property in the object’s respective properties dialog.
3. Click OK.
120
Presentation Select the type of Link object that the user will click to open the Web
page you specify in the Destination property. You have the following
three choices:
• Icon. Select a graphic from your computer or your SmartServer.
To select a graphic, click Choose to open the Select File dialog,
browse to and select the desired image, and then click OK to
return to the Link dialog
• Button. Enter the text to be displayed in a button that has the
following appearance:
• Text. Enter text to be displayed in a hyperlink ( ).
Link Select the Web page to be opened when the user clicks the Link object
by doing the following:
1. In the URL box, enter the URL of the destination Web page, or
click Choose to open the Select File dialog, browse to the .htm
file of the destination Web page, click the .htm file, and then click
OK.
2. In the Target box, you can select how the destination Web page is
opened. If you are adding the Link object to a page in the
frameset, the destination Web page is opened in the application
frame (appFrame), with the frameset preserved, by default.
Otherwise, the destination Web page is opened in a new window.
You can select one of the other following options:
• Select menuFrame to open the destination Web page in the
menu frame, with the frameset preserved. This option is only
available if you are adding the Link object to a page in the
frameset.
• Select sidebarFrame to open the destination Web page in the
sidebar frame, with the frameset preserved.
• Select copyrightFrame to open the destination Web page in
the copyright frame, with the frameset preserved.
• Select _blank from the pull-down list to open the destination
Web page in a new window.
• Select _top from the pull-down list to open the destination
Web page in the current window, but replace the frameset (if
used).
• Select the Open in Popup check box to open the Web page in
a pop-up dialog. If you select this check box, specify the
dimensions of the pop-up dialog. This check box is cleared
by default
5. Optionally, you can click Name Substitution Values to open the Data Point Name Substitution
Values dialog. In this dialog, you can specify the data points to be displayed when the Web page
specified by the Link object opens. To do this, you enter the substitution tags to replace the
placeholder values in the data point name. See Using Data Point Substitution Tags later in this
chapter for more information.
6. Click OK. The Link object is added to your custom SmartServer 2.2 Web page. By default, the
object is positioned in the upper-left hand corner of your Web page (unless you specified its
7. Click Publish on the Editor toolbar ( ), click the Browse tab, or click File and then click
Publish to save the current draft of your custom SmartServer 2.2 Web page.
1. Click the New button on the Editor toolbar ( ), or click File and then click New Page. The
Select Folder dialog opens.
122
2. Select the folder where your home page will be stored, and then click OK.
3. Click Publish on the Editor toolbar ( ), click the Browse tab, or click File and then click
Publish. The Publish As dialog opens.
4. In the File Name property, enter the name of your home page’s .htm file (one word with no
spaces), and then click OK. For this example, the file name is home.
Note: The default page title is based on this file name. You can edit the page title for the Web
page as described in Changing the Page Title earlier in this chapter.
8. In the Poll Interval box, set how frequently (in seconds) that the i.LON Vision objects in the
custom SmartServer 2.2 Web pages within the frameset poll the SmartServer’s internal data server
for data point updates. If you do not specify a poll rate, the default poll rate is 1 second. You can
use this property to adjust the amount of LAN/WAN traffic that is generated by your custom
SmartServer 2.2 Web pages.
9. In the Default Page property, enter the URL of your home page, or click Choose, select your
home page in the Select File dialog, and then click OK.
124
10. By default, frames for a menu, sidebar, copyright notice, and application (custom Web page) will
be added to all your custom Web pages.
Copyright.htm
11. Clear the check boxes for any of the frames you do not want to use for your custom Web pages.
For example, if you plan on only using a menu bar for your navigation system, you can clear the
Sidebar check box.
Note: The settings in the Frameset dialog will not be saved if the folder to which you are adding
the home page does not already exist.
15. Click Publish on the Editor toolbar ( ), click the Browse tab, or click File and then click
Publish. This publishes your home page and additionally creates the following files (provided
that you did not clear the check box for the respective frame in step 11):
• index.htm. This is the Web page users will initially see when they enter your Web design.
Your home page will appear in the application frame in the center of this Web page. You do
not need to modify this Web page.
• Menu.htm. You can add a menu bar, page title, message box, menu buttons, images, and
graphics to this frame. This frame will appear at the top of all your custom Web pages.
• Sidebar.htm. You can add a navigation pane to this frame. This frame will appear in the left
side of all your custom Web pages.
• Copyright.htm. You can add a copyright notice to this frame. This frame will appear at the
bottom of all your custom Web pages.
126
Designing the Menu Frame
Once you have created your home page and formatted the Frameset object, you can open the
Menu.htm file and then design the menu frame by adding navigation objects to it. You will typically
add a Navigation (menu) object, and you may add the Page Title, Message Box, and Menu Buttons
objects and graphics (for example, background images and company logos). The following describes
each of the navigation objects you can add to the menu frame:
• Navigation (Menu). Displays a menu bar with menu and submenu items that the user can click to
open custom Web pages.
• Page Title. Displays a page title based on the file name of the custom Web page.
• Message box. Displays error and warning messages related to your custom Web pages.
• Menu buttons. Displays a Submit button that the user can click to save changes made to a
custom Web page, and/or a Back button that the user can click to return to the previous Web page
• Graphics such as a background images and company logos.
The objects you add to the menu frame will automatically be applied to all your custom Web pages.
This means that you do not have to add and configure separate navigation objects in the menu frame
for each of your custom Web pages.
1. Click Choose on the Editor toolbar ( ). The Select File dialog opens.
2. Browse to the /web/<Custom> directory on the SmartServer flash disk.
3. Select the Menu.htm file, and then click OK to return to the Browse tab.
1. Click Choose on the Editor toolbar ( ). The Select File dialog opens.
2. Browse to the /web/<Custom> directory on the SmartServer flash disk.
3. Select the index.htm file, and then click OK to return to the Browse tab.
4. Click Edit on the Editor toolbar ( ) or click the Layout tab. The Select a Frame dialog opens.
5. Click menuFrame, which highlights the menu frame, and then click OK.
128
4. Click the [root] icon, and then click Add for each menu item to be added to the menu bar. A New
Item menu item is underneath the [root] icon for each menu item you create. For example, to
create a menu bar with two menu items, click the [root] icon and then click Add twice.
130
b. In the Icon property under Presentation, you can add an icon that will appear to the left of
the item. To do this, click Choose to open the Select File dialog, browse to the
C:\LonWorks\iLON\iLonVision\graphics\<category> folder on your computer, or the
/web/images or /web/user/demo/images folders on your SmartServer flash disk, click the
desired image, and then click OK.
c. In the Label, property, enter the name for the menu item.
d. If you do not plan on adding any submenu items or branches to the current item, select the
Web page to be opened when the user clicks the item. This can be a built-in SmartServer
configuration Web page, or a custom SmartServer Web page on your local SmartServer or on
another SmartServer. To set the destination, follow these steps:
i. In the URL box under Destination, enter the URL of the destination Web page, or click
Choose to open the Select File dialog, browse to the .htm file of the destination Web
page, click the .htm file, and then click OK.
ii. In the Target box, you can select how the destination Web page is opened. By default,
the destination Web page is opened in the application frame (appFrame), with the
frameset preserved. This enables your custom Web pages to appear in the application
frame in the center of the frameset. You can select one of the other following options:
• Select menuFrame to open the destination Web page in the menu frame, with the
frameset preserved.
• Select sidebarFrame to open the destination Web page in the sidebar frame, with
the frameset preserved.
• Select copyrightFrame to open the destination Web page in the copyright frame,
with the frameset preserved.
• Select _blank from the pull-down list to open the destination Web page in a new
window.
• Select _top from the pull-down list to open the destination Web page in the current
window, but replace the frameset (if used).
• Select Open in Popup to open the Web page in a pop-up dialog. If you select this
option, specify the dimensions of the pop-up dialog. This option is cleared by
default.
e. If you are using data point substitution tags to re-use a single Web page for monitoring and
controlling multiple data points, click Name Substitution Values. In the Substitutions
dialog click a placeholder, enter a value for the placeholder in the Value box, click Save, and
then click to return to the Navigation Link dialog. See Using Data Point Substitution Tags
later in this chapter for more information.
f. Click OK to return to the Navigation dialog.
g. Repeat steps a–f for each New Item menu item listed under the Level 1column. The
following graphic demonstrates a menu bar with two menu items that have been configured.
132
7. Configure each submenu item as described in step 5.
10. Click Publish on the Editor toolbar ( ), click the Browse tab, or click File and then click
Publish to save the current draft of your menu frame.
11. You can test your menu bar by clicking a menu item or clicking a menu item and then clicking one
of the submenu items, and verifying that correct destination Web page opens.
134
You can read the following subsections to add a page title, message box, menu buttons, and images to
the menu frame in which your menu bar resides.
2. In the Menu.htm page, Click Edit on the Editor toolbar ( ) or click the Layout tab.
3. Click Insert and then select Page Title.
5. Optionally, you can modify the size and position of the Page Title object by setting the Layer
properties.
7. Click Publish on the Editor toolbar ( ), click the Browse tab, or click File and then click
Publish. A page title named Menu appears on the menu frame.
1. In the Menu.htm page, click Edit on the Editor toolbar ( ) or click the Layout tab.
2. Click Insert and then select Message Box.
136
3. The Message Box Edit dialog opens.
4. Optionally, you can modify the size and position of the Message Box object by setting the
corresponding properties.
5. Click OK. By default, a Message Box object with the name “Loading Page…” is positioned in
the menu frame directly below the Page Title object (unless you specified its position with the
Left and Top properties). If you selected the Layer check box, drag the layer containing the
object to the desired position on your custom SmartServer 2.2 Web page. You can place the
Message Box Edit object below the menu bar and the Page Title object (if added) for a typical
layout.
6. Click Publish on the Editor toolbar ( ), click the Browse tab, or click File and then click
Publish to save the current draft of your menu frame.
1. In the Menu.htm page, click Edit on the Editor toolbar ( ) or click the Layout tab.
2. Click Insert and then select Message Buttons.
4. Optionally, you can modify the size and position of the Menu Buttons object by setting the Layer
properties.
5. Under Presentation, select the type of button to create. You have two choices: Submit and Back.
The Submit button is used to save changes made to a custom Web page. The Back button is used
to return to the previous Web page.
6. In the Default Language property, select the language in which the menu button is displayed.
The default language is English, and you can select Deutsch (German) or Français (French).
You can localize this object and all the SmartServer Web pages into any one-byte or two-byte
character language using either the demo version of the SmartServer 2.2 Programming Tools
included on the SmartServer 2.2 DVD or using the full version on the SmartServer 2.2
Programming Tools included on the SmartServer 2.2 Programming Tools DVD. For more
138
information on ordering the SmartServer 2.2 Programming Tools DVD, contact your Echelon
sales representative.
For more information on localizing the language of the SmartServer Web pages, see the
SmartServer 2.2 Programming Tools User’s Guide.
7. Click OK. A Menu Button object is added to the left side of the menu frame (unless you
specified its position with the Left and Top properties). If you selected the Layer option, drag the
layer containing the object to the desired position on your custom SmartServer 2.2 Web page.
8. Repeat steps 2–7 to add the other button type (Submit or Back) to your menu frame. Vertically
align the buttons.
9. Click Publish on the Editor toolbar ( ), click the Browse tab, or click File and then click
Publish to save the current draft of your menu frame. The Submit and/or Back buttons appear in
your menu frame.
6. Click OK to return to the Layout view. The selected image appears in the Layer.
140
7. Optionally, you can resize the Layer to fit the image.
8. Click the move icon so that the box becomes red, and then drag the Layer to the desired location
within the Menu frame.
10. Click Publish on the Editor toolbar ( ), click the Browse tab, or click File and then click
Publish to save the current draft of your menu frame. The images you added appear in the menu
frame.
1. Click Choose on the Editor toolbar ( ). The Select File dialog opens.
2. Browse to the /web/<Custom> directory on the SmartServer flash disk.
3. Select the Sidebar.htm file, and then click OK to return to the Browse tab.
1. Click Choose on the Editor toolbar ( ). The Select File dialog opens.
2. Browse to the /web/<Custom> directory on the SmartServer flash disk.
3. Select the index.htm file, and then click OK to return to the Browse tab.
4. Click Edit on the Editor toolbar ( ) or click the Layout tab. The Select a Frame dialog opens.
5. Click sidebarFrame, which highlights the sidebar frame, and then click OK.
142
Adding a Tree to the Sidebar Frame
You can add a navigation pane to all your custom Web pages by adding the Navigation (tree) object to
the sidebar frame. The user can then click the items in the navigation pane to open your custom Web
pages. To add a navigation pane to your custom Web pages, follow these steps:
1. Click Insert and then select Navigation.
144
5. If you selected Auto Tree in step 3, select how data points are organized in the factory navigation
pane. You have two choices:
• Name. The data points are organized in the navigation pane by their parent objects using the
following network hierarchy: <network>/<channel>/<device>/<functional block>/<data
point>. This is the default.
• Alias. Data points are alphabetized by their alias names, which correspond to their locations
in the navigation pane.
6. Click the [root] icon, and then click Add for each subtree to be added to the navigation pane. A
New Item menu item is underneath the [root] icon for each subtree you create. For example, to
create a navigation pane with two subtrees, click the [root] icon and then click Add twice.
146
e. If you are using data point substitution tags to re-use a single Web page for monitoring and
controlling multiple data points, click Name Substitution Values. In the Substitutions
dialog click a placeholder, enter a value for the placeholder in the Value box, click Save, and
then click to return to the Navigation Link dialog. See Using Data Point Substitution Tags
in chapter 4 for more information.
f. Click OK to return to the Navigation dialog.
g. Repeat steps a–f for each subtree. The following graphic demonstrates a navigation pane with
two subtrees that have been configured.
8. To create branches for a subtree, click the subtree and then click Add. A New Item is added
underneath the subtree. For example, to create a subtree with three branches, click the subtree and
then click Add three times.
148
12. Click Publish on the Editor toolbar ( ), click the Browse tab, or click File and then click
Publish to save the current draft of your sidebar frame.
13. You can test your navigation pane by clicking an item in the tree or expanding an item and then
clicking one of the submenu items, and verifying that correct destination Web page opens.
150
8. Click Publish on the Editor toolbar ( ), click the Browse tab, or click File and then click
Publish to save the current draft of your sidebar frame.
9. You can test your vertical menu by clicking an item in the menu or expanding an item and then
clicking one of the submenu items, and verifying that correct destination Web page opens.
1. Click Choose on the Editor toolbar ( ). The Select File dialog opens.
1. Click Choose on the Editor toolbar ( ). The Select File dialog opens.
2. Browse to the /web/<Custom> directory on the SmartServer flash disk.
3. Select the index.htm file, and then click OK to return to the Browse tab.
4. Click Edit on the Editor toolbar ( ) or click the Layout tab. The Select a Frame dialog opens.
5. Click copyrightFrame, which highlights the copyright frame, and then click OK.
152
2. Delete the default “Powered by i.LON Vision” text and then enter your company’s copyright.
3. Click Publish on the Editor toolbar ( ), click the Browse tab, or click File and then click
Publish to save the current draft of the copyright frame.
4. Optionally, you can link a legal notice to your copyright. To do this, create a new Web page for
your legal notice. In the copyright frame, highlight your copyright text, click Insert, point to
HTML Elements, and then click Link.
5. In the Link Location property, click Choose to open the Select File dialog. Browse to and select
the Web page containing your legal notice Web page, and then click OK.
6. Click Publish on the Editor toolbar ( ), click the Browse tab, or click File and then click
Publish.
154
4
Advanced SmartServer 2.2 Web Page
Topics
This chapter describes how to use data point priorities, how to use data
point substitution tags, translate custom SmartServer 2.2 Web pages
into different languages, and open the SmartServer’s built-in
applications from custom SmartServer 2.2 Web pages.
Configuration The data point has an error. For example, the data point has
Error an invalid value or its name no longer exists.
Offline The object cannot communicate with the data point. This
may occur if the following happens:
• The object fails to read or write to the data point.
• The heartbeat defined for the data point elapses before
the value of the data point is propagated over the
network.
• A Web connection in which the data point is a member
fails.
156
Icon Status Description
Locked The object is locked out from writing values to the data
point because another object or application has a higher
priority.
In order for the object to write values to the data point either
you must provide the object a revised priority that is equal
to or higher than the one currently assigned to the data
point, or the user must reset the priority of the
higher-priority object or application by clicking the Manual
Override icon.
See the next section for more information on using data
point priorities.
The technician turns the lights off in the conference room using the Combo Box object on their Web
page. As a result, a Manual Override icon appears next to the Combo Box object in the technician’s
Web page, indicating it has write priority to the data point. Locked icons appear next to the objects in
the user and caretaker Web pages and the objects are disabled. This means that the conference room
user and the caretaker no longer have write access to the lighting. The priority currently assigned to
the data point is 230.
The technician clicks the Manual Override icon ( ) next to the Combo Box object on their Web page
to release its lock on the data point. The Combo Box objects in the Web pages of the conference room
user and the caretaker are enabled and the Lock icons no longer appear next to them. This means that
the conference room user and the caretaker once again have write access to the lighting. The priority
assigned to the data point is reset to 255 (the default).
158
When To Use Priority Levels
This section describes three scenarios involving custom SmartServer 2.2 Web pages. The first is an
example where it is not necessary to use priority levels, and the second and third provide examples
where using priorities would be useful.
SmartServer
160
prior any high-priority objects or applications. This is also true if you want the Scheduler to
subordinate the high-priority image swapper switch object. In this case, the Scheduler must use the
same data point (the nvoClsValue data point on the SmartServer’s Digital Input) to access the data
point on the garden light. In addition, the Scheduler must have a lower priority than the high-priority
image swapper switch object in this scenario.
SmartServer
To implement substitution tags in this scenario, you could create a new Web page and add two i.LON
Vision read/write objects representing the switch and lamp devices. After you select the data point to
2. Click Edit on the Editor toolbar ( ) or click the Layout tab, click Insert, and then select an
i.LON Vision read/write object to represent a data point that exists in specific areas within a given
system. See Adding Data Point Read/Write Objects in Chapter 3 for more information on the
configuring the object how to do this.
Note: This example uses four objects: two image swapper objects that represent a light and a
switch, and two custom JavaScript objects that display the names, values, statuses, and priorities
of the switch and the lamp. These objects are used to monitor and control the nviClaValue and
nvoClaValueFb data points of the Digital Output 1 and Digital Output 2 relays on the
SmartServer device.
In this example, placeholders and substitution tags are used on the names of the functional blocks
and data points within the complete data point names (network/device/functional block/data
point). In the previous two-story, four-room example, the placeholders and substitution tags were
used on the names of the devices within the complete data point names.
3. Select a data point to be monitored and controlled by the object. To do this, click Select, select a
data point in the Select Data Point dialog, and then click OK to return the object’s dialog. The
Name property is updated with the real or alias name of the selected data point.
162
4. In the Name property, enter placeholders and default values for portions of the real or alias data
point name to be replaced with substitution tags. In this example, placeholders are used to replace
the indexes in the names of the functional block and data point within the complete data point
name. The specified default values are 1. This means that the Web page will display the value of
the Net/LON/iLON App/Digital Output 1/nvoClaValueFb_1 data point when opened from a
link not using substitution tags.
Note: The placeholder name must start with a letter, and it can be any length consisting of letters,
numbers, or the underscore character.
6. Click Publish on the Editor toolbar ( ), click the Browse tab, click the Browse tab, or click
File and then click Publish to save the current draft of your custom SmartServer 2.2 Web page.
164
2. Open the Sidebar.htm file or Menu.htm file that was created when you added the Frameset
object to your home page. See Adding a Navigation System to your Web Design in Chapter 3 for
more information on how to do this.
Note: This example uses a navigation pane in the sidebar frame to list the rooms represented by
the new custom SmartServer 2.2 Web page.
3. Click Edit on the Editor toolbar ( ) or click the Layout tab. If you have not added a
Navigation object (menu or tree) to the frame you opened, click Insert, select Navigation, and
select the appropriate object for the frame you opened (Menu for the menu frame; Tree for the
sidebar frame) in the Navigation dialog.
4. Create an item in the menu or tree representing a building or a floor and two submenu items that
represent rooms in the building or on the floor. To do this, click the [root] icon, and then click
Add, and then click the New Item and click Add twice.
5. Configure the New Item subtree. To do this, click the New Item subtree and then click Edit. The
Navigation Subtree dialog opens.
a. In then Icon property, select an image to represent the building or floor. This example uses
the House.gif image in the web/user/demo/images folder.
b. In the Label property, enter a descriptive name such as “Building” or “Floor”.
a. In then Icon property, click Choose to open the Select File dialog, select an image to
represent the room, and then click OK. This example uses the House.gif image in the
web/user/demo/images folder.
b. In the Label property, enter a descriptive location. For this example, enter “Room 1” for the
first submenu item, and enter “Room 2” for the second submenu item.
166
c. Under Link, select the custom SmartServer 2.2 Web page to be opened when the user clicks
the submenu item. To do this, do one of the following:
i. In the URL box under Destination, enter the URL of the destination Web page, or click
Choose to open the Select File dialog, browse to the .htm file of the destination Web
page, click the .htm file, and then click OK.
ii. In the Target box, you can select how the destination Web page is opened. By default,
the destination Web page is opened in the application frame (appFrame), with the
frameset preserved. This enables your custom Web pages to appear in the application
frame in the center of the frameset. You can select one of the other following options:
• Select menuFrame to open the destination Web page in the menu frame, with the
frameset preserved.
• Select sidebarFrame to open the destination Web page in the sidebar frame, with
the frameset preserved.
• Select copyrightFrame to open the destination Web page in the copyright frame,
with the frameset preserved.
• Select _blank from the pull-down list to open the destination Web page in a new
window.
• Select _top from the pull-down list to open the destination Web page in the current
window, but replace the frameset (if used).
• Select Open in Popup to open the Web page in a pop-up dialog. If you select this
option, specify the dimensions of the pop-up dialog. This option is cleared by
default.
168
iv. Optionally, in the Page Background property, click From PC or From iLON to add a
background image to the Web page that appears when the link to the room is clicked.
v. Click OK to return to the Navigation Link dialog.
e. Click OK to return to the Navigation dialog.
7. Click OK to return to the Layout tab.
8. Click Publish on the Editor toolbar ( ), click the Browse tab, click the Browse tab, or click
File and then click Publish to save the current draft of your custom SmartServer 2.2 Web page.
9. Test your data point substitution tags. To do this, click or expand the Building or Floor menu item
and then click the Room 1 and Room 2 submenu items. Clicking the switch graphic in Room 1
toggles the Digital Output 1 relay and lights and turns off the Digital Output 1 LED, and that
clicking the switch graphic in Room 2 toggles the Digital Output 2 relay and lights and turns off
the Digital Output 2 LED.
170
3. The NLS Text dialog opens.
4. Optionally, configure the Layer properties of the NLS Text object. By default, the Layer check
box is selected. This means that the NLS Text object is embedded in a Layer object, which lets
you freely move the NLS Text object in your custom Web page.
Clearing this option means that you must position the NLS Text object as you would any other
HTML object. This may be useful if you want to place the NLS Text object in a table. You can
set the following properties to position and size the object:
• The Left and Top properties determine the object’s position from the upper left-hand corner
of the Web page (in pixels). You can set these properties to position the object instead of
dragging the Layer object containing it.
• The Width and the Height properties determine the size of the object (in pixels). You can set
these properties to size the object instead of expanding and collapsing the Layer object
containing it.
• The Z-Index property determines the object’s background depth compared to objects it
overlaps with, with 1 (the default) being in the back and higher values being in front.
When positioning the NLS Text object, leave space for menu, page title, or sidebar objects
that you may want to add to your Web page. This will help prevent you from accidentally
overlapping objects.
5. In the Key property, enter a descriptive placeholder that identifies the type of text string to be
provided. This placeholder will be replaced with the text string that you provide for it in the
.properties file.
8. Click Publish on the Editor toolbar ( ), click the Browse tab, or click File and then click
Publish.
Note: Your custom SmartServer 2.2 Web page will not function until the text string for the NLS
Text object is in the appropriate .properties files in the web/user/<Custom>/nls folder on the
SmartServer flash disk. You will create the nls folder and the .properties file and in the next step.
9. Create the nls folder and the .properties files for your custom SmartServer 2.2 Web page with the
SmartServer 2.2 Programming Tools. To do this, follow these steps:
a. Install the demo version of the SmartServer 2.2 Programming Tools on the SmartServer 2.2
DVD or the full version on the SmartServer 2.2 Programming Tools DVD. See the
SmartServer 2.2 User’s Guide for more information on installing the demo version. See the
SmartServer 2.2 Programming Tools User’s Guide for more information on installing the full
version.
172
b. Start the SmartServer 2.2 Programming Tool. To do this, click Start, point to Programs,
point to Echelon SmartServer 2.2 Programming Tools, and then click SmartServer 2.2
Programming Tools. The SmartServer 2.2 Programming Tool opens.
c. Create a new nls project. To do this, click File, point to New, and then click Project. The
New Project dialog opens. Click Next. In the Project Name box, enter nls, and then click
Finish.
An nls folder is added to the C/C++ Projects view. This means that an nls folder has been
created in the LONWORKS iLON\Development\eclipse\workspace.fpm folder on your
computer. This is where the .properties files that you will create will be stored.
d. Create a .properties file for your custom SmartServer 2.2 Web page. To do this, right-click
the nls folder, point to New, and then click File. The New File dialog opens. In the File
name box, enter the file name of your custom SmartServer 2.2 Web page (for example,
nlsExample) and then append the .properties extension to the name (for example,
nlsExample.properties). Click Finish.
174
f. In the bottom left-hand corner of the ResourceBundle Editor view, enter the key you created
for the NLS Text object in step 5 and then click Add. Repeat this step for all NLS Text
objects you created in your custom SmartServer 2.2 Web page.
i. Click the New tab at the bottom of the ResourceBundle Editor view to create the .properties
file and translate the keys in a different language. The New Properties File: dialog opens.
176
j. In the Choose or Type Locale box, select the language and desired version (if different
regional varieties are available for the language) to which your custom SmartServer 2.2 Web
page is to be translated.
k. The Lang. and Country (if used) properties are filled in. Optionally, you can enter a
Variant to further categorize the selected language. This is useful if you want to create
different translations of the same language with the same regional version.
178
• To translate the properties from the Properties tab, click each property listed in the left frame
and enter a translation in your language box in the right-pane one-by-one.
You can comment out the text in a translation by selecting the checkbox ( ) in the upper
right-side of the language box. You can switch to your language’s property tab by clicking
the arrow ( ) on the upper right-hand corner of your language box.
• To translate the properties from your language’s tab, first copy the Default (English)
translation and paste it into your language’s tab. You can begin translating the properties
listed in your language’s tab.
Tip: Save your language localization project frequently to safeguard your data from a power
outage or other failure. To save your language localization project, click File and then click
Save.
180
Opening SmartServer Applications from Custom Web Pages
You can open the configuration Web pages of the SmartServer’s built-in applications (for example,
Alarm Notifier, Digital Input, Scheduler, Type Translator) from your custom SmartServer 2.2 Web
pages.
To do this, you add a new item to a Navigation object (tree or menu), or you create a Link object.
You then link the item or Link object to the application’s .htm file in the /web/user/echelon folder on
your SmartServer’s flash disk, select an application instance to be opened when the link is clicked, and
specify the language (English, German, French, or other language) used by the configuration Web
page.
If your Web design uses a frameset, you will typically add the link to an item in a Navigation object.
Navigation objects include the tree view in the Sidebar.htm frame or the menu in the Menu.htm
frame. If your Web design does not use a frameset, typically you will add the link to a Link object;
however, you can add it to an item in a Navigation object, which should be located on your home
page.
182
9. Click Name Substitution Values. The Substitutions dialog opens.
10. Click the elon_<application>_name: placeholder, enter the full name (network path) of the
desired application instance, and then click Save. For example, to open Scheduler [0] on the
iLON App device, which is located on the LON channel in a network named Net, enter
“Net/LON/iLONApp/Scheduler [0]”.
Tip: To enter the application’s name quickly, go to the SmartServer Web interface, click the
application’s functional block in the SmartServer tree, copy the name listed in the Name property
at the top of the Web page, paste it in the Value box, and then click Save.
184
16. Click Publish on the Editor toolbar ( ), click the Browse tab, or click File and then click
Publish to publish your frame or custom Web page.
17. Click the links in the navigation object to verify the SmartServer configuration Web page opens in
the application frame or destination Web page and appears in the specified language.
4. In the Presentation box, select the type of Link object that the user will click to open the Web
page you specify in the Destination property. You have the following three choices:
• Icon. Click Choose to open the Select File dialog, browse to the web/images/app folder on
the SmartServer flash disk, and then select an image corresponding with the configuration
Web page to be opened from the link.
Note: All of the images for the SmartServer’s built-in applications use the following naming
convention: 8000010128000000[4].UFPT<application>.gif
• Button. Enter the text to be displayed in a button that has the following appearance:
• Text. Enter text to be displayed in a hyperlink ( ).
186
5. Follow steps 8–12 in the previous section, Linking to a Configuration Web Page from a
Navigation Object, to select the .htm file representing the desired configuration Web to be opened
from the link, select the application instance to be used, and select the language (English, German,
French, or other language) used by the configuration Web page.
6. Click OK to return to the Link dialog, and then click OK to return to your custom Web page.
7. Click Publish on the Editor toolbar ( ), click the Browse tab, or click File and then click
Publish to publish your custom Web page.
8. Click the link in the your custom Web page to verify the SmartServer configuration Web page
opens in the destination Web page and appears in the specified language.
5. Click the copy, and then click the move icon on the object’s layer and drag the layer containing
the copied object to an empty space in the Layout tab.
6. Edit the copy to change the selected data point and configure the object properties. To do this,
either double-click the object; right-click the object and then click Object Properties on the
shortcut menu; or click the object, click Edit, and then click Object Properties
188
2. Click Edit and then click Cut (or press CTRL+X).
3. Delete the Layer previously containing the object being moved.
4. Click the destination object and then click any space inside the Layer (green box if layers are
displayed) below the object (blue box if layers are selected).
Note: To display layers in the Layout tab, click File and then click Preferences. In the
Preferences dialog, select the Show Layers check box, and then click OK.
5. Prepare to place the cut object above or below the current object in the destination Layer.
• To place the object being moved above the current object in the destination Layer, press
ENTER multiple times to provide sufficient space for all the objects in the Layer, and then
click the current object and drag it downwards within the Layer. Click anywhere above the
current object.
• To place the object being moved below the current object in the destination Layer, press
ENTER multiple times to provide sufficient space for all the objects in the Layer.
6. Click Edit and then click Paste (or press CTRL+V). The object is pasted to the destination Layer.
190
7. Click Publish on the Editor toolbar ( ), click the Browse tab, or click File and then click
Publish to verify that the objects are positioned as desired in the table.
2. Move the Layer object to an empty space in the Layout tab to simplify your Web design. To do
this, click the Layer, and then move the mouse pointer over the move icon on the upper-left side of
the object’s layer so that the mouse pointer becomes a move tool ( ). Click the move icon so that
the Layer becomes red, and then drag the Layer to the desired location.
3. Once you have moved the Layer, click anywhere in the Layer so that the solid black box appears
around the Layer.
4. Click Insert, point to HTML Elements, and then select Image. The Image Properties dialog
opens.
6. Click OK to return to the Layout view. The selected image appears in the Layer.
7. Re-size the Layer object containing the image and then move the Layer to the desired position
within the custom Web page.
8. To overlap the Layer containing the image with other Layers, click the Layer so that a black box
and move icon appear on the Layer box, click the move icon so that a red box appears around the
Layer, and then right-click the Layer and select Advanced Properties on the shortcut menu. In
the Advanced Property Editor dialog, click the Inline tab, click the Z-index property, modify
the Z-index property, and then click OK.
192
• Increase the Z-index to place the selected Layer above other Layers (for example, set the
Z-index to 2).
• Decrease the Z-index to place the selected Layer below other Layers (for example, set the
Z-index to -1).
9. Click Publish on the Editor toolbar ( ), click the Browse tab, or click File and then click
Publish to verify that the images appear as desired in your custom Web page.
4. Cut and paste the image into the Layer object. To do this, right-click the image, select Cut on the
shortcut menu, right-click anywhere in the Layer, and then click CTRL +V on the shortcut menu.
The image appears in the Layer object.
194
5. Re-size the Layer object containing the image and then move the Layer to the desired position
within the custom Web page.
6. To overlap the Layer containing the image with other Layers, click the Layer so that a black box
and move icon appear on the Layer box, click the move icon so that a red box appears around the
Layer, and then right-click the Layer and select Advanced Properties on the shortcut menu. In
the Advanced Property Editor dialog, click the Inline tab, click the Z-index property, modify
the Z-index property, and then click OK.
• Increase the Z-index to place the selected Layer above other Layers (for example, set the
Z-index to 2).
• Decrease the Z-index to place the selected Layer below other Layers (for example, set the
Z-index to -1).
8. Click Publish on the Editor toolbar ( ), click the Browse tab, or click File and then click
Publish to verify that the images appear as desired in your custom Web page.
196
Securing Custom SmartServer Web Pages
You can use the i.LON Server Web Server Parameters utility to create security settings that will
requires users to provide a user name and password each time they access the files stored in the custom
directory you created for your custom SmartServer 2.2 Web pages. For more information on the
i.LON Server Web Server Parameters utility, see Appendix C.
198
5
i.LON Vision 2.2 API
200
elon_name The key to a specific data point or application instance.
elon_alias_name
For data points, you can provide elon_name and specify the data point’s
UCPTname property (network/channel/device/functional block/data
point), or you can provide elon_alias_name and provide the data point’s
alias name. You can add, edit, and enable/disable alias names for a data
point from its Configure - Data Points Web Page in the built-in
SmartServer Web pages. To do this, click the General option above the
navigation pane on the left side of the SmartServer Web interface, and
then click the data point in the navigation pane. The Alias Name property
is located near the top of the Web page.
For application instances (Scheduler, Data Logger, or Alarm Notifier),
you can provide elon_name and specify the functional block’s
UCPTname property (network/channel/device/functional block).
elon_name_arr If the object is able to display multiple data points, the data points are
defined inside an elon_name_arr array. This array contains either an
array of strings or an array of objects (if parameters are required for each
data point).
elon_feedback_name All objects providing a user interface to a single data point (or one of its
elon_feedback_alias_name fields) offer the optional parameter elon_feedback_name (or
elon_feedback_alias_name, respectively). If you provide this parameter,
the object displays data from the data point specified as a feedback, while
changes are written to the data point given in elon_name (or
elon_alias_name, respectively).
Only specify a feedback data point if it is bound to the data point specified
in elon_name (or elon_alias_name) via device hardware, a LONWORKS
connection, or a Web connection. After you write to the data point, the
object is disabled until its feedback data point reports a change.
elon_lang [string] For all application objects (Data Point View, Data Logger View,
Scheduler, or Alarm Notifier), specify the language in which the object is
displayed. The default language is English (en), and you can enter
German (de), French (fr), or the language code corresponding to the
one-byte or two-byte character language to which you have translated the
application object.
You can perform language localization for the application objects using
either the demo version of the SmartServer 2.2 Programming Tools
included on the SmartServer 2.2 DVD or using the full version on the
SmartServer 2.2 Programming Tools included on the SmartServer 2.2
Programming Tools DVD. For more information on ordering the
SmartServer 2.2 Programming Tools DVD, contact your Echelon sales
representative.
For more information on localizing the language of the SmartServer Web
pages, see the SmartServer 2.2 Programming Tools User’s Guide.
Object-Specific Properties
The following sections provide the proprieties required by the various i.LON Vision objects.
202
Combo Box Properties
The Combo Box displays the current data point value either as a preset (if defined for the data point)
or as a raw value in the text box, and it lists the presets defined for the data point in the attached list
box. You can write to the data point or field by entering a value in the text box or selecting one of the
presets defined for the data point from the list box
The following table lists the properties of the Combo Box object:
elon_size [int] The width of the box in pixels.
Echelon.CustomJavascript["CustomJavascriptClass"] = function(argObj)
{
// Public method that handles SOAP objects
this.update = function(type, item)
{
if (type==“Dp_Data”)
{
//Get DP property
m_domObj.innerHTML = item.UCPT<DP property>.get();
/* You can get and set these DP properties from ‘item’
UCPTname
UCPTvalue[index]
UCPTvalue[index].LonFormat
UCPTvalue[index].Unit
UCPTpriority
UCPTpointStatus*/
}
}
// Constructor that instantiates your JavaScript class and
// specifies the DOM object to which it belongs
var m_domObj = argObj.domObj;
};
Note: You must set the UCPTvalue[index].LonFormat property to the appropriate SNVT,
UNVT, SCPT, or UCPT if you are writing formatted values to certain data point types. In
204
addition, the formatted values must be written as strings to those data point types. If you are
using presets to write to the data points, you do not need to set this property.
The data point types requiring the LonFormat property are as follows:
• Structured data points (for example, SNVT_switch). For example, if you are writing 100.0 1
to a SNVT_switch data point, you must set this property.
m_myDp.UCPTvalue[0].LonFormat.set(“#0000000000000000[0].SNVT_switch”);
m_myDp.UCPTvalue[0].set(“0.0 0”);
• Fields within structured data points that are not of a floating-point or integral type (for
example,SNVT_switch.state).
m_myDp.UCPTvalue[0].LonFormat.set(“#0000000000000000[0].SNVT_switch.state”);
m_myDp.UCPTvalue[0].set(“0”);
2. If you plan on writing to data point properties, implement the following code in your JavaScript
class:
// Custom “Soap Server Object” required to write to DPs
argObj.sso.Write(Item);
Echelon.CustomJavascript[Simple_Add_Subtract] = function(argObj)
{
this.update = function(type, item)
{
if (type==“Dp_Data”)
{
m_textarea.innerHTML = item.UCPTvalue[0].get();
m_span.innerHTML = item.UCPTname.get();
m_myDp = item;
}
}
var m_myDp;
var m_sso = argObj.sso;
var m_domObj = argObj.domObj;
var m_incrementButton =
m_domObj.appendChild(document.createElement(“button”));
var m_decrementButton =
m_domObj.appendChild(document.createElement(“button”));
m_incrementButton.innerHTML = “Up”;
m_decrementButton.innerHTML=“Down”;
m_incrementButton.attachEvent(“onclick”, handleIncrement);
m_decrementButton.attachEvent(“onclick”, handleDecrement);
var m_span = m_
3. Optionally, you can define custom arguments in your JavaScript code and then specify values for
them with the Custom JavaScript object. This feature lets you create reusable Custom
JavaScript objects. For example, you can define upper and lower limit arguments in your
JavaScript code and then define values for those limits with the Custom JavaScript object.
When the data point value reaches one of the limits, you could, for example, change the color of
the text in the Custom JavaScript object. The upper and lower limits may depend on the data
point type, a specific network condition, or other scenario.
To use custom arguments in your JavaScript code, follow these steps:
a. In your JavaScript code, create a reference to argObj.customArgs in the constructor, and
define some descriptive placeholder for the customArgs property of the reference. For
example, do the following:
var m_myArgs = argObj.customArgs;
The following code sample demonstrates how to create custom argument references:
m_text_value.style.color = m_myArgs[“HIGH_COLOR"];
m_text_value.style.color = m_myArgs[“LOW_COLOR"];
c. Insert an enumeration in the constructor that includes all your custom arguments using the
following format:
ELON_CUSTOM_ARGS = [“<argName>”, “<argName>”, …]
206
The following code sample demonstrates how to create the custom arguments enumeration:
this.ELON_CUSTOM_ARGS =["HIGH_COLOR", LOW_COLOR"];
CUSTOM ARGUMENT EXAMPLE
The following code sample demonstrates how to create keys in your JavaScript file and assign
data points to them, as well as how to use custom arguments in your JavaScript code. This
example expands the previous single data point custom argument example in that the state of
a SNVT_switch data point determines whether the value and format of another data point are
highlighted yellow or grey. In addition, this example provides custom arguments for
informative messages related to the current data point value. This message could be tailored
based on the type of data point being monitored and controlled by the Custom JavaScript
object.
Echelon.CustomJavascript["CustomArgsExample_MultDp"] = function(argObj)
{
this.update =
{
// Create data point key for background color
"ELON_DP_KEY:Background": function(type, item)
{
m_span_string.style.fontWeight = 700;
//Create custom argument references
if(item.UCPTvalue[0].get() >= m_myArgs["BKGRD_ON_COND"])
{
m_span_value.style.background = m_myArgs["BKGRD_COLOR_ON"];
m_span_string.innerHTML = m_myArgs["BKGRD_TEXT_ON"];
}
// Create data point key for displaying dp name, value, and format
"ELON_DP_KEY:Value": function(type, item)
{
//Create custom argument references
m_span_name.innerHTML = item.UCPTname.get();
m_span_value.innerHTML = item.UCPTvalue[0].get();
m_span_format.innerHTML = item.UCPTvalue[0].Unit.get();
if (m_span_value.innerHTML>m_myArgs["HIGH_VALUE"])
{
m_span_value.style.color = m_myArgs["HIGH_COLOR"];
m_span_format.style.color = m_myArgs["HIGH_COLOR"];
}
else if (m_span_value.innerHTML<m_myArgs["LOW_VALUE"])
{
m_span_value.style.color = m_myArgs["LOW_COLOR"];
m_span_format.style.color = m_myArgs["LOW_COLOR"];
}
else
{
m_span_value.style.color = m_myArgs["NORMAL_COLOR"];
var DP_name_text =
m_domObj.appendChild(document.createTextNode("Data Point Name = "));
var m_span_name = m_domObj.appendChild(document.createElement("span"));
var break0 = m_domObj.appendChild(document.createElement("br"));
208
elon_show_grid [boolean] If you set elon_layout [string] to graph or graphtable, specify
whether the trend graph displays a grid in the background.
Scheduler Properties
The Scheduler object is a weekly calendar that lists the events to be executed regularly each day the
week, or a yearly calendar highlighting the days in which exceptions to the daily schedule are to be
executed.
The following table lists the properties of the Scheduler object:
elon_name The key to a specific Scheduler instance. Specify the
UCPTname property of the scheduler’s functional block in the
following format: network/channel/device/functional block.
elon_type Set this property to one of the following values:
• SCHEDULER_YEAR. A yearly calendar highlighting the
days in which exceptions to the daily schedule are to be
executed.
• SCHEDULER_WEEK. A weekly calendar that lists the
events to be executed regularly each day the week.
elon_usage Set this property to one of the following values:
• view. The user can click a date in the yearly calendar to
open the View: <yyyy-mm-dd> dialog. The user can then
view the schedule for that date, which lists the events in
both the daily and exception schedules as they are
programmed to be executed.
• config. The user can create separate schedules for
individual days and change the days for which a daily
schedule is applicable. The user can also click a day in the
weekly schedule to open the Configure: Daily Schedules
dialog. The user can use this dialog to add, edit, and delete
the events planned for a given set of days (weekdays,
weekend days, or other alignment).
elon_year_start If you set elon_type to SCHEDULER_YEAR, select the
method used to determine which week in January is labeled
week 1 under the Wk column. Set this property to one of the
following values:
• 0 (ISO). Week 1 is based on ISO 8601. This is the default.
• 1 (Week of Jan 1st). The week containing January 1st is
labeled Week 1.
• 2 (First Full Week). The first week in January containing
seven dates that all fall in the month is labeled Week 1.
210
www.echelon.com