0% found this document useful (0 votes)
555 views41 pages

Sending and Receiving SMS Messages Via A SCALANCE M Router

This document describes an application that allows sending and receiving SMS messages via a SCALANCE M router. The application uses a function block called "EscalationSms" that is called cyclically in OB1 to send SMS messages if certain conditions are met. The SCALANCE M router must be configured with access details for the cellular network and SMS service center. Status and error messages are displayed for monitoring.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
555 views41 pages

Sending and Receiving SMS Messages Via A SCALANCE M Router

This document describes an application that allows sending and receiving SMS messages via a SCALANCE M router. The application uses a function block called "EscalationSms" that is called cyclically in OB1 to send SMS messages if certain conditions are met. The SCALANCE M router must be configured with access details for the cellular network and SMS service center. Status and error messages are displayed for monitoring.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

Application Example  06/2016

Sending and Receiving SMS


Messages via a SCALANCE M
Router
SCALANCE M874/M876, S7-1200/S7-1500 CPU / V1.0

https://support.industry.siemens.com/cs/ww/en/view/54361177
Warranty and Liability

Warranty and Liability

Note The Application Examples are not binding and do not claim to be complete regarding the
circuits shown, equipping and any eventuality. The Application Examples do not represent
customer-specific solutions. They are only intended to provide support for typical
applications. You are responsible for ensuring that the described products are used
correctly. These Application Examples do not relieve you of the responsibility to use safe
practices in application, installation, operation and maintenance. When using these
Application Examples, you recognize that we cannot be made liable for any
damage/claims beyond the liability clause described. We reserve the right to make
changes to these Application Examples at any time without prior notice. If there are any
deviations between the recommendations provided in this Application Example and other
Siemens publications – e.g. Catalogs – the contents of the other documents shall have
priority.
We do not accept any liability for the information contained in this document.
Any claims against us – based on whatever legal reason – resulting from the use of
the examples, information, programs, engineering and performance data etc.,
described in this application example shall be excluded. Such an exclusion shall
not apply in the case of mandatory liability, e.g. under the German Product Liability
Act (“Produkthaftungsgesetz”), in case of intent, gross negligence, or injury of life,
body or health, guarantee for the quality of a product, fraudulent concealment of a
deficiency or breach of fundamental contractual obligations (“wesentliche
Vertragspflichten”). The damages for a breach of a substantial contractual
obligation are, however, limited to the foreseeable damage, typical for the type of
 Siemens AG 2016 All rights reserved

contract, except in the event of intent or gross negligence or injury to life, body or
health. The above provisions do not imply a change of the burden of proof to your
detriment.
Any form of duplication or distribution of these Application Examples or excerpts
hereof is prohibited without the expressed consent of Siemens AG.

Security Siemens provides products and solutions with industrial security functions that support the
informa- secure operation of plants, systems, machines and networks.
tion To protect plants, systems, machines and networks against cyber threats, it is necessary
to implement (and continuously maintain) a holistic, state-of-the-art industrial security
concept. Products and solutions from Siemens are only one part of such a concept.
The customer is responsible for preventing unauthorized access to the customer’s plants,
systems, machines and networks. Systems, machines and components should be
connected to the company network or the Internet only if and to the extent necessary and
if appropriate protective action (e.g., use of firewalls and network segmentation) was
taken.
In addition, Siemens’ recommendations regarding appropriate protective action should be
followed. For more information about industrial security, visit
http://www.siemens.com/industrialsecurity.
Siemens’ products and solutions undergo continuous development to make them even
more secure. Siemens strongly recommends to perform updates as they become
available and use only the latest product versions. Using versions that are out of date or
no longer supported can increase the risk of cyber threats.
To stay informed about product updates as they occur, subscribe to the Siemens
Industrial Security RSS feed at http://www.siemens.com/industrialsecurity.

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 2
Table of Contents

Table of Contents
Warranty and Liability ................................................................................................. 2
1 Task ..................................................................................................................... 4
2 Solution............................................................................................................... 5
2.1 Overview............................................................................................... 5
2.2 Description of the core functionality ..................................................... 6
2.3 Overview and description of the user interface .................................... 8
2.4 Hardware and software components ................................................... 9
3 Principle of Operation ..................................................................................... 11
3.1 Complete overview of the “Escalation” program ................................ 11
3.1.1 Program overview .............................................................................. 13
3.1.2 Global data block: “EscalationParamDB” (DB1) ................................ 13
3.2 Functionality of the S7 station ............................................................ 15
3.2.1 Program details on the “EscalationSms” FB ...................................... 15
3.2.2 Call of the “EscalationSms” FB in OB1 .............................................. 18
3.2.3 “typeEscalation” PLC data type .......................................................... 19
3.3 Status and error displays.................................................................... 20
4 SCALANCE M874/M876 Configuration .......................................................... 21
4.1 Entering the SMS service center ........................................................ 21
4.2 Configuring the access details for the cellular network ...................... 22
 Siemens AG 2016 All rights reserved

4.3 Configuring SMS Relay (Outgoing) .................................................... 24


4.4 Configuring SMS Relay (Incoming) .................................................... 25
5 Installation and Startup ................................................................................... 28
5.1 Installing the hardware ....................................................................... 28
5.2 Installing the software ......................................................................... 29
5.3 Installing the application software ...................................................... 29
5.4 Startup ................................................................................................ 29
5.4.1 Setting the IP addresses .................................................................... 29
5.4.2 Assigning the IP address of the engineering station .......................... 30
5.4.3 Assigning the IP address of the SCALANCE M router ...................... 30
5.4.4 Loading the S7-1200/S7-1500 station ................................................ 32
6 Operation of the Application .......................................................................... 33
6.1 Overview............................................................................................. 33
6.2 Sending an SMS message – receiving an acknowledgment ............. 35
6.3 Sending an SMS message – no acknowledgment received .............. 38
7 Links & Literature ............................................................................................ 41
8 History............................................................................................................... 41

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 3
1 Task

1 Task
Introduction
The application example shows how messages can be sent to mobile service
personnel using a simple SMS-based escalation system via the SCALANCE
M874/M876 router.

Overview of the automation task


The figure below provides an overview of the automation task.
Figure 1-1

Escalation chain
Mobile service
 Siemens AG 2016 All rights reserved

Automation station
Level
alarm

Requirements
This application example is intended to meet the following requirements:
The S7 station
 sends a message to the first service employee,
 waits for a configured time for the service employee’s acknowledgment SMS
message,
 sends this message to the next employee if no acknowledgment has been
received within this time,
 saves the information of who has acknowledged the alarm SMS message,
 terminates the process with an error if no employee has acknowledged the
alarm SMS message.
The simulated process in the S7 station is to be operated and controlled with the
aid of visualization software.

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 4
2 Solution
2.1 Overview

2 Solution
2.1 Overview
Diagrammatic representation
The diagrammatic representation below shows the most important components of
the solution:
Figure 2-1

User program with:


• “EscalationSms”
• Library blocks from the
“LSmsSR” library

S7-1200 Cellular network

SCALANCE M874-3 Smartphones

Configuration
 Siemens AG 2016 All rights reserved

In this example, the SCALANCE M874-3 router is used to connect the S7-1200
CPU to the GSM network.
With the aid of the “LSmsSR” library, you can send messages to and receive
messages from a GSM-capable mobile device via SMS using the SCALANCE
M874-3 router (see \2\). The library blocks are called in the “EscalationSms” user
block that coordinates sending the message to the service personnel.
The application is visualized using WinCC Advanced.

Advantages
The solution presented here offers the following advantages:
 The library blocks and the “EscalationSms” FB directly provide usable
application code.
 The code of the “EscalationSms” FB
– already includes the above-described functions on a fully implemented
basis and
– can be easily customized for extensions.

Scope
This application does not include a description of
 SIMATIC NET Industrial Remote Communication Remote Networks
SCALANCE M-800 devices
 SIMATIC HMI operator panels
 the LAD/FBD/STL/SCL programming languages.
Basic knowledge of these topics is required.

Note This application example is implemented with an S7-1200 CPU. Alternatively, an


S7-1500 can be used.

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 5
2 Solution
2.2 Description of the core functionality

2.2 Description of the core functionality


Functions implemented
Figure 2-2
S7 station Service employee

Start

1 Users
2
Service employee 1
.
Service employee 2
.
.
.
.
Next employee

.
Service employee 5
5

5
 Siemens AG 2016 All rights reserved

1 min 3
No
Acknowledgment
Yes
6 4

Error Stop

1. Five service employees are parameterized for sending and receiving an alarm
SMS message.
2. The alarm SMS message is sent to the first parameterized service employee.
3. The station waits for 1 minute for the service employee’s acknowledgment.
4. If an acknowledgment has been received, the process is terminated.
5. If no acknowledgment has been received during this one minute, the alarm
SMS message is sent to the next service employee.
6. If none of the five parameterized service employees has acknowledged the
alarm SMS message, the process is terminated with an error.

Note For a more detailed description of these functions, please refer to Chapter 3 and
the following chapters.

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 6
2 Solution
2.2 Description of the core functionality

Performance data
The following table shows the performance data of the user block FB
“EscalationSms”.
Table 2-1
Criterion Performance Note
data
Number of service employees 5 Can be customized in the
block.
Number of alarm SMS messages 5
Maximum alarm SMS message 160 characters
length
S7 CPUs per SCALANCE M router 1
Request time for sending an alarm 5 sec Average time from send
SMS message trigger command to end of
send operation.
Wait time for an acknowledgment 1 min Can be customized in the
block.
 Siemens AG 2016 All rights reserved

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 7
2 Solution
2.3 Overview and description of the user interface

2.3 Overview and description of the user interface


The application example is visualized with WinCC Advanced using a configured
screen, “Escalation S7-1200 CPU”/“Escalation S7-1500 CPU”.

“Escalation S7-1200 CPU”


This screen visualizes the processes of the S7-1200/S7-1500 station.
Figure 2-3

5
1
6
2
7

8
9
 Siemens AG 2016 All rights reserved

10

Table 2-2
No. Item Description
1. “Users” Input field
Number of service employees to whom the alarm
SMS message is sent.
2. “Array of Users” Input fields
 Parameterized service employees to whom the
alarm SMS message is sent.
 Each employee is assigned a phone number and
a connection name.
 The employee to whom the alarm SMS message
is currently sent is displayed in “green.”
3. “Alarm SMS” Input field
Alarm SMS message that is sent to the service
employees.
4. “Send Alarm SMS” Button

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 8
2 Solution
2.4 Hardware and software components

No. Item Description


Starts the process.
5. “Escalation” Display
Indicates whether the process is active (flashes
green).
6. “Error” Display
Indicates whether an error has occurred (flashes red).
7. “Status” Output field
Returns the error message.
8. “Received Ack” Display
Indicates whether an acknowledgment has been
received (green).
9. “Employee data” Output fields
Data of the employee who sent the acknowledgment.
10. Change screen Click the buttons to display the appropriate screens.

2.4 Hardware and software components


The application was created with the following components:
 Siemens AG 2016 All rights reserved

Hardware components
Table 2-3
Component Article number No. Note
SCALANCE M874-3 6GK5874-3AA00-2AA2 1 Alternatively, you can use
any variants of the
SCALANCE M874 and M876
series.
SIMATIC S7-1200 6ES7217-1AG40-0XB0 1 Any S7-1200 CPU V4.0 or
CPU 1217C higher can be used.
DC/DC/DC

or Any S7-1500 CPU can be


used.
SIMATIC S7-1500 6ES7513-1AL01-0AB0
CPU 1513-1PN
ANT794-4MR 6NH9860-1AA00 1 GSM quad-band and UMTS
ANTENNA and LTE (Europe)
SIMATIC Memory 6ES7954-8LF01-0AA0 1 Memory Card for the
Card S7-1200/1500 CPU
(S7-1200 optional)
SIM card 1

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 9
2 Solution
2.4 Hardware and software components

Software components
Table 2-4
Component No. Article number Note
STEP 7 Professional V13 SP1 1 6ES7822-1AA03-0YA5
WinCC Advanced V13 SP1 1 6AV2102-0AA03-0AA7

Sample files and projects


The following list contains all files and projects that are used in this example.

Table 2-5
Component Note
54361177_SMS_SCALANCE_M_PROJ_V10.zip This zip file contains:
The STEP 7 V13/WinCC
Advanced project for the S7-1200
CPU
54361177_SMS_SCALANCE_M_DOC_V10_en.pdf This document.
 Siemens AG 2016 All rights reserved

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 10
3 Principle of Operation
3.1 Complete overview of the “Escalation” program

3 Principle of Operation
Key points of this application example:
 Configuration of the SCALANCE M847/M876 router using Web Based
Management for sending and receiving SMS messages (Chapter 4).
 The communication mechanisms in the S7 CPU for sending and receiving
SMS messages via the SCALANCE M router.

3.1 Complete overview of the “Escalation” program


The following figures show the program flow.

Send SMS message


Viewed from left to right, the following figure shows the sending of the alarm SMS
message to the service employees.
Figure 3-1

Station SCALANCE M Mobile service

S7 CPU User1
Port_number SMS Relay Outgoing “Text_1”
 Siemens AG 2016 All rights reserved

Username
Password Port number
“Text_1”
Username
Users Password
User1 Conn1 TelNo1 User5
.
User5 Conn5 TelNo5 “Text_1”

Receive acknowledgment
Viewed from right to left, the following figure shows the receiving of an
acknowledgment from a service employee.
Figure 3-2

Station SCALANCE M Mobile service

S7 CPU
IP address SMS Relay Incoming
Port number User1
“Text_1” Conn1
Conn5

Conn1

“RLY Conn1 “Text_1””


IP address
Users
Port number
User1 Conn1 TelNo1
.
User5 Conn5 TelNo5 Conn5 User5
IP address
Port number “RLY Conn5 “Text_1””

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 11
3 Principle of Operation
3.1 Complete overview of the “Escalation” program

Note At a given time, only one S7 CPU can establish a connection to the SCALANCE M
router and send the SMS message.

1. A positive edge in the “reqSndSms” input parameter of the “EscalationSms”


block starts the process.
2. When the message (“Text_1”) has been successfully sent to the first
employee, the block goes to wait.
3. If an acknowledgment with the correct content (“Text_1”, “ConnN”) is received
during this time, the block terminates.
4. Otherwise, the next employee is contacted when the time has elapsed. If an
error occurs, the process is terminated.
5. If no employee has sent an acknowledgment, the process is terminated with an
error.

Note In this application example, up to 5 connections with unique connection names


are created for each recipient (S7 CPU). Each employee is assigned a
connection name to allow assignment of the received acknowledgment.
 Siemens AG 2016 All rights reserved

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 12
3 Principle of Operation
3.1 Complete overview of the “Escalation” program

3.1.1 Program overview

The following figure shows the important elements of the program of the S7 station.
Figure 3-3

instDB_
Escalation LSmsSR_ Escalation
Main Sms
Sms SndSms

LSmsSR_ Escalation
RcvSms ParamDB

User block Library blocks Data blocks

Table 3-1
Element Symbolic name Description
 Siemens AG 2016 All rights reserved

OB1 Main Cyclic OB: Call of the user program


FB3 EscalationSms The “Escalation” FB includes the described
functions.
FB1 LSmsSR_SndSms Library block for sending an SMS message
FB2 LSmsSR_RcvSms Library block for receiving an SMS message
DB3 instDB_EscalationSms Instance data block of the user block
DB1 EscalationParamDB Global data block for saving the data:
 Parameters for “LSmsSR_SndSms”
 Parameters for “LSmsSR_RcvSms”
 Parameters for “EscalationSms”

3.1.2 Global data block: “EscalationParamDB” (DB1)

The “EscalationParamDB” contains:


 The “LSmsSR_typeSmsSnd” PLC data type that contains the parameters for
sending an SMS message (see Library Description, Chapter 3.1.4),
 the “LSmsSR_typeSmsRcv” PLC data type that contains the parameters for
receiving an SMS message (see Library Description, Chapter 3.2.4),
 the “typeEscalation” PLC data type that contains the parameters for the
escalation process (see Chapter 3.2.3),
 the PLC tags for calling the “EscalationSms” FB in OB1 and
 the PLC tags for visualizing the process.

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 13
3 Principle of Operation
3.1 Complete overview of the “Escalation” program

Figure 3-4
 Siemens AG 2016 All rights reserved

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 14
3 Principle of Operation
3.2 Functionality of the S7 station

3.2 Functionality of the S7 station


3.2.1 Program details on the “EscalationSms” FB

The “EscalationSms” function block starts the escalation process (see Chapter
2.2). Internally, it calls the blocks of the “LSmsSR” library for sending the message
to the service employees, “LSmsSR_SndSms”, and for receiving an
acknowledgment from them, “LSmsSR_RcvSms”.
Figure 3-5

reqSndSms

Start
Users
UserNo
alarmSms

i=1

User= User[i]
 Siemens AG 2016 All rights reserved

LSmsSR_ Send alarmSms


SndSms
Library blocks

1 min
LSmsSR_ Wait for acknowledgment
RcvSms

Yes ConName Yes


NDR alarmSms

No
No
i=i+1

Save
employee
Yes i <= data
UserNo

No

Error= No Ack

Stop

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 15
3 Principle of Operation
3.2 Functionality of the S7 station

The following figure and table show the call interface of the user block FB
“EscalationSms” (FB3).
Figure 3-6
 Siemens AG 2016 All rights reserved

Table 3-2
Name Data type Description
reqSndSms Bool Starts the escalation process.
Input

Responds to a positive edge.

smsParamSnd “LSmsSR_typeSmsSnd” Parameters required for sending


PLC data type an SMS message (see Library
Description, Chapter 3.1.4)
smaParamRcv “LSmsSR_typeRcvRcv” Parameters required for receiving
PLC data type an SMS message (see Library
InOut

Description,
Chapter 3.2.4).
escalationParam “typeEscalation” Parameters required for the
PLC data type escalation process (see Chapter
3.2.3).
alarmSms String Message sent to the service
employees.

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 16
3 Principle of Operation
3.2 Functionality of the S7 station

Name Data type Description


done Bool Message successfully sent to
service employee.
Only valid for one cycle.
busy Bool If the “EscalationSms”
block is busy, busy=TRUE.
busy is set to FALSE as soon as
the escalation process has
completed successfully or with an
error.
Output

error Bool Provides feedback if an error


occurs while executing a routine.
Only valid for one cycle.
Default value: FALSE
status Dword When error = TRUE: Returns the
status to narrow down the cause
of the error (see Chapter 3.3).
Only valid for one cycle.
ackRcv Bool Signals that an acknowledgment
has been received.
Only valid for one cycle.
 Siemens AG 2016 All rights reserved

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 17
3 Principle of Operation
3.2 Functionality of the S7 station

3.2.2 Call of the “EscalationSms” FB in OB1

The “EscalationSms” FB (FB3) is called cyclically in OB1. The input and output
parameters are stored in the global data block, “EscalationParamDB”, (see Chapter
3.1.2).
Figure 3-7
 Siemens AG 2016 All rights reserved

Note If multiple “EscalationSms” FBs are called in OB1, you have to modify the
ConnectionIDs of the library blocks. These IDs must be unique for each call.

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 18
3 Principle of Operation
3.2 Functionality of the S7 station

3.2.3 “typeEscalation” PLC data type

The “typeEscalation” PLC data type contains the parameters for the escalation
process.
To start up the application, this data type is used in the global data block,
“EscalationParamDB” (see Chapter 3.1.2), that is linked to the “escalationParam”
InOut parameter of the function block.
Figure 3-8

Table 3-3
Name Data type Description
Users Array[1..5, 1..3] of String[40] List of service employees to whom the
 Siemens AG 2016 All rights reserved

message (alarmSms) is sent.


User[n,1]: Employee name
User[n,2]: Employee phone number
User[n,3]: Employee connection name

Note:
Each employee is assigned a connection
name for assigning the acknowledgment.
UserNo Int Number of service employees to whom
the message (alarmSms) is sent.
The maximum value in this example is
“5”.
alarmSms Array[1..5] of String[160] List of any messages sent to the services
employees.
rcvAckUser Array[1..3] of String[40] List of employee data from whom an
acknowledgment was received.
User[1]: Employee name
User[2]: Employee phone number
User[3]: Employee connection name
escalationTime Time Wait time for acknowledgment.
In this example, this time is set to 1
minute.

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 19
3 Principle of Operation
3.3 Status and error displays

3.3 Status and error displays


For error diagnostics, the “EscalationSms” function block has a “status” output. By
reading the “status” output of the function block, you are provided with information
on logical errors and error messages that occur in the library blocks.
The table below provides a list of possible error messages.
Table 3-4
Status Meaning Remedy / notes
16#00008201 The list of employee data is Enter the employee data in
incomplete. the list.

Note:
When UserNo=5, enter the
data for 5 employees.
16#00008202 The escalation process is complete
without acknowledgment.

Note For information on the error messages that occur in the library blocks, please
refer to the Library Description, Chapter 3.3 \2\.
 Siemens AG 2016 All rights reserved

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 20
4 SCALANCE M874/M876 Configuration
4.1 Entering the SMS service center

4 SCALANCE M874/M876 Configuration


In order for the router to send/receive SMS messages, make the following settings
on the device’s Web Based Management page:
 Enter the SMS service center
 Configure the access details for the cellular network
 Configure SMS Relay (Outgoing)
 Configure SMS Relay (Incoming)

4.1 Entering the SMS service center


To enable the router to send an SMS message, enter the short message service
center (SMSC) of your mobile service provider or service provider.
With the router’s WBM page (“System > SMS> General”), you can replace the
default SMS service center call number by another one. This depends on your
contract.

Note The SMSC number is only required for sending SMS messages. If you only want
to receive SMS messages, this number is irrelevant.
 Siemens AG 2016 All rights reserved

Figure 4-1

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 21
4 SCALANCE M874/M876 Configuration
4.2 Configuring the access details for the cellular network

4.2 Configuring the access details for the cellular network


Access to the cellular network and the mobile telecommunications services
requires the following access parameters:
 SIM card PIN
 APN access data
Table 4-1
No. Action
1. Open the router’s WBM page.

Note:
In the address bar of the web browser, enter the IP address or the URL of the
device.
2. Enter the user name “admin” and the associated password.
Click the “Login” button or confirm your entries with “Enter”.
 Siemens AG 2016 All rights reserved

Note:
When you log in for the first time or after “Restore Factory Defaults and Restart”,
enter the default password, “admin”.
3. In the “SIM” tab of the WBM page of the SCALANCE M874/M876, enable the
mobile network interface, “Interfaces > Mobile > SIM”.

4. Enter the SIM card PIN.

Note:
The PIN can be obtained from your mobile service provider.

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 22
4 SCALANCE M874/M876 Configuration
4.2 Configuring the access details for the cellular network

No. Action
5. Open the “Operator” tab: “Interfaces > Mobile > Operator” and check the “Manual
APN” check box.

6. In “APN”, enter the name of the mobile network operator.


Entering a user name and password is optional.

Note:
When the “Manual APN” check box is unchecked, the device automatically selects
the appropriate access parameters from the list of mobile network operators. By
factory default, the access details of four mobile network operators are set and
activated. The manually configured APN will be ignored.
 Siemens AG 2016 All rights reserved

Note These access parameters can be obtained from your mobile network operator.

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 23
4 SCALANCE M874/M876 Configuration
4.3 Configuring SMS Relay (Outgoing)

4.3 Configuring SMS Relay (Outgoing)


To enable the router to send an SMS message, make the following settings on the
router’s WBM page:
Table 4-2
No. Action
1. On the WBM page of the SCALANCE M874/M876, open the “SMS” tab:
“System > SMS > SMS Relay (Outgoing)”
2. Enable the sending of SMS messages from the local network.

3. Enter the user name and password that must be included before the text is sent by
SMS.
 Siemens AG 2016 All rights reserved

Note:
The user name and password must match the values entered in the “username”
and “password” “EscalationParamDB.SmsSndParam” parameters. The following
values have been entered in this example:
 User: admin
 Password: connection
4. Enter the port on which the SCALANCE M receives the SMS message.

Note:
This port number must match the port address entered in the “remotePort”
“EscalationParamDB.SmsSndParam” parameter (here: 26864).

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 24
4 SCALANCE M874/M876 Configuration
4.4 Configuring SMS Relay (Incoming)

Note At a given time, only one S7 CPU can establish a connection to the SCALANCE
M router and send the SMS message.
If multiple CPUs attempt to establish a connection to the SCALANCE M router at
a given time, the escalation block is terminated with error 16#000180A1 (The
specified connection or the port is already being used) (see Library Description,
Chapter 3.3 \2\).

4.4 Configuring SMS Relay (Incoming)


To enable the router to receive an SMS message and send it to the application,
make the following settings on the router’s WBM page:
Table 4-3
No. Action
1. On the WBM page of the SCALANCE M, open the “SMS Command” tab.
“System > SMS > SMS Command” and enter all phone numbers from which the
router should receive a command SMS message.
 Siemens AG 2016 All rights reserved

For these phone numbers, check “Relay”.


2. Open the “SMS Relay (Incoming)” tab.
“System > SMS > SMS Relay (Incoming)”.
3. Create a relay connection.
Note:
In this example, up to 5 relay connections are created for each recipient (S7 CPU).
One for each service employee to send an acknowledgment.

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 25
4 SCALANCE M874/M876 Configuration
4.4 Configuring SMS Relay (Incoming)

No. Action
4. Enter
a. a unique name for the relay connection,
b. the recipient’s IP address (IP address of the S7 CPU),
c. the port number.

Note:
 The connection name is entered in the command SMS message on the cellular
device:
RLY Connection Name smsText In this way, you define to which recipient
(CPU) the message will be relayed.
 In this example, the connection name is additionally used to assign the
received acknowledgment.
 The port number must match the port address entered in the “localPort”
“EscalationParamDB.smsRcvParam” parameter (here: 26860).
 Siemens AG 2016 All rights reserved

5. Enter the user name to check the reception of the message. The user name is
entered in the frame.

6. Enter the password associated with the user name.

Repeat the password to confirm it.


7. Use “Create” to create the new relay connection.

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 26
4 SCALANCE M874/M876 Configuration
4.4 Configuring SMS Relay (Incoming)

No. Action
8. Repeat steps 3-7 for each service employee from whom an acknowledgment is
expected.

Note:
Each service employee is assigned a connection name for assigning the received
acknowledgment.
 Siemens AG 2016 All rights reserved

Note For a more detailed description of how to configure the SCALANCE M874/M876
router using Web Based Management, please refer to the device manual (see
\3\).

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 27
5 Installation and Startup
5.1 Installing the hardware

5 Installation and Startup


This chapter describes the steps necessary to install and start up the example
using the hardware list and the code from the download.
For the necessary hardware components, please refer to Chapter 2.4.

Note Always follow the installation guidelines for all components.

NOTICE Before you switch on the power supply, complete and check the
installation!

5.1 Installing the hardware


The figure below shows the hardware configuration of the application with an
S7-1200 CPU.
Figure 5-1

Engineering station
 Siemens AG 2016 All rights reserved

192.168.0.100

24 V

192.168.0.2 192.168.0.3

Industrial Ethernet
24 V
S7-1200
SCALANCE
M874/ M876

Table 5-1
No. Action
1. Insert your SIM card into the SCALANCE M router.
2. Attach the individual modules to a suitable rack.
3. Connect the CPU to the SCALANCE M router.
4. Connect the antenna to the SCALANCE M router.
5. Connect the engineering PG to the PROFINET interface of the S7 CPU.

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 28
5 Installation and Startup
5.2 Installing the software

No. Action
6. Connect the CPU 1217C and the SCALANCE M router to a 24 V DC power source.
7. Connect the DC power source to the power grid (220 / 230 V AC).

5.2 Installing the software


Engineering PC/PG
Table 5-2
No. Action Comment
1. Install STEP 7 V3 SP1, Update 7.
2. Install WinCC Advanced SP1, Follow the instructions of the installation
Update 7. program.

5.3 Installing the application software


Unzip the “54361177_SMS_SCALANCE_M_PROJ_V10.zip” file. This folder
contains the STEP 7 project, “SMS_SCALANCE_M”, with the
 Siemens AG 2016 All rights reserved

 project for the S7-1200


 WinCC project, “SMS_Application”.

5.4 Startup
5.4.1 Setting the IP addresses

The following table shows the configured IP addresses.


Table 5-3
Module IP address Subnet mask
Station 1: 192.168.0.2 255.255.255.0
CPU 1217C DC/DC/DC
Engineering PC/PG 192.168.0.100 255.255.255.0
SIMATIC MP377 Multi Panel 192.168.0.4 255.255.255.0
SCALANCE M874/M876 192.168.0.3 255.255.255.0

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 29
5 Installation and Startup
5.4 Startup

5.4.2 Assigning the IP address of the engineering station

The following table shows the network settings to which you have to change the
engineering station.
Table 5-4
No. Action
1. Open the Internet Protocol (TCP/IP) Properties:

“Start > Settings > Network Connection >Local Connections”


2. In the open window, select Internet Protocol (TCP/IP) and open Properties.
3. Select the “Use the following IP
address” radio button and fill out the
field as shown in the screenshot.
Select “OK” to close the dialogs.
 Siemens AG 2016 All rights reserved

4. If your PG has an IWLAN interface, disable it.

5.4.3 Assigning the IP address of the SCALANCE M router

For a connection to be established between the device and the S7 CPU, both
devices must be in the same LAN.
Table 5-5
No. Action
1. Open the router’s WBM page.

Note:
In the address bar of the web browser, enter the IP address or the URL of the
device. By factory default, the SCALANCE M router can be reached at the following
IPv4 address:
 IP address: 192.168.1.1
 Subnet mask: 255.255.255.0

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 30
5 Installation and Startup
5.4 Startup

No. Action
2. Enter the user name “admin” and the associated password.
Click the “Login” button or confirm your entries with “Enter”.

Note:
When you log in for the first time or after “Restore Factory Defaults and Restart”,
enter the default password, “admin”.
3. In the “Layer 3 > Subnets > Configuration” tab, configure the subnet for the
interface.
 Siemens AG 2016 All rights reserved

4. Select “Set Values” to apply the new values.

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 31
5 Installation and Startup
5.4 Startup

5.4.4 Loading the S7-1200/S7-1500 station

Requirements
 A connection has been established between your engineering station and the
CPU (for example, via the PROFINET interface).
 The CPU must be in a mode that allows downloading.
 Before downloading the user program, a general reset of the CPU should be
performed to ensure that no “old” blocks are on the CPU.
Table 5-6
No. Action
1. Unzip the “54361177_SMS_SCALANCE_M_PROJ_V10.zip” project.
2. Open the STEP 7 V13 project, “SMS_SCALANCE_M.ap13”.
3. Select the “S7-1200” or “S7-1500” station.
 Siemens AG 2016 All rights reserved

4. Download the project to the S7-1200 or S7-1500 station.

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 32
6 Operation of the Application
6.1 Overview

6 Operation of the Application


6.1 Overview
HMI menu
The application is visualized with WinCC Advanced using a configured screen
form: “Escalation S7-1200 CPU”.
Figure 6-1

Main menu
 Siemens AG 2016 All rights reserved

Escalation S7-1200 CPU


Main menu
The main menu allows you to open the application example and toggle between
“Escalation S7-1200 CPU” and “Escalation S7-1500 CPU”.

“Escalation S7-1200 CPU” screen


The “S7-1200 Application” screen visualizes the process of the S7-1200 station.
You can toggle between “main menu” and “Escalation S7-1500 CPU”.

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 33
6 Operation of the Application
6.1 Overview

Watch table of the S7-1200 station


As an alternative to the HMI, you can use the “S7_1200_WT” table to monitor or
modify the tags of the “EscalationParamDB”. For a description of the tags, please
refer to Chapter 3.1.2 and Chapter 3.2.3.
Figure 6-2
 Siemens AG 2016 All rights reserved

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 34
6 Operation of the Application
6.2 Sending an SMS message – receiving an acknowledgment

6.2 Sending an SMS message – receiving an


acknowledgment
The S7-1200 station sends an alarm SMS message to the service employees.
After a certain time, it receives an acknowledgment. The data of the employee who
sent the acknowledgment is saved. The following table provides instructions for this
job.
Table 6-1
No. Action
1. Open the “StartScreen”.
 Siemens AG 2016 All rights reserved

2. Click the “Start Simulation” icon to start the


WinCC Advanced simulation.

3. Open the “S7-1200” screen and enter the number of employees, “Users”, to whom
the SMS message is sent.

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 35
6 Operation of the Application
6.2 Sending an SMS message – receiving an acknowledgment

No. Action
4. Fill the list of employees with the required data:
 Employee name
 Phone number
 Connection name

On the router’s WBM page, each employee was assigned a connection name.
Note:
The number of employees you have to enter in the list depends on the number of
employees, “Users”.
5. Enter the “Alarm101” SMS message.
 Siemens AG 2016 All rights reserved

6. Start the escalation process.

The process is active.

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 36
6 Operation of the Application
6.2 Sending an SMS message – receiving an acknowledgment

No. Action
7. The SMS message was sent to the first employee.
The station waits for an acknowledgment.

8. The SMS message was sent to the second employee, because no acknowledgment
was received within the time (1 min).

9. From your mobile device with the phone number of the second employee, send a
command SMS message in the following format:
RLY connection2 Alarm101
 Siemens AG 2016 All rights reserved

Note:
The alarm SMS message (“Alarm101”) and the acknowledgment SMS message
(“Alarm101”) must match.
10. The station receives the
acknowledgment from the second
employee, saves the employee’s data
and terminates the process.

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 37
6 Operation of the Application
6.3 Sending an SMS message – no acknowledgment received

6.3 Sending an SMS message – no acknowledgment


received
The S7-1200/S7-1500 station sends an SMS message to the service employees.
An acknowledgment has not been received when the time has elapsed. The
process is terminated with an error. The following table provides instructions for
this job.
Table 6-2
No. Action
1. Open the “StartScreen”.
 Siemens AG 2016 All rights reserved

2. Click the “Start Simulation” icon to start the


WinCC Advanced simulation.

3. Open the “S7-1200” screen and enter the number of employees, “Users”, to whom
the SMS message is sent.

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 38
6 Operation of the Application
6.3 Sending an SMS message – no acknowledgment received

No. Action
4. Fill the list of employees with the required data:
 Employee name
 Phone number
 Connection name

On the router’s WBM page, each employee was assigned a connection name.
Note:
The number of employees you have to enter in the list depends on the number of
employees, “Users”.
5. Enter the “Alarm101” SMS message.
 Siemens AG 2016 All rights reserved

6. Start the escalation process.

The process is active.

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 39
6 Operation of the Application
6.3 Sending an SMS message – no acknowledgment received

No. Action
7. The SMS message was sent to the first employee.
The station waits for an acknowledgment.

8. The SMS message was sent to the second employee, because no acknowledgment
was received within the time (1 min).

9. The process is terminated with error message 16#00008202, because no


acknowledgment has been received.
 Siemens AG 2016 All rights reserved

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 40
7 Links & Literature

7 Links & Literature


Table 7-1
Topic
\1\ Siemens Industry Online Support
https://support.industry.siemens.com
\2\ Download page of the entry
https://support.industry.siemens.com/cs/ww/en/view/54361177

\3\ SIMATIC NET Industrial Remote Communication Remote Networks SCALANCE


M-800 Web Based Management
https://support.industry.siemens.com/cs/ww/en/view/78389151

8 History
Table 8-1
Version Date Modifications
V1.0 06/2016 First version
 Siemens AG 2016 All rights reserved

Wireless Signaling and Switching with SCALANCE M874/ M876


Entry ID: 54361177, V1.0, 06/2016 41

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy