| View previous topic :: View next topic |
| Author |
Message |
touma02 Junior

Joined: 16 Jul 2012 Posts: 9
|
Posted: 12/09/2015 11:25 Post subject: Mail s7-1200 |
|
|
Hello
Is it possible to send value of word like mw100 in mail?
If yes, how you use tm-mail for this ?
Thx |
|
| Back to top |
|
 |
kaka Member

Joined: 16 Mar 2014 Posts: 154
|
Posted: 12/09/2015 13:21 Post subject: Re: Mail s7-1200 |
|
|
| touma02 wrote: | Hello
Is it possible to send value of word like mw100 in mail?
If yes, how you use tm-mail for this ?
Thx |
The TM_MAIL instruction sends an e-mail using SMTP (Simple Mail Transfer Protocol) by means of TCP/IP over the Industrial Ethernet connection of the CPU. You need an Ethernet-based internet connection or a TeleService adapter for the connection with telephone network lines.
https://support.industry.siemens.com/cs/document/67262019/how-do-you-parameterize-the-%22tm_mail%22-instruction-to-send-e-mails-with-the-simatic-s7-1200 |
|
| Back to top |
|
 |
touma02 Junior

Joined: 16 Jul 2012 Posts: 9
|
Posted: 12/09/2015 15:39 Post subject: |
|
|
| It'is not an answer of my question... |
|
| Back to top |
|
 |
tecnoplc Junior 2

Joined: 03 Feb 2016 Posts: 40 Location: Spain
|
Posted: 03/02/2016 08:52 Post subject: |
|
|
please if someone knows the answer for this ítem, Write the solution. I am very interested in.
thank you. _________________ _______________________________________
Programming PLC and HMI
www.tecnoplc.com |
|
| Back to top |
|
 |
kaka Member

Joined: 16 Mar 2014 Posts: 154
|
Posted: 23/02/2016 21:09 Post subject: |
|
|
| touma02 wrote: | | It'is not an answer of my question... |
you do not read with attention ...
On Inputs of the "TMAIL_C" instruction
you have ATTACHMENT Variant E-mail attachment (optional)
Reference to a byte/word/double word field (ArrayOfByte, ArrayOfWord, ArrayOfDWors) with a maximum length of 64 kbyte.
If no value is assigned, the e-mail is sent without an attachment.
What you need to do is to move your values (remember max 64 KBytes) from MW100 to array of word and in attachment put the pointer to that area....
Last edited by kaka on 07/06/2018 16:24; edited 1 time in total |
|
| Back to top |
|
 |
kaka Member

Joined: 16 Mar 2014 Posts: 154
|
Posted: 06/03/2016 13:54 Post subject: Sending of Emails to SMTP Server with a S7-CPU |
|
|
Sending of Emails to SMTP Server with a S7-CPU
https://support.industry.siemens.com/cs/document/46817803/sending-of-emails-to-smtp-server-with-a-s7-cpu
With the help of a FB PN_Mail (FB490) function block, emails can be sent to any SMTP server from
S7-300/400 CPUs
ET200S/IM151 distributed I/Os
ET200PRO/IM154-8 CPUs
WinAC computers such as SIMATIC Microbox PCs
Triggering the sending can be made dependent on any system events (variable states, error messages, expiry of deadlines). In the attachment of the mails up to 64kByte binary data can be transmitted. For the secure authentication the established SMTP-AUTH method is used.
Note
For the S7-1200 and the S7-1500, instructions for the use of the CPUs are provided already by STEP 7 as SMTP client.
STEP7 V5.5
https://support.industry.siemens.com/cs/attachments/46817803/46817803_SMTP_Mailversand_DOKU_V15_en.pdf
https://support.industry.siemens.com/cs/attachments/46817803/46817803_SMTP-Mailversand_CODE_15.zip
STEP7 V12
https://support.industry.siemens.com/cs/attachments/46817803/46817803_SMTP_Mail_DOKU_V12_V1_0_en.pdf
https://support.industry.siemens.com/cs/attachments/46817803/46817803_SMTP_V12_CODE_V1_0.zip
Last edited by kaka on 07/06/2018 16:24; edited 1 time in total |
|
| Back to top |
|
 |
kaka Member

Joined: 16 Mar 2014 Posts: 154
|
Posted: 04/01/2018 13:05 Post subject: TMAIL_C instruction to send e-mails withS7-1200 and S7-1500 |
|
|
How do you parameterize the "TMAIL_C" instruction to send e-mails with the SIMATIC S7-1200 and S7-1500?
https://support.industry.siemens.com/cs/document/67262019/
Using the "TMAIL_C" instruction to send e-mails with the SIMATIC S7-1200 and SIMATIC S7-1500.
The "TMAIL_C" instruction uses the SMTP (Simple Mail Transfer Protocol) to send an e-mail via the Ethernet interface of the S7-1200 > V4.0 or a communications processor (CP).
Using the "TMAIL_C" instruction, with version V4.0 and higher you can send e-mails via Secure Communication through the Ethernet interface of the following modules:
CP 1543-1 V2.0
CP 1542SP-1 IRC V1.0
CP 1543SP-1 V1.0
CP 1243-1 V2.1 and higher
CP 1242-7 GPRS V2 V2.1 and higher
CP 1243-7 LTE V2.1 and higher
CP 1243-8 V2.1 and higher
Via the system data type "TMAIl_V4_SEC", "TMAIL_V6_SEC" or "TMAIL_QDN_SEC" you define the data necessary for sending the e-mail including the TCP port of the e-mail server.
For the sake of compatibility you can also use the previous system data types "TMAIL_V4", "TMAIL_V6" and "TMAIL_FQDN". In this case you can also send an e-mail via the Ethernet interfaces of the CPUs and the Ethernet interface of the CP 1543-1.
Hardware requirements
In this example an e-mail is sent via an Ethernet-based internet connection. The following hardware components are used:
S7-1200 CPU
DSL router for access to the internet
The figure below shows the call of the "TMAIL_C" instruction including instance data block DB1 and an example of how to parameterize the inputs and outputs of the "TMAIL_C" instruction.
Note
In the CPU you must activate the router and set the correct IP address of the router. Otherwise the CPU cannot reach the public IP address of the e-mail server.
Via the Ethernet interface of the CPU the TMAIL_C instruction can communicate with an e-mail server using SMTP via Port 25. The assigned port number cannot be changed.
Via the CP the "TMAIL_C" instruction can establish a secure connection (SNMP over TSL) to an e-mail server.
In company networks which only permit internet access by proxy and usually block all the other ports including Port 25, you cannot use the "TMAIL_C" instruction to establish a connection to external e-mail servers via the Ethernet interface of the CPU . It must be possible to communicate externally over the TCP Port 25.
You can establish a connection through SMTP with an internal e-mail server and let the internal server manage the current security extensions required to forward e-mails via the internet to an external e-mail server.
Alternatively you can use a CP to establish a secure connection (SMTP over TSL) to an e-mail server with the "TMAIL_C" instruction.
https://support.industry.siemens.com/cs/document/46817803/sending-emails-to-smtp-servers-with-an-s7-cpu
Note
You should always implement Defense in Depth before connecting a CPU to the internet.
In the Security Siemens Operational Guidelines we give clear recommendations about how to act when connecting control components with office servers, in this example the e-mail server . It might be necessary to use a DMZ solution.
Further Information
Detailed information about the "TMAIL_C" instruction is available in the manual "STEP 7 Professional V14 SP1"
STEP 7 Professional V14 SP1
https://support.industry.siemens.com/cs/attachments/109747136/STEP_7_Professional_V14_1_enUS_en-US.pdf
Last edited by kaka on 07/06/2018 16:25; edited 1 time in total |
|
| Back to top |
|
 |
grig100 Member 3


Joined: 01 Jan 2015 Posts: 752
|
Posted: 06/04/2018 19:57 Post subject: parameterize the "TMAIL_C" instruction S7-1200 an |
|
|
How do you parameterize the "TMAIL_C" instruction to send e-mails with the SIMATIC S7-1200 and S7-1500?
https://support.industry.siemens.com/cs/document/67262019/
Using the "TMAIL_C" instruction to send e-mails with the SIMATIC S7-1200 and SIMATIC S7-1500.
The "TMAIL_C" instruction uses the SMTP (Simple Mail Transfer Protocol) to send an e-mail via the Ethernet interface of the S7-1200 > V4.0 or a communications processor (CP).
Using the "TMAIL_C" instruction, with version V4.0 and higher you can send e-mails via Secure Communication through the Ethernet interface of the following modules:
| Code: | CP 1543-1 V2.0
CP 1542SP-1 IRC V1.0
CP 1543SP-1 V1.0
CP 1243-1 V2.1 and higher
CP 1242-7 GPRS V2 V2.1 and higher
CP 1243-7 LTE V2.1 and higher
CP 1243-8 V2.1 and higher
|
Via the system data type "TMAIl_V4_SEC", "TMAIL_V6_SEC" or "TMAIL_QDN_SEC" you define the data necessary for sending the e-mail including the TCP port of the e-mail server.
For the sake of compatibility you can also use the previous system data types "TMAIL_V4", "TMAIL_V6" and "TMAIL_FQDN". In this case you can also send an e-mail via the Ethernet interfaces of the CPUs and the Ethernet interface of the CP 1543-1.
Hardware requirements
In this example an e-mail is sent via an Ethernet-based internet connection. The following hardware components are used:
S7-1200 CPU
DSL router for access to the internet
The figure below shows the call of the "TMAIL_C" instruction including instance data block DB1 and an example of how to parameterize the inputs and outputs of the "TMAIL_C" instruction.
Note
In the CPU you must activate the router and set the correct IP address of the router. Otherwise the CPU cannot reach the public IP address of the e-mail server.
Via the Ethernet interface of the CPU the TMAIL_C instruction can communicate with an e-mail server using SMTP via Port 25. The assigned port number cannot be changed.
Via the CP the "TMAIL_C" instruction can establish a secure connection (SNMP over TSL) to an e-mail server.
In company networks which only permit internet access by proxy and usually block all the other ports including Port 25, you cannot use the "TMAIL_C" instruction to establish a connection to external e-mail servers via the Ethernet interface of the CPU . It must be possible to communicate externally over the TCP Port 25.
You can establish a connection through SMTP with an internal e-mail server and let the internal server manage the current security extensions required to forward e-mails via the internet to an external e-mail server.
Alternatively you can use a CP to establish a secure connection (SMTP over TSL) to an e-mail server with the "TMAIL_C" instruction.
The application example "Send e-mails to SMTP server with an S7-CPU" describes the following tasks :
| Code: | Configure the Jana Server as internal mail server to forward an e-mail to an external mail server.
Establish a secure connection (SMTP over TSL) to an e-mail server via the CP. |
https://support.industry.siemens.com/cs/attachments/46817803/46817803_EMail_with_CP1543-1_en.pdf
https://support.industry.siemens.com/cs/attachments/46817803/46817803_smtp-mailversand_code_v10.zip
Note
You should always implement Defense in Depth before connecting a CPU to the internet.
In the Security Siemens Operational Guidelines we give clear recommendations about how to act when connecting control components with office servers, in this example the e-mail server . It might be necessary to use a DMZ solution.
https://support.industry.siemens.com/cs/document/46817803/
Further Information
More information is available in the STEP 7 (TIA Portal) manual under Description of TMAIL_C (S7-1200, S7-1500).
https://support.industry.siemens.com/cs/mdm/109755202?c=85840577163&lc=en-WW |
|
| Back to top |
|
 |
|