Siemens S7-1200 TELECONTROL Operating Instructions Manual page 96

Hide thumbs Also See for S7-1200 TELECONTROL:
Table of Contents

Advertisement

Programming the program blocks
5.2 Programming SMS messages via OUC
Receiving SMS messages from several partners
As an alternative, you can create a separate block set for each partner as described above
for 1 partner or a single block set with the following special feature in the TCON_PHONE
block:
If you enter an asterisk (*) after the phone number body in the "PhoneNumber" parameter of
the TCON_Phone block, the asterisk acts as a placeholder for all authorized phone numbers
with this phone number body.
You configure the phone numbers authorized for access to the CP in STEP 7 in the
"Security" parameter group of the CP.
Message text to be sent in the "DATA" parameter
You enter the message text as a string in the "DATA" parameter of TSEND or TSEND_C.
A message can contain up to 160 characters. If the message text contains more than 160
characters, the text is distributed over two or more SMS messages.
Reading out the message text from the "DATA" parameter
To receive an SMS message, program the message text to be read out in the TRCV /
TRCV_C in the "DATA" parameter via a data block DB.
Create a DB of the data type "Struct". Open the properties dialog of the DB (shortcut menu
of the DB) and disable optimized block access in the "Attributes" parameter group.
In the structure of the DB, create the following data types for the SMS messages:
● DTL
12 bytes for the time stamp of the received SMS message (time stamp from the network)
● String[22]
String of 22 bytes for the phone number of the sender (+ 2 byte string header)
● String[160]
String of 160 bytes for the message text (+ 2 byte string header)
The SMS message text can contain max. 160 characters.
Per SMS message the structure requires memory space of 198 bytes.
Storing the last 10 received SMS messages
You can output up to 10 received SMS messages from the receive block by making the entry
"SMSSTORE" for the "PhoneNumber" parameter of TCON_PHONE.
To store the received data from 10 SMS messages , you need to create an adequately large
structure (2000 bytes) for the "DATA" parameter of the receiving block. As described above,
the structure has the following organization:
● Received data SMS 1 (DTL, String[22], String[160], Byte)
● Received data SMS 2 (DTL, String[22], String[160], Byte)
... to
● Received data SMS 10 (DTL, String[22], String[160], Byte)
96
Operating Instructions, 10/2016, C79000-G8976-C311-02
CP 1242-7 GPRS V2

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

S7-1200 - telecontrolCp 1242-7 gprs v2

Table of Contents