2 snvt_lev_disc_to_snvt_occupancy – Echelon i.LON SmartServer 2.0 User Manual

Page 179

Advertising
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 <DataPoint> elements

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

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

Type” attribute of “Output”. The output data point referenced by <UCPTname> must have a
<UCPTformatDescription> property of #0000000000000000[0]. SNVT_state and a
<UCPTnickName> 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 <UCPTnickName> of the input data point. For example, the state field
of the SNVT_switch data point that has a <UCPTnickName> 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
<UCPTnickName> of Input8 would be stored in Bit8 of the output SNVT_state data point.

If any of the <UCPTnickName> 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
<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[0]</UCPTname>

<DataPoint

dpType="Input">

<UCPTname>Net/LON/iLON

App/VirtFb/nviSwitch_1</UCPTname>

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

dpType="Input">

<UCPTname>Net/LON/iLON

App/VirtFb/nviSwitch_2</UCPTname>

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

dpType="Output">

<UCPTname>Net/LON/iLON

App/VirtFb/nvoState</UCPTname>

<UCPTformatDescription>#0000000000000000[0].SNVT_state</UCPTformatDescription>
<UCPTnickName>Output0</UCPTnickName>
</DataPoint>
<UCPTtranslatorRule>16xSNVT_switch_TO_SNVT_state</UCPTtranslatorRule>
<SCPTdelayTime>0</SCPTdelayTime>
</Item>
</iLonItem>
</Set>

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 <DataPoint> element that

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

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

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

Advertising