Open User Communication
6.8 Setting up communication via e-mail
Communication
Function Manual, 05/2021, A5E03735815-AJ
133
6.8
Setting up communication via e-mail
Setting up a connection for e-mail via the user program
For communication using e-mail, you need to create the data block of the relevant system
data type yourself, assign parameters and call the instruction directly. This procedure is
introduced below.
Procedure for setting up communication using e-mail
A CPU can send e-mails. To send e-mails from the user program of the CPU, use the TMAIL_C
instruction.
Requirement:
The SMTP server can be reached via the IPv4 network.
1.
Configure an S7-1500 automation system with CPU in the network view of the Devices &
networks editor of STEP 7.
2.
Assign parameters to the instruction TMAIL_C, for example enter the subject of the e-mail in
Subject.
3.
In a global data block create a variable of the type TMAIL_v4, TMAIL_v6 (only CP 1543-1) or
TMAIL_FQDN (only CP 1543-1).
4.
Set the connecting parameters of the TCP connection in the variable in the "Start value"
column. Enter the IPv4 address of the mail server, for example, for the "MailServerAddress"
(for TMAIL_v4)
Note
Connection parameter Interface ID
Note that you can enter the value "
0
" for the interface ID with instruction version V5.0 or
higher of the instruction TMAIL_C in the data type TMAIL_V4_SEC. In this case, the CPU
itself searches for a suitable local CPU interface.
Interconnect the variable to the MAIL_ADDR_PARAM parameter of the TMAIL_C
instruction.
5.
Download the hardware configuration and user program to the CPU.
Additional information
The STEP 7 online help describes:
•
The system data types
•
The instructions for open communication
•
The connection parameters
Summary of Contents for SIMATIC ET 200AL
Page 2: ......
Page 143: ......
Page 218: ......
Page 250: ......
Page 296: ......
Page 337: ......
Page 365: ......
Page 392: ......
Page 419: ......
Page 451: ......
Page 483: ......
Page 597: ......
Page 648: ......
Page 702: ......
Page 739: ......
Page 781: ......
Page 804: ......
Page 828: ......
Page 853: ......
Page 880: ......
Page 906: ......
Page 996: ...Diagnostics ...
Page 1121: ......
Page 1565: ......