beautypg.com

4 snvt_occupancy_to_snvt_setting – Echelon i.LON SmartServer 2.0 User Manual

Page 181

background image

i.LON SmartServer 2.0 Programmer’s Reference

12-9

ST_HIGH value:

75.0

state: 1 (ON)

ST_MED value:

50.0

state: 1 (ON)

ST_LOW value:

25.0

state: 1 (ON)

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[0]

dpType="Input">

Net/LON/iLON

App/VirtFb/nvilevDisc

#0000000000000000[0].SNVT_lev_disc
Input0

dpType="Output">

Net/LON/iLON

App/VirtFb/nvoSwitch

#0000000000000000[0].SNVT_switch
Output0

SNVT_lev_disc_TO_SNVT_switch
0


12.3.4.4 SNVT_occupancy_TO_SNVT_setting

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_occupancy.

• The SNVT_occupancy 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_occupancy and a
property of Input0.

• The SNVT_setting 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_setting and a
of Output0.

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

SNVT_occupancy (input
point)

SNVT_setting (ouput point)

OC_NUL

function: SET_STATE (enumerated value is 5)
setting: 0
rotation: 0

OC_UNOCCUPIED

function: SET_STATE
setting: 60
rotation: -80.01

OC_OCCUPIED

function: SET_STATE
setting: 100
rotation: 80.24