beautypg.com

2 snvt_lev_disc_to_snvt_occupancy – Echelon i.LON SmartServer 2.0 User Manual

Page 179

background image

i.LON SmartServer 2.0 Programmer’s Reference

12-7

• The 16 SNVT_switch data points to be translated are defined by a list of elements

that have a “Dp Type” attribute of “Input”. The input data points referenced by
must have a property of #0000000000000000[0]. SNVT_switch data
point and a in the range of Input0 to Input15.

• The SNVT_state output data point is defined by a element that have a “Dp

Type” attribute of “Output”. The output data point referenced by must have a
property of #0000000000000000[0]. SNVT_state and a
of “Output0”.

The value of the state field of each input data point will be read and stored in bitX of the output data
point, where X represents the of the input data point. For example, the state field
of the SNVT_switch data point that has a of Input0 would be stored in Bit0 of the
output SNVT_state data point. Or, the state field of the SNVT_switch data point that has a
of Input8 would be stored in Bit8 of the output SNVT_state data point.

If any of the properties for the input data points are not used (meaning that less
than 16 SNVT_switch data points were supplied to the Type Translator), then the corresponding field
in the SNVT_state output data point will be assigned a value of 0.

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/nviSwitch_1

#0000000000000000[0].SNVT_switch
Input0

dpType="Input">

Net/LON/iLON

App/VirtFb/nviSwitch_2

#0000000000000000[0].SNVT_switch
Input1

dpType="Output">

Net/LON/iLON

App/VirtFb/nvoState

#0000000000000000[0].SNVT_state
Output0

16xSNVT_switch_TO_SNVT_state
0


12.3.4.2 SNVT_lev_disc_TO_SNVT_occupancy

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

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

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

• The SNVT_occupancy output data point is defined by a element that has a

“Dp Type” attribute of “Output”. The output data point referenced by must have a
property of #0000000000000000[0]. SNVT_occupancy and a
property of Output0.