beautypg.com

8 snvt_state_to_16xsnvt_switch, 9 snvt_switch_to_snvt_lev_disc – Echelon i.LON SmartServer 2.0 User Manual

Page 185

background image

i.LON SmartServer 2.0 Programmer’s Reference

12-13

SNVT_setting_TO_SNVT_switch
0


12.3.4.8 SNVT_state_TO_16xSNVT_switch

You can use this Type Translator Rule to convert a single SNVT_state input data point to up to 16
SNVT_switch output data points. The value of the state field of each of the SNVT_switch input data
points will be assigned to a field in the SNVT_state output data point.

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

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

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

that have a “Dp Type” attribute of “Output”. The output data points referenced by
must have a property of #0000000000000000[0]. SNVT_switch and
a in the range of Output0 to Output15.

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. The state field in each
SNVT_switch output data point will be assigned a value based on the of the
output data point and the corresponding value in bitX of the SNVT_state input data point. For
example, the SNVT_switch output data point with a of Output0 will be assigned a
value based on Bit0 of the input data point. Or, the SNVT_switch output data point with a
of Output8 will be assigned a value based on Bit8 of the input data point.

If the value of a BitX field of the SNVT_state input data point is 0, then the applicable SNVT_switch
output data point will be assigned the value 0.0 0. If the value of a BitX field of the SNVT_state input
data point is 1, then the applicable SNVT_switch output data point will be assigned the value 100.0 1.

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

dpType="Input">

Net/LON/iLON

App/VirtFb/nvoState

#0000000000000000[0].SNVT_state
Input0

dpType="Output">

Net/LON/iLON

App/VirtFb/nviSwitch_1

#0000000000000000[0].SNVT_switch
Output0

dpType="Output">

Net/LON/iLON

App/VirtFb/nviSwitch_2

#0000000000000000[0].SNVT_switch
Output1

SNVT_state_TO_16xSNVT_switch
0

Item>

12.3.4.9 SNVT_switch_TO_SNVT_lev_disc

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