SMS Service

With this library it is possible to send, receive and delete short messages via a GSM modem.

The library “SMS Service” is now part of the product IIoT Libraries SL and is no longer available as single product.

Aktuelle Version
Article no.
Plus VAT

Product Description

SMS Connection Interface

To run the following functions the implementation of the SMS Connection Interface library is needed. See the SMS Service Example for one possible implementation. If the device needs hardware handshake and it is not set in the parameters, this can result in data loss.


This function block should represent the physical device. It must only be started once, before the following ones can be used. To start, the pin for the sim card is needed, if it requires one. Otherwise, this variable can stay empty. Additionally the type of connection is needed. Each one of the following function blocks needs this one to work.

Send SMS

This function block sends a short message to a receiver. Therefore the user has to provide the receiver number and text to send. Perhaps the device cannot read out the service center number from the Sim card. In that case the appropriate error is returned and the user has to provide this number. Also the instance of the modem is required for execution

The execution works just as mentioned above.

Receive SMS

This function block can receive a short message. Always the oldest one, which can be found on the device, is returned. The number, message, time, status and index are returned. The status declares if there was a message on the device or not. The index is necessary to delete a short message. Also the instance of the modem is required for execution.

The execution works just as mentioned above.

Delete SMS

This function block can delete one message in the device. The user must commit the short message in the format, as he received it from the device. Also the instance of the modem is required for execution.

The execution works just as mentioned above.


The processes of sending, receiving and deleting can also be done with visualization, but not the initialization of the modem.

After entering the number of the receiver and the message, the button has to be pressed for sending. The lamp next to it shows the current status. A yellow one means that the current process is busy. Green means that the message was send and red that a problem occurred.

The other visualization combines the reading and deleting of a short message. The oldest message of the device is displayed. When no message is available a comment is written. Only the currently displayed message can be deleted. The lamps also show the status as mentioned before.

Used AT-Commands

AT+CMGS: Send Message
AT+CMGR: Read Message
AT+CMGL: List Messages
AT+CMGD: Delete Message
AT+CMGF: Message Format
AT+CPMS: Preferred Message Storage
AT+CSCA: Service Center Address
AT+CMEE: Error Message Format
AT+CREG: Network registration



CODESYS Development System Version oder höher


CODESYS Control Version

Unterstützte Plattformen/ Geräte


Zusätzliche Anforderungen

Serielles GSM Modem (z.B. Cinterion MC55) oder PFC 200 750-8207





Erforderliches Zubehör

CODESYS Security Key for CODESYS <


Technical support is not included with this product. To get technical support please purchase a Support Ticket.

A list of alternative support resources can be found at the support section of the CODESYS Group web page.



A member of the CODESYS Group

Memminger Straße 151
D-87439 Kempten


Version History

Version Release Notes
Release Date

Min. CODESYS version:

New Features:
  • Licensing without dongle

Min. CODESYS verion: 07.08.2018


  1. Ing.
    For Test

    Review by

    Posted on

Write Your Own Review
Only registered users can write reviews. Please Sign in or create an account