EasyManuals Logo

Siemens CP 1242-7 GPRS V2 User Manual

Siemens CP 1242-7 GPRS V2
132 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #96 background imageLoading...
Page #96 background image
Programming the program blocks
5.2 Programming SMS messages via OUC
CP 1242-7 GPRS V2
96 Operating Instructions, 10/2016, C79000-G8976-C311-02
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)

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens CP 1242-7 GPRS V2 and is the answer not in the manual?

Siemens CP 1242-7 GPRS V2 Specifications

General IconGeneral
BrandSiemens
ModelCP 1242-7 GPRS V2
CategoryController
LanguageEnglish

Related product manuals