_msg_conv

Attribute (neutral) Type Description
_list_conv dyn_int list of simultaneously used conversions
_num_conv int number of simultaneously used conversions
_type int conversion type
conversion using point curve factor
_linint_num int number of supporting points
_linint1_x float X coordinate of supporting point 1
_linint1_y float Y coordinate of supporting point 1
_linint2_x float X coordinate of supporting point 2
_linint2_y float Y coordinate of supporting point 2
_linint3_x float X coordinate of supporting point 3
_linint3_y float Y coordinate of supporting point 3
_linint4_x float X coordinate of supporting point 4
_linint4_y float Y coordinate of supporting point 4
_linint5_x float X coordinate of supporting point 5
_linint5_y float Y coordinate of supporting point 5
logarithm conversion
_log_base float basic value for conversion
conversion according to a polynomial to the 4th degree
_poly_grade int polynomial to the nth degree
_poly_a float a - proportion of the polynomial conversion
_poly_b float b - proportion of the polynomial conversion
_poly_c float c - proportion of the polynomial conversion
_poly_d float d - proportion of the polynomial conversion
_poly_e float e - proportion of the polynomial conversion
conversion with accuracy (rounding)
_round_val int rounding value
_round_inv bool should rounding value be inverted
conversion with starting-point suppression
_null_from float starting or "from" value for starting range (point of origin)
_null_to float end or "to" value for starting range (point of origin)
_null_res float output value to be set when suppressing
trigger function conversion analog /digital
_trig_lim float limit
_trig_up bool digital value 1 when value above limit -- (otherwise below)
conversion of counter impulses
_imp_rstval int value for reset (overflow)
_imp_edge int type of flank interpretation of the impulse

Constants for the ".._type" attribute

CTRL constant int value Description
DPCONFIG_NONE 0 No conversion
DPCONFIG_CONVERSION_RAW_TO_ING_MAIN 33 Conversion raw into treated value
DPCONFIG_CONVERSION_RAW_TO_ENG_MAIN 33 Conversion raw into treated value

"_msg_conv.<i>._imp_edge" counter impulses

The following integer constants determine how counter impulses are converted. The detail number in the attribute refers to the index of the counter-impulse conversion among other conversions for the data point element (see attributes "_msg_conv.<i>._type" and "_cmd_conv.<i>._type"). "_msg_conv.2._imp_edge", for example, refers to a value whose second conversion in the direction of an alert is a counter-impulse evaluation (see dpSet()).

CTRL constant int value Description
DPATTR_COUNT_POS_EDGES 0 0->1 edge
DPATTR_COUNT_NEG_EDGES 1 1->0 edge
DPATTR_COUNT_ALL_EDGES 2 all edges
DPATTR_COUNT_POS_PULSES 3 1 impulse
DPATTR_COUNT_NEG_PULSES 4 0 impulse

"_msg_conv.<i>._type>, "cmd_conv.<i>._type> attribute

Data point elements can be added to a conversion using the following integer constants. First you have to define the "_msg_conv.._type" and afterwards the "_msg_conv.<i>_type" (see example). The detail number in the attribute determines the sequence of the conversions: "_msg_conv.2._type" refers to the second conversion of a value in the direction of an alert (see dpSet()).

CTRL constant int value Description
DPDETAIL_CONV_NONE 0 no conversion
DPDETAIL_CONV_LIN_INT 3 conversion using point curve factor
DPDETAIL_CONV_LOG 1 logarithm conversion
DPDETAIL_CONV_POLY 2 conversion according to a polynomial to the 4th degree
DPDETAIL_CONV_PREC 8 conversion with accuracy (rounding)
DPDETAIL_CONV_NULL_SUPP 4 conversion with starting-point suppression
DPDETAIL_CONV_TRIGGER 7 trigger function (conversion analogous -> digital)
DPDETAIL_CONV_COUNTER 9 conversion of counter impulses
DPDETAIL_CONV_INVERT 5 invert

Example

Create a _msg_conv config with a configured trigger definition:

main()
{
  dpSetWait("TestDP_1.element:_msg_conv.._type",
  DPCONFIG_CONVERSION_RAW_TO_ENG_MAIN,
  "TestDP_1.element:_msg_conv.1._type",
  DPDETAIL_CONV_TRIGGER,
  "TestDP_1.element:_msg_conv.1._trig_lim", 10,
  "TestDP_1.element:_msg_conv.1._trig_up",TRUE);
}

Further details on the config "_msg_conv" you will find in the chapter Module PARA - _cmd_conv, _msg_conv (conversion).

Details on converting treated to raw values

see data point config "_cmd_conv"