beautypg.com

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

Page 186

background image

i.LON SmartServer 2.0 Programmer’s Reference

12-14

• The SNVT_switch input data point is defined by a element that has a “Dp

Type” attribute of “input”. The input data point referenced by must have a
property of #0000000000000000[0]. SNVT_switch and a
property of Input0.

• The SNVT_lev_disc output data point to be translated is defined by a element that

have a “Dp Type” attribute of “Output”. The output data point referenced by must
have a of #0000000000000000[0]. SNVT_lev_disc and a
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
:



xsi:type="UFPTtypeTranslator_Cfg">

Net/LON/iLON

App/Type

Translator[11]

dpType="Input">

Net/LON/iLON

App/VirtFb/nviSwitch

#0000000000000000[0].SNVT_switch

Input0

dpType="Output">

Net/LON/iLON

App/VirtFb/nvolevDisc

#0000000000000000[0].SNVT_lev_disc
Output0

SNVT_switch_TO_SNVT_lev_disc
0


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 element with a UFPTtypeTranslator_Cfg type that includes the property of
the type translator to be deleted. The following code sample demonstrates how to use the Delete
function to delete a Type Translator: