_cmd_conv

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 datapoint 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 datapoint 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

exampleExample

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 about converting raw to treated values

See datapoint config "_msg_conv"