Column configuration

Newly created or existing columns can be enriched with further settings (for example, column width, heading, included functions). These settings are created in a separate panel. Open this panel through the column properties button or by a double-click on an arbitrary column in the panel table configuration behind the alerts and events tab.

Figure 1. Panel for changing the Column Properties - Type Alerts

The position of the column (in the list of the available columns), the name of the column and its visibility are shown at the top of the panel (the entries in these fields cannot be changed in this panel anymore).

The following settings can be created in this panel per row:

  • Header of the column (lang text)
  • Definition of the column width for the alert and event panel.
  • The check box dynamic column width divides the remaining table space (the space left over after the fixed column width has been assigned) between the columns for which this check box was activated.
  • Definition whether the foreground/background colors should be handled (the colors are configured in the alert class, see also _alert_class), meaning that you can, for example, configure that the foreground or background color for a column corresponds with the alert status.
  • Configuration of a function call on click. OnClick() defines which function is called when you click on a column. Depending on the panel (alert or event), different options are available from the combo box:
    • None
    • DoAcknowledge: (only for the alert screen)
    • DisplayDetail: Shows details on an alert.
    • DisplayAlertPanel: What panel should be shown is configured when the alert handling on the data point element (see _alert_hdl (Alert handling, parameter tab) is configured. The panel that opens is specified on the alert handling parameter tab.
    • InsertComments: (only for alert panel)
    • UserDefFunc: An arbitrary user-defined function can be executed. The function is executed in aesuser.ctl in <proj_path>\scripts\libs. You can also call a CONTROL function here. Copy theaesuser.ctlfile to the libs directory of your project. Change the invokedAESUserFunc() as you want to. You can, for example, open a child panel or print a desired text. Add your function after the invokedAESUserFunc() function call as shown in the following example:
/**
Main initialisation routine.
@param none
@author Martin Muster
@version 1.0
@return nothing
*/
void invokedAESUserFunc( string shapeName, int screenType, int tabType, int row, int
                         column, string value )
{
  DebugN( "invokedAESUserFunc() yourFunction shape=" + shapeName + " column=" +
          column + " row=" + row );
}
CAUTION: You cannot acknowledge alerts or add comments as a function call on click, in stopped mode.
  • You can configure the content of the column that should be shown in the lower section of the panel. The content is displayed when the alert and event panel is initialized.
Note: For performance reasons, it is not possible to include CONTROL functions in order to make calculations per row or per column. For this, use the API interface and implement the appropriate functions.

The following options are available:

  • DPA: Shows a data point attribute. Select an attribute from the combo box below. You can also set the format for the shown value as a format string. Use the text field Format. The following formats can be used for the configuration of a column:

    • sprintf format - for all attributes except for time attributes - see chapter sprintf(). Use, for example, %3f for formatting a float value. If you do not specify a format string, %s is used (output of string values). If the specified format string is invalid, the specified string is shown. For example, the format string %bcd is shown as "bcd".
    • "time Format" - only for time attributes - see the time format string in chapter "timeFormat". Here the time (Year:Month:Day Hours:Minutes:Seconds) is shown. If the format string %d is specified, 26 is shown (the day of the date).
    Note: Milliseconds will only be displayed if no settings were made for the format field. In this case the output format will be "YYYY.MM.DD hh.mm.ss.ms" (international format). If a user defined time formatting is applied, the output will be "DD.MM.YYYY hh.mm.ss".
  • API functions: Here you can select functions that were created via the Alerts/Edit functions panel. Through these functions you can display arbitrary, user-defined information in the columns. You have to create c++ functions first and then create the corresponding functions via the Alerts/ Edit functions panel.
  • WinCC OA functions: Choose a predefined function from the combo box. The function specifies the content of the column. The functions are not CONTROL functions but have a similar description. This makes it easier to understand the function. You can also specify a format here.

--Functions which are only available in the alarm screen:

  • direction(): Prints a long string for the alert.
  • getCount(): The function is for the internal use. See control function getACount().
  • getExtTimeId(): The function is for internal use. The function returns the data point name for the parameter <time> of type EXTTIME_VAR and returns it as a text in a variable of type ANYTYPE_VAR: If an error occurs when returning the data point name, the returned text is empty. The function value is allocated dynamically and has to be shared by the user of the function.
  • ackState(): Returns the alert state (!!!, X and others). See chapter alert table for a description of the alert states.
  • nofComments(): Returns the number of comments that exist for the alert at the moment.

--Functions which are available only in the event panel:

  • dpGetContent(): This function formats the values offlineText (alert text of the alert handling) and the value of a data point. What data point is formatted is defined by the Dpidentifier. If no alert text exists, the settings of Common config are taken into consideration.
  • StatusBits(). The set Bits (for example, user bits) are converted into a string.
  • userName(): Prints the current user. The name is actually an ID that is automatically converted to a name.
  • convManIntToName(): Prints the Manager name. Available only in the event panel.
  • convManIntToShortName(): Converts the manager number to a short manager name

--Functions which are available both in the alarm screen and in the event panel.:

  • dpSubstr: Returns the part of a data point identifier that is specified by the pattern (sub string). (Choose the pattern from the Attribute combo box). For information on the patterns, see also the CONTROL function dpSubStr().
  • writeFormatString(): Prints a format string.
  • dpGetDescription(): See chapter dpGetDescription().
  • dpFormatValue(): Works similar to dpGetContent(). The settings of the common config (unit) are taken into consideration.
  • dpGetAlias(): Returns the alias name for the specified data point element.direction(): Prints a lang string for the alert.
  • convInvBitToText(): Converts an invalid bit into text. The function checks if online invalid bit is set. If the online invalid bit is set, a string (invalid_true or invalid_false) is read from the "sc" catalog in <wincc_oa_path>/msg/<language> . The bit is converted into this string.

The column configuration panel for events does not differ much from the column configuration panel for alerts. The configuration of alert class colors as foreground and background colors is omitted. In addition, other functions are available for OnClick().

Note: The above mentioned configurations can only be made by users with configuration rights. An operator may only change the visibility of the columns in the properties panel of the alert and event panel.