7 snvt_setting_to_snvt_switch – Echelon i.LON SmartServer 2.0 User Manual

Page 184

Advertising
background image

i.LON SmartServer 2.0 Programmer’s Reference

12-12

<Set xmlns="http://wsdl.echelon.com/web_services_ns/ilon100/v4.0/message/">
<iLonItem>
<Item

xsi:type="UFPTtypeTranslator_Cfg">

<UCPTname>Net/LON/iLON

App/Type

Translator[7]</UCPTname>

<DataPoint

dpType="Input">

<UCPTname>Net/LON/iLON

App/VirtFb/nviScene_1</UCPTname>

<UCPTformatDescription>#0000000000000000[0].SNVT_scene</UCPTformatDescription>
<UCPTnickName>Input0</UCPTnickName>
</DataPoint>
<DataPoint

dpType="Output">

<UCPTname>Net/LON/iLON

App/VirtFb/nvoSwitch_1</UCPTname>

<UCPTformatDescription>#0000000000000000[0].SNVT_switch</UCPTformatDescription>
<UCPTnickName>Output0</UCPTnickName>
</DataPoint>
<UCPTtranslatorRule>SNVT_scene_TO_SNVT_switch</UCPTtranslatorRule>
<SCPTdelayTime>0</SCPTdelayTime>
</Item>
</iLonItem>
</Set>

12.3.4.7 SNVT_setting_TO_SNVT_switch

You can use this Type Translator Rule to translate an input data point of type SNVT_setting to an
output data point of type SNVT_switch.

• The SNVT_setting input data point is defined by a <DataPointFormat> element that has a “Dp

Type” attribute of “Input”. The input data point referenced by <UCPTname> must have a
<UCPTformatDescription> property of #0000000000000000[0]. SNVT_setting and a
<UCPTnickName> property of Input0.

• The SNVT_switch output data point to be translated is defined by a <DataPoint> element that

have a “Dp Type” attribute of “Output”. The output data point referenced by <UCPTname> must
have a <UCPTformatDescription> of #0000000000000000[0]. SNVT_switch and a
<UCPTnickName> of Output0.

Each time a type translation is made, the value and state fields of the SNVT_switch ouput data point
are assigned values based on the current values stored in the function and setting fields of the
SNVT_setting input data point, as described in the following table:

SNVT_setting (input point)

SNVT_switch (ouput point)

function: SET_STATE
setting: <=100.0

value: 0.0
state: 0 (OFF)

function: SET_STATE
setting: >100.0

value: <=setting>
state: 0 (OFF)

function: SET_NUL
setting: any

value: 0.0
state: 0 (OFF)

The following code demonstrates how to use the Set function to create a type translator that uses this
<UCPTtranslatorRule>:

<Set xmlns="http://wsdl.echelon.com/web_services_ns/ilon100/v4.0/message/">
<iLonItem>
<Item

xsi:type="UFPTtypeTranslator_Cfg">

<UCPTname>Net/LON/iLON

App/Type

Translator[8]</UCPTname>

<DataPoint

dpType="Input">

<UCPTname>Net/LON/iLON

App/VirtFb/nviSetting_1</UCPTname>

<UCPTformatDescription>#0000000000000000[0].SNVT_setting</UCPTformatDescription>
<UCPTnickName>Input0</UCPTnickName>
</DataPoint>
<DataPoint

dpType="Output">

<UCPTname>Net/LON/iLON

App/VirtFb/nvoSwitch_1</UCPTname>

<UCPTformatDescription>#0000000000000000[0].SNVT_switch</UCPTformatDescription>
<UCPTnickName>Output0</UCPTnickName>
</DataPoint>

Advertising