How can you use a PC to simulate or realize sending e-mails in the case of an HMI station message?
With WinCC flexible, the triggering of bit or analog messages can cause e-mails to be sent to the operators. You can use any SMTP server (e-mail output server) for sending e-mails, which doesn't need any authentication. As from WinCC flexible 2005, also SMTP servers that require authentication via a valid e-mail address are supported. SMTP servers that require authentication with user name and password can be used as from WinCC flexible 2008 SP1.
- Information on SMTP servers
3.1 Configuration of the SMTP server
3.2 Configuration of WinCC flexible
3.3 Verification of the configuration
1. Information on SMTP servers
In addition to the many SMTP servers in the Internet, you can also integrate your own SMTP server in the local network. In this example we use the "PostCast Server" that is available for downloading at the Internet address http://www.postcastserver.com/download/.
Alternatively you can also install the SMTP server on a separate computer and use it with a Multi Panel via Ethernet, for example. Communication between the panel or a second PC and the SMTP server is exclusively via Ethernet.
Communication between S7 controller and panel must not necessarily be via Ethernet as shown in Fig. 02.
There must be a connection to the SMTP server before you can send e-mails.
|SMTP||Simple Mail Transfer Protocol||E-mail output server|
|IMAP||Internet Mail Access Protocol||E-mail input server|
|POP3||Post Office Protocol Version 3|
- From STEP 7 V5.3 onwards
- As from WinCC flexible 2005 SP1 (Advanced Edition for PC Runtime)
- SMTP server
How to send e-mails via a local SMTP server is demonstrated in a STEP 7 project available for downloading.
3.1 Configuration of the SMTP server
In the following we will primarily explain the combined version (Fig. 01). There are however also notes on the separated version (Fig. 02) between SMTP server and the WinCC flexible Runtime via Ethernet.
The table below shows the settings for the SMTP server "PostCast Server".
Downloading the SMTP server
Unpack and install software
|3||Set up the SMTP server
Define conditions for sending e-mails
For simulation you should always select "Manually", because e-mails are not sent automatically and you can do without connection to an e-mail input server.
Limit the number of outgoing connections to a maximum of 20.
|6||Define other settings|
The following settings in the "Administration" tab should be set by default. But you should nevertheless check the following points and act where applicable:
The settings in the "Advanced" should also be set by default. In any case you should always verify and if necessary, make the following settings:
The sending of e-mails is demonstrated taking the example of a fan, which is available for downloading at the end of this entry. The fan is simulated by the STEP 7 program and must be transferred to an S7 controller or S7-PLCSIM for the simulation.
If you use the sample project and you know the configuration for sending e-mails in WinCC flexible, then you can go directly to the next table.
|1||Create a WinCC flexible project|
Create a new WinCC flexible project and select the PC Runtime.
|2||Configure the connection|
It is of no importance whatsoever which connection you choose for sending e-mails. You must simply ensure that there is a physical connection between the SMTP server and the operator panel.
|3||Configure the SMTP server|
The name of the SMTP server must be made known for WinCC flexible Runtime to be able to communicate with an SMTP server.
No SMTP authentication is needed for the "PostCast server". If you are using a different SMTP server that requires authentication via a valid e-mail address (as from WinCC flexible 2005), then you must enter this in the "SMTP Authentication" input field.
|4||Create analog and bit alarms|
In order to have e-mails sent when an alarm is triggered, you must create analog and/or bit alarms.
Optionally you can also create bit alarms in addition. For this you proceed as follows.
|5||Specify the e-mail address in the alarm class|
Open the "Alarm Classes" tab and enter the relevant e-mail address. In this example we use the fictitious e-mail address "email@example.com".
|1||Transfer the STEP 7 project
|2||Start PostCast Server|
You must first start "PostCast Server" for it to be able to receive e-mails from WinCC flexible.
Start the PostCast Server in Windows via "Start > Programs > PostCast Server" and clicking on "PostCast Server", or by clicking on the desktop icon.
|3||Start WinCC flexible Runtime
|4||E-mails in the SMTP server|
Once the motor has been started and the maximum speed reached, e-mails are sent to the SMTP server according to the alarms configured.
If the SMTP server has a connection to the Internet or to the relevant e-mail input servers (POP3 or IMAP), you can send e-mails via the "Start" button. The requirement for this is that you use a real recipient e-mail address.
More information is available in the following entries.
|Sending of e-mails||Entry ID: 18984102|
|Sending of text messages (SMS)||Entry ID: 21184132|
Attachment 1 contains the sample project described including the STEP 7 program with the motor simulation for WinCC flexible. The SMTP server is not include and cannot be procured from SIEMENS AG.
Attachment 1: WinCC_flex_SMTP.zip ( 3548 KB )
Runnability and test environment:
The following table lists the components that have been used to create this entry and verify the functions described.
|Components||Product and version designation|
|PC operating system||Microsoft Windows XP SP2|
|Standard tools||PostCast Server V2.6.0|
|Engineering tool||STEP 7 V5.3 SP3|
|HMI software||WinCC flexible 2005 SP1|
SendEmail, Error message, E-mail, Sending e-mails