Echelon i.LON SmartServer Technical Information Page 194

  • Download
  • Add to my manuals
  • Print
  • Page
    / 443
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 193
i.LON SmartServer 2.0 Programmer’s Reference
13-6
13.3.2.1 Creating a Case Structure
You can create case structures for each Type Translator Rule that defines the set of operations that will
be performed when a type translation is made with that rule. Each case structure includes several
global elements, and a series of case rules. The case rules are signified by a list of <Rule> elements.
You can use these rules to establish the value that will be assigned to the data point that the Type
Translator Rule generates as output. See
Case Rules for more information on the <Rule> element.
For example, consider a Type Translator Rule that converts a SNVT_occupancy input data point
(nviOccupancy) to a SNVT_switch output data point (nvoSwitch). You could set up one case
structure that sets nvoSwitch to ON (100.0 1) when nviOccupancy is set to OC_OCCUPIED. You
could set up another case structure that sets nvoSwitch to OFF (0.0 0) when nviOccupancy is set to
OC_UNOCCUPIED. Each structure could have a different set of case rules that will be used to assign
the output data point, or data points, a different value.
<Case>
<UCPTindex>0</UCPTindex>
<UCPTinputPath>DataPointFormat[UCPTnickName="nviOccupancy"]</UCPTinputPath>
<UCPTcompFunction LonFormat="UCPTcompFunction">FN_EQ</UCPTcompFunction>
<UCPTcompValue LonFormat="">OC_OCCUPIED</UCPTcompValue>
<Rule>
<UCPTindex>0</UCPTindex>
<UCPTinputPath>DataPointFormat[UCPTnickName="nviOccupancy"]</UCPTinputPath>
<UCPToutputPath>DataPointFormat[UCPTnickName="nvoSwitch"]</UCPToutputPath>
<UCPToutputFieldName />
<UCPTcompFunction LonFormat="UCPTcompFunction">FN_NUL</UCPTcompFunction>
<UCPTmultiplier>0</UCPTmultiplier>
<UCPTconstant LonFormat="">100.0 1</UCPTconstant>
</Rule>
</Case>
<Case>
<UCPTindex>1</UCPTindex>
<UCPTinputPath>DataPointFormat[UCPTnickName="nviOccupancy"]</UCPTinputPath>
<UCPTcompFunction LonFormat="UCPTcompFunction">FN_EQ</UCPTcompFunction>
<UCPTcompValue LonFormat="">OC_UNOCCUPIED</UCPTcompValue>
<Rule>
<UCPTindex>0</UCPTindex>
<UCPTinputPath>DataPointFormat[UCPTnickName="nviOccupancy"]</UCPTinputPath>
<UCPToutputPath>DataPointFormat[UCPTnickName="nvoSwitch"]</UCPToutputPath>
<UCPToutputFieldName />
<UCPTcompFunction LonFormat="UCPTcompFunction">FN_NUL</UCPTcompFunction>
<UCPTmultiplier>0</UCPTmultiplier>
<UCPTconstant LonFormat="">0.0 0</UCPTconstant>
</Rule>
</Case>
Before the operations defined by the case rules are performed, the Type Translator Rule will use its
global elements to compare the value of an input data point (and field, where applicable) to a value of
your choice. You will select a comparison function with which the comparison is to be made.
If the result of the operation is True, each of the case rules defined for the case structure will be used.
If the result is False, the case rules will not be used. These comparisons are meant to give you
flexibility when setting up your case structures.
Note: If none of the case structures for a Type Translator Rule evaluate to True, the data point will be
updated during the translation. However, its value will not change.
The following table describes the global elements you will fill in to define the comparison that will be
performed. These elements must be inserted at the top of the case structure, before the <Rule>
elements.
Page view 193
1 2 ... 189 190 191 192 193 194 195 196 197 198 199 ... 442 443

Comments to this Manuals

No comments