beautypg.com

Split snvt setting, Creating a custom type translation, Creating a custom scalar-based translation – Echelon SmartServer 2.2 User Manual

Page 468

background image

SmartServer

2.2 User’s Guide

469

state: 0

value: 0.0
state: 1

ST_OFF

value: 0.1–25.0
state: 1

ST_LOW

value: 25.0–50.0
state: 1

ST_MED

value: 50.0–75.0
state: 1

ST_HIGH

value: 75.0–100.0
state: 1

ST_ON

value: >100.0
state: 1

ST_NUL

Split SNVT Setting

This rule-based translation splits the SNVT_setting input data point to produce three output data
points corresponding to each of its fields: function (a setting_t enumeration), setting
(SNVT_lev_cont), and rotation (SNVT_angle_deg).

Creating a Custom Type Translation

If none of the pre-defined translations are compatible with your specific application, you can create
your own custom scalar-based or rule-based translation. To create a custom scalar-based translation,
define the scaling to be performed on the value of the input point before it is converted to the output
point.

To create a custom rule-based translation, define one or more cases and a rule for each case that
executes when the case is true. You can specify whether a case is always true or if it is only true when
an expression is true. The expression can be an if-then statement or an nested if-then statement. The
rule specifies the value to be copied to the output points. Once you create a custom type translator
rule, you can select it from the list of defined rules and use it for other translations.

Creating a Custom Scalar-Based Translation

You can create a custom scalar-based translation with the Type Translator. This is useful if you need
to perform some scaling on the value of the input point before it is translated to the output point. If
you do not need to scale the input point, you can use the pre-defined Copy Input DP to Output DP
translation.

To create a custom scalar-based translation, follow these steps:

1. On the Rule box, click Add Rule.

2. The Add Rule dialog opens.