beautypg.com

4 pre defined type translator rules, 1 16xsnvt_switch_to_snvt_state, Pre-defined type translator rules -6 – Echelon i.LON SmartServer 2.0 User Manual

Page 178: Pre-defined type translator rules

background image

i.LON SmartServer 2.0 Programmer’s Reference

12-6

When modifying an existing type translator, 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 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 uses the Set function to create a Type Translator that uses the Type Translator Rule
SNVT_switch_TO_SNVT_lev_disc” to translate a SNVT_switch data point (nviSwitch) to a
SNVT_lev_disc data point (nvoLevDisc). Because the “SNVT_switch_TO_SNVT_lev_disc” rule is
being used, nviSwitch must be a SNVT_switch data point and nvoLevDisc must be a SNVT_lev_disc
data point. The input and output data point types that must be used with the other Type Translator
Rules provided with the SmartServer software are listed in Chapter 13.

Request



Net/LON/iLON App/Type Translator[1]

enter an optional description

Net/LON/iLON

App/VirtFb/nviSwitch

#0000000000000000[0].SNVT_switch

Input0

Net/LON/iLON

App/VirtFb/nvoLevDisc

#0000000000000000[0].SNVT_lev_disc

Output0


SNVT_switch_TO_SNVT_lev_disc

0


Response



0


Net/LON/iLON

App/Type

Translator[1]



12.3.4

Pre-Defined Type Translator Rules

The following sections list the identifiers you can use to fill in the property of a
UFPTtypeTranslator_Cfg item when you create a new Type Translator. They also provide
descriptions of the Type Translator Rules these identifiers reference, and the network variable types of
the input and output data points you must use with each rule.

You can find the XML files that store the configuration of these Type Translator Rules in the
/root/config/Software/TranslatorRules

directory of the SmartServer.

12.3.4.1 16xSNVT_switch_TO_SNVT_state

You can use this Type Translator Rule to convert up to 16 SNVT_switch input data points to a single
SNVT_state output data point. The value of the state field of each of the SNVT_switch input data
points will be assigned to a field in the SNVT_state output data point.