beautypg.com

3 using the set function on a type translator rule – Echelon i.LON SmartServer 2.0 User Manual

Page 199

background image

i.LON SmartServer 2.0 Programmer’s Reference

13-11

Property Description

If the output data point or field takes an enumeration as its value
type, enter the enumeration the output data point is to be assigned
when the comparison for the case rule evaluates to True.

If the output data point or field takes a numeric value as its value
type, enter a numeric value here. The Type Translator will add this
to the value of the input data point (or data point field) and store the
resulting sum in the output data point (field). This Type Translator
will perform this operation after the multiplication operation
defined by the property is performed.

13.3.3

Using the Set Function on a Type Translator Rule

You can use the Set function to create new type translator rules, or to overwrite the configuration of
existing type translator rule. The type translator rules to be created or written are signified by a list of
elements in the input you supply to the function. The properties you must define within each

>

element are the same, whether you are creating a new type translator or modifying an existing

type translator. The previous section, Using the Get Function on a Type Translator Rule, describes
these properties.

Each time you use this function to create a new Type Translator Rule, an XML file for that rule will be
generated in the /root/config/software/TranslatorRules directory of your SmartServer.
Once the file has been generated, you can reference the rule when creating a Type Translator, as
described in Chapter 12.

Notes: If you specify a type translator rule with the element, the Set function deletes
the specified type translator rule before the specified parameters are set. If the element
is not specified, a new type translator rule is created.

When modifying an existing type translator rule, any optional properties omitted from the input will be
erased. Old values will not be preserved, so you should fill in every property when writing to a type
translator, even if you are not changing all of the values.

When creating or modifying a type translator rule with this function, you may want to use output from
the Get function as the basis for your input. You would then only need to modify the values of each
property to match the new configuration you want, as opposed to re-creating an entire string like the
one shown below, to generate your input.

The following example uses the Set function to create a Type Translator Rule definition that translates
a SNVT_switch data point (nviSwitch) to a SNVT_hvac_mode data point (nvoHVACmode).

Request



My Custom Rule: SNVT_switch to SNVT_hvac_mode

converts SNVT_switch ON to SNVT_hvac_mode HVAC_COOL

nviSwitch
#0000000000000000[0].SNVT_switch


nvoHVACmode
#0000000000000000[0].SNVT_hvac_mode


0
DataPointFormat[UCPTnickName="nviSwitch"]

LonFormat="UCPTcompFunction">FN_EQ

LonFormat="">100.0

1