_cmd_conv

Attribute (neutral) Type Description
_list_conv dyn_int list of simultaneous conversions
_num_conv int number of simultaneous conversions
_type int conversion type
conversion using point curve factor
_linint_num int number of supporting points
_linint1_x float X coordinate of the supporting point 1
_linint1_y float Y coordinate of the supporting point 1
_linint2_x float X coordinate of the supporting point 2
_linint2_y float Y coordinate of the supporting point 2
_linint3_x float X coordinate of the supporting point 3
_linint3_y float Y coordinate of the supporting point 3
_linint4_x float X coordinate of the supporting point 4
_linint4_y float Y coordinate of the supporting point 4
_linint5_x float X coordinate of the supporting point 5
_linint5_y float Y coordinate of the supporting point 5
logarithm conversion
_log_base float basic value for conversion
conversion according to 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 for suppression
trigger function - conversion analog (c)digital
_trig_lim float limit
_trig_up bool digital value 1 when value above limit - otherwise below
conversion of counter impulses
_imp_edge int type of flank interpretation for impulse
_imp_rstval int value for reset (overflow)

Constants for the ".._type" attribute

CTRL constant int value Description
DPCONFIG_NONE 0 No conversion
DPCONFIG_CONVERSION_ING_TO_RAW_MAIN 36 Conversion from treated to raw value
DPCONFIG_CONVERSION_ENG_TO_RAW_MAIN 36 Conversion from treated to raw value

"_cmd_conv.<i>._imp_edge" counter impulses

The following integer constants define in what way a counter impulse conversion is performed. The detail number in the attribute refers to the index of the counter impulse conversion beneath other conversions of the data point element - see attribute "_cmd_conv.<i>._type". So the attribute "_cmd_conv.2._imp_edge" refers to a value, whose second conversion in direction to the periphery is a counter impulse analysis - 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

"_cmd_conv.<i>._type" attribute

With the following integer constants you can add conversions to data point elements. First of all you have to declare the attributes "_cmd_conv.._type" and "_cmd_conv.<i>_type". So you apply the config and than you declare the type for the considering detail ("i"). The detail number in the attribute defines the order of the conversions: "cmd_conv.2._type" refers to the second conversion of a value in direction to the periphery - 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 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 Analog -> Digital)
DPDETAIL_CONV_COUNTER 9 Conversion of counter impulses
DPDETAIL_CONV_INVERT 5 Inverting

Example

Applies a conversion config with a configured trigger definition:

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

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

Details on converting raw to treated values

See data point config "_msg_conv"