No messages from WinCC


Thread Starter

Mark Oldfield

Has anyone had any sucess with Siemens WinCC Messanger add-in. All I want to do is send an email when an alarm is set high. Can get it to send a blank email to a fixed address but can't seem to add any text. I would even like to send a dynamic text like "..Vessel No. %n% overtemperature..." but I suppose thats going too far!! It only works on the page the control is dropped onto but I want it to work all the time. Maybe I've bought the wrong package?

Salma Ghafoor

You're right, you can't add dynamic text to the body of the e-mail using Messenger. However you can dynamically build up the Subject.

This can be done using a C-script against the Subject property to get the tag value and concatenate the string.

Alternatively, you can have write the message to a text/html/anything-format file and attach this file to the e-mail.

As the Messenger control is an ActiveX control, it needs to be loaded onto an open window for the scripts to run. An easy way to get around this is to place it on the header/footer window (i.e. any window that is always open) and shrink it down to 1 pixel height and width.

If all else fails, WinCC supports OLE Automation scripts so you could use CDO/CDONTS scripting to send/receive e-mails. I have done this quite easily using the CDONTS (don't have Exchange to test the CDO scripting) but it's not as sophisticated as Messenger and you are effectively reinventing the wheel.

Hope this helped