Adaptivity of the Communication Center
In addition to the settings described on the previous page, you can make further settings regarding the Communication Center and the associated functions. This means that own project-specific settings can be made using the Communication Center.
The following functions can be changed considerably:
Email template
When using the device type e-mail, specific persons are informed via e-mail if errors occur. The texts in this e-mail (for example, subject, mail body) are saved in templates and can be adapted arbitrarily. The templates are located in .../data directory of the Communication Center sub project with the name "mailAlertTemplate". (text for the transmission of alerts), "mailCyclicDataTemplate" (Text for the transmission of cyclic alert groups), "mailOverviewTemplate" (text for the transmission of alert overviews). The rows that begin with "#" in the templates are comments and are filtered out automatically when the message is generated. The language in these templates (the default language is German) can be adapted via the appropriate translation of the files. These template files can also be saved in the data directory of the project directory!
In the templates (and also in the catalog file cc.cat
)
keywords are used in the square brackets. The keywords are filled with right words
when composing the message. Some of the keywords and their description are listed in
the following table:
Key word | Description |
---|---|
[MsgUser] | Personal ID of the user to whom the message is forwarded. |
[MsgUserName] | Name of the user to whom the message is forwarded. |
[MsgUserTitle] | Form of address of the user to whom the message is forwarded. |
[dataSet] | The keyword [dataSet] is used for cyclic alerts. E.g., every 15 minutes an e-mail with the alerts is sent. See also chapter Setting of cyclic datasets. |
The personal ID, name and form of address are defined when creating a user. See Create user and assign devices for details on the configuration of a user. The meaning of the other used keywords should be clear due to the naming.
Keywords for alerts
The keyword [AlertTable] corresponds to the message template defined by using the msgKey MsgTemplate in the file wincc_oa_path/CommCenter_3.19/msg/[language]/cc.cat.
By default the template has the following form: MsgTemplate,[AlertDescription] [AlertText] [AlertState] at [AlertTime], Value is [AlertValue]. [MsgState]
The message template can be changed. The keywords [AlertDescription] [AlertText] [AlertState] [AlertTime] and [AlertValue] cannot be changed with regards to content. The order of the keywords can, however, be changed. The content is returned from the database for [AlertDescription] [AlertText] [AlertTime] and [AlertValue]. For the keywords [AlertState] and [MsgState] the content is specified in the cc.cat file:
The default values for the keyword [AlertState] are:
AlertState_1,came
AlertState_2,came unacknowledged
AlertState_3,went
AlertState_4,came and went unacknowledged
The keywords can be changed, e.g.:
AlertState_1,Entering
AlertState_2,Entering unacknowledged
AlertState_3,Leaving
AlertState_4,Entering and Leaving unacknowledged
Also the e-mail text can be changed. Below you can find an example with a changed e-mail text and a changed order of keywords:
#########################################################
# Template for e-mails sent to the user in case of an alert
# Subject:
WinCC OA CommunicationCenter - Remote alerting
# Mail-Body
[MsgUserTitle]
There are [AlertCount] alerts.
Alert table:
MsgTemplate_EMail,Event Status: [AlertState]\n Description: [AlertDescription]
[AlertText] \n Time:[AlertTime]
Contact the WinCC OA Communication Center, by using the <INSERT_YOUR_DIALING_NUMBER_HERE> [MsgSessionId].
Best regards
WinCC OA Communication Center
############################################################
Check of the rights
For the display and use in the main panel (see also overview panel in the Communication Center) the user only needs the rights for "use" in WinCC OA. Also the settings can be viewed in the configuration panel if you have operation rights (for more information on the configuration panel see chapter Configuration of the Communication Center). For changes in the configuration panel, you need administrator rights. The authorization concept of the Communication Center can be adapted to individual needs. If you want to change rights in your projects, contact the ETM Product Center product_center@etm.at.
Modification of SMS texts before sending
In some cases it can happen that messages which are sent via SMS should display a special text, which can not be set using the SMS templates (e.g. if parts of a data point description or of an alias should be contained in the text). The Communication Center offers the possibility to make adjustments to SMS messages after the release of the SMS template.
How to modify SMS texts before sending
-
Create a new CTRL library (GEDI menu -> Edit -> New CTRL Library) with e.g. the name hook.ctl.
-
Enter the following code to the library:
void hook_ccModifyMessageText(string &sText, atime atAlarmTime)
{
sText="New SMS text"; //Any text with which the SMS should be sent
}
The parameters of the hook_ccModifyMessageText()function have the following meaning:
-
sText - to be modified SMS text
-
atAlarmTime - consists of:
-
alarm time (to be cast to time)
-
alarm count (can be retrieved with getACount())
-
data point element at which the alarm occurred (can be retrieved with getAIdentifier())
-
Save and close the CTRL library.
-
Stop the WinCC OA project.
-
Load the created CTRL library by setting the entry
[ctrl_X] #X stands for the number of the CTRL manager
LoadCtrlLibs = "hook.ctl" #which executes the ccController.ctl
either in the <wincc_oa_path>/config/config.level file or the /config/configof the project directory.
-
Start the WinCC OA project.