6 snvt_scene_to_snvt_switch – Echelon i.LON SmartServer 2.0 User Manual
Page 183

i.LON SmartServer 2.0 Programmer’s Reference
12-11
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[6]</UCPTname>
<DataPoint
dpType="Input">
<UCPTname>Net/LON/iLON
App/VirtFb/nviScene_1</UCPTname>
<UCPTformatDescription>#0000000000000000[0].SNVT_scene</UCPTformatDescription>
<UCPTnickName>Input0</UCPTnickName>
</DataPoint>
<DataPoint
dpType="Output">
<UCPTname>Net/LON/iLON
App/VirtFb/nvoSetting_1</UCPTname>
<UCPTformatDescription>#0000000000000000[0].SNVT_setting</UCPTformatDescription>
<UCPTnickName>Output0</UCPTnickName>
</DataPoint>
<UCPTtranslatorRule>SNVT_scene_TO_SNVT_setting</UCPTtranslatorRule>
<SCPTdelayTime>0</SCPTdelayTime>
</Item>
</iLonItem>
</Set>
12.3.4.6 SNVT_scene_TO_SNVT_switch
You can use this Type Translator Rule to translate an input data point of type SNVT_scene to an
output data point of type SNVT_switch.
• The SNVT_scene 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_scene and a
<UCPTnickName> property of Input0.
• The SNVT_switch 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_switch and a
<UCPTnickName> of Output0.
You can use this Type Translator Rule to translate an input data point of type SNVT_scene to an
output data point of type SNVT_switch. When you use this rule, you must reference the SNVT_scene
data point that is to be translated by its <UCPTpointName> in the <InDataPoint> element. You must
reference the SNVT_switch data point to store the result of the translation by its <UCPTpointName>
in the <OutDataPoint> element.
SNVT_scene (input point)
SNVT_switch (ouput point)
function: SC_NUL
scene_number: 0
No update made to output data point
function: SC_NUL
scene_number: >0
value: 0.0
state: 0 (OFF)
function: SC_RECALL
scene_number: 1
value: 25.0
state: 1 (ON)
function: SC_RECALL
scene_number: 2
value: 50.0
state: 1 (ON)
function: SC_RECALL
scene_number: 3
value: 75.0
state: 1 (ON)
function: SC_RECALL
scene_number: >3
value: 100.0
state: 1 (ON)
function: SC_RECALL
scene_number: 255
value: 0.0
state: 0 (OFF)
The following code demonstrates how to use the Set function to create a type translator that uses this
<UCPTtranslatorRule>: