Font size:      



The SMS TLM is an add-on firmware option for SoftPLC version 4.x and later which can be purchased for each system needing the capability to send text messages. This capability is implemented as a TOPDOC Loadable Module (TLM), written in C++ and implements several ladder instructions (TLIs) which can be used for sending and receiving text messages via a GSM modem attached to the SoftPLC. This document describes the installation, usage, and functionality of the SMS TLM.

This TLM may be used to send or receive text messages by way of a ladder logic instruction, giving the user full programatic control over the trigger conditions. Queuing is implemented, allowing a number of outbound messages to be triggered within a very small window of time. The TLM will queue up the requests on a first in, first out basis in the same way that an alarm annunciator would.


The SoftPLC runtime engine software supports TLMs, which are shared library extensions to SoftPLC. A TLM may be loaded either as a DRIVER or as a MODULE. The difference between a DRIVER and a MODULE is that a DRIVER is called once per SoftPLC scan, and optionally an additional number of times per scan. A MODULE is only called when the control program decides to call it and not as an inherent part of the scan. TLMs are made known to SoftPLC in the MODULES.LST file which may be edited by TOPDOC NexGen by traversing to: PLC | Modules.

This SMS TLM is to be used as a MODULE, not as a DRIVER, and it provides TLIs that you call from your ladder program. A new request is sent on any false to true rung condition edge. The SENDSMS TLI takes a CONTROL datatable element as its first parameter and uses this to keep track of edge triggering and sending progress. Each TLI used in your ladder program must have its own dedicated unique CONTROL element.


The SMS TLM requires that you have a GSM Modem and a SIM card configured for use with the wireless carrier from which a data plan has been purchased.

Contact SoftPLC for information and recommendations on acquiring and setting up a data plan for use with the SMS TLM.

Up to 20 requests may be queued at one time before the SMS-related TLIs will report that the queue is full. As soon as the first request has been processed, this frees up another slot and the TLI is then ready for another rising edge trigger condition.

Sending SMS messages over GSM modems is rate limited by wireless carriers to approximately 6-10 messages per minute. This limitation should be accounted for when designing your ladder program.

The SENDSMS TLI supports sending a block of data from an integer (N) file in the SoftPLC's datatable to a destination phone number. A block of up to 70 elements can be sent per message.

The RCVSMS TLI supports receiving a raw-data SMS message and writes the data to an integer (N) file block in the SoftPLC datatable.

The RCVTEXTSMS TLI supports receiving a plain-text SMS message and writes the recived text into a string (ST) element in the SoftPLC datatable. If the text content of the received message is longer than the max STRING length supported by SoftPLC, it will be truncated.

Neither of the receiver TLIs supports handling of concatenated SMS messages.


  • A GSM Modem (SoftPLC Cat. No. ICOMDM-GSMA) attached to your SMART SoftPLC.
  • A SMS and/or data plan and SIM card for the modem. SoftPLC can provide these at an attractive price - contact sales for more information.
  • Version 4.x SoftPLC or later.