Using the delete function on a type translator -14 – Echelon i.LON SmartServer 2.0 User Manual

Page 186

Advertising
background image

i.LON SmartServer 2.0 Programmer’s Reference

12-14

• The SNVT_switch 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_switch and a
<UCPTnickName> property of Input0.

• The SNVT_lev_disc 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_lev_disc and a
<UCPTnickName> of Output0.

Each time a type translation is made, the SNVT_lev_desc output data point is assigned an enumeration
based on the current value and state stored in the SNVT_switch input data point, as described in the
following table:

SNVT_switch (input point)

SNVT_lev_desc (output point)

value: any
state: 0

ST_NUL

value: 0.0
state: 1

ST_OFF

value: 0.1–25.0
state: 1

ST_LOW

value: 25.0–50.0
state: 1

ST_MED

value: 50.0–75.0
state: 1

ST_HIGH

value: 75.0–100.0
state: 1

ST_ON

value: >100.0
state: 1

ST_NUL

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[11]</UCPTname>

<DataPoint

dpType="Input">

<UCPTname>Net/LON/iLON

App/VirtFb/nviSwitch</UCPTname>

<UCPTformatDescription>#0000000000000000[0].SNVT_switch

</UCPTformatDescription>

<UCPTnickName>Input0</UCPTnickName>
</DataPoint>
<DataPoint

dpType="Output">

<UCPTname>Net/LON/iLON

App/VirtFb/nvolevDisc</UCPTname>

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

12.3.5

Using the Delete Function on a Type Translator

You can use the Delete function to delete a Type Translator. To delete a Type Translator, you provide
an <Item> element with a UFPTtypeTranslator_Cfg type that includes the <UCPTname> property of
the type translator to be deleted. The following code sample demonstrates how to use the Delete
function to delete a Type Translator:

Advertising