Datapoint configs

Each config has unique properties. These properties can be created. edited or removed via scripting. To determine if a particular datapoint element contains the config of interest, please check the value of the "_type" property against the constant "DPCONFIG_NONE". See dpSet(), dpGet(), dpConnect(), alertConnect() for more information.

exampleexample

main()
{
  int type;
  string DPE = "System1:ExampleDP_Arg2.";
  dpGet(DPE + ":_alert_hdl.._type", type);
  if(type != DPCONFIG_NONE) // alarm properties exist
  {
    dpSetTimed(0, DPE + ":_alert_hdl.._active", TRUE); //set state
    without logging change
  }
}

To create a config, you have to define the appropriate constant for the _type attribute of the respective config. See example below. With _type = 0 (DPCONFIG_NONE) you can delete a config.

exampleexample

main()
{
  int type;
  string DPE = "System1:ExampleDP_Arg2.";
  dpGet(DPE + ":_alert_class.._type", type);
  if(type == DPCONFIG_NONE) // config does not exist
  {
    dpSetWait(DPE + ":_alert_class.._type", DPCONFIG_ALERT_CLASS,
    DPE + ":_alert_class.._ack_type", DPATTR_ACK_APP_AND_DISAPP,
    DPE + ":_alert_class.._prior", 80);
    //create _alert_class config and define acknowledgement type and
    priority
  }
}

When setting a datapoint config it is to consider that trying to set an already existing datapoint config will delete the existing config and no new config will be set!

This behavior is based on the complex dependencies inside of the datapoint configs and must be considered when applying changes to the configuration.

All configs

CTRL constant Description
DPCONFIG_NONE no config defined

These characteristics are assigned when a config is added to a datapoint element. Whether it is the conversion of the original value or an alert handling depends on the specific config. WinCC OA has the following configs (see also Configuration of Configs):

Beginning from the Version 3.5 only the neutral config descriptions like _original.._value are supported. original.._wert is not supported!