IIoT Libraries SL

60% of 100

The software package “IIoT Libraries SL” contains libraries for “IIoT communication” and libraries for reading and writing of data structures.

Aktuelle Version
Article no.
Plus VAT
  • Buy 4 for €47.50 each and save 5%
  • Buy 10 for €45.50 each and save 9%
  • Buy 25 for €42.50 each and save 15%
  • Buy 50 for €40.50 each and save 19%

Product Description


Single Device License

The product “IIoT Libraries SL” contains numerous libraries to support different communication protocols (for example, MQTT and HTTPS) and includes tools for encoding and decoding data structures (for example, JSON and XML). Moreover, libraries with POUs for direct communication with cloud services of individual providers (AWS, Azure, etc.) are provided. The components contained in the CODESYS package are ideally suited for communication in the IIoT environment.

Libraries for communication

Web Client SL

The CODESYS software package includes a library with function blocks for communicating with a web server via HTTP or HTTPS.

  • The HTTP method GET requests data from a web server.

  • The HTTP methods POST and PUT submit data from the controller to a web server.

  • When using DELETE, data is deleted from a web server.

  • The HTTP method HEAD returns the HTTP header.

The HTTP header of a request can be extended without any restrictions. In addition, function blocks are included for HTTP basic authentication and authentication via OAuth (Version 1a and 2).

MQTT Client SL

MQTT (Message Queuing Telemetry Transport) is an open-source IoT protocol that allows for the transmission of telemetry data as messages between devices. Device communication always takes place by means of an MQTT broker (e.g. Mosquitto https://mosquitto.org/). Messages are sent and subscribed to based on topics. A topic corresponds to a path (e.g. device1/temperature). Subscribing to messages is done by specifying a topic filter. Wildcards are also permitted (+ for one level and # for multiple levels). The message format is not fixed, which means that a JSON string or any data structure can be transmitted.

With the “MQTT Client SL” library, messages can be sent from a CODESYS controller to an MQTT broker, and messages can be subscribed to based on topics.

Mail Service SL

This library contains function blocks for sending, receiving, and deleting emails by means of SMTP and POP3 protocols. Communication with the mail server can be established either encrypted (TLS) or unencrypted. A sample project demonstrates how to use the function blocks.

SMS Service SL

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

SNMP Service SL

This library makes it possible to read device information of printers, routers etc. via the SNMP protocol. The library provides function blocks to send and receive SNMP messages. The package contains the SNMP library and example applications.

Supported SNMP features:

  • SNMP GET: Request a value.

  • SNMP GET_NEXT: Request a value and get the OID from the next value.

  • SNMP Agent: Enables devices to request values from the control (agent).

  • SNMP TRAP: Send and receive TRAP/INFORM telegrams.

  • SNMP SET: Set values via SNMP

The package SNMP Service SL.package contains following components:

  • SNMPServiceSL (Namespace: SNMP)

  • Project with example applications

  • CHM help

  • Product datasheet

SNTP Service SL

The library SNTP Service SL contains function blocks for easy implementation of SNTP client and server components on a CODESYS control (SNTP V3, SNTP V4). The function block SNTPGetUTCTime can be used to request the UTC time of a SNTP/NTP server. The function block SNTPServer can be used to build a simple SNTP server.

Function blocks (FBs) of the SNTP library:

  • SNTPGetUTCTime: FB to request the time of a SNTP server (SNTP client)

  • SNTPServer: FB to send the local server time (SNTP server)

AWS IoT Core Client SL

The “AWS IoT Core” service is a managing cloud platform from Amazon in which connected devices can work together easily and safely with cloud applications and other devices. The “AWS IoT Core Client SL” library provides function blocks for sending and receiving messages. Communication is encrypted and takes place by means of the MQTT protocol. In the AES environment, messages are typically transmitted in JSON format. The “JSON Utilities” library can be used for parsing and creating JSON files.

Azure IoT Hub Client SL

The “Azure IOT Hub” cloud service from Microsoft directly links IoT devices. (For more detailed information, refer to https://azure.microsoft.com/en-us/services/iot-hub/). The “Azure IoT Hub Client SL” library provides function blocks for sending and receiving messages. A sample project demonstrates how to use the library.

Google Cloud IoT Core Client SL

The ‘Google Cloud IoT Core’ cloud service from Google is a service for directly connecting IoT devices. (For more information, see https://cloud.google.com/iot-core?hl.)

The ‘Google Cloud IoT Core Client SL’ library provides function blocks for sending and receiving messages. A sample project demonstrates how to use the library.

JSON Web Token SL

The ‘JSON Web Token SL’ library contains a function block for creating a JWT (JSON Web Token) on the controller. For this purpose, the algorithms HS256, HS384, HS512, and RS256 are supported.

The ‘JSON Web Token SL’ package contains the following components:

  • IEC 61131-3 library JSON Web Token SL (namespace JWT)

  • Sample project JSON Web Token SL Example.project

  • Programming reference as integrated CHM help

  • Product data sheet (German and English)

Web Socket Client SL

The WebSocket protocol allows for bidirectional communication between a client and a Web Socket Server over the Internet. Communication usually takes place via TCP port number 443 (or 80 for unsecured connections). The ‘Web Socket Client SL’ library provides function blocks for communication via the WebSocket protocol.

Libraries for reading and writing of data structures

CSV Utility SL

The library CSV Utility SL provides function blocks to read and write CSV files. The library contains the components CSVReader (read a CSV file) and CSVWriter (write a CSV file). All function blocks can be used in a classical or object oriented way. An example project demonstrates the usage of all components.

INI File Utility SL

The product “INI File Utility SL” is a library to read and write INI files. The library contains function blocks to read, write and find values of INI files. An example project shows the usage of the library and their function blocks.

Content of the package:

  • Library INI File Utility SL (Namespace: INI_UTIL)

  • Example project with visualization to read, write and find values of INI files

  • CHM help file

JSON Utilities SL

The ‘JSON Utilities SL’ library provides the following functionalities:

  • Read JSON files (UTF-8 and UTF-16)

  • Read JSON byte arrays

  • Write JSON files (UTF-8 and UTF-16)

  • Read JSON byte arrays

  • Search for keys, values, and child and parent elements

The data is stored in an array of structures. Data access and element search is performed by means of methods from the JSONData function block. The simple creation of a JSON-File can be realized with funcion block JSONBuilder. The function blocks JSONByteArrayReader and JSONFileReader read data in JSON format and save the values in the JSONData function block. Writing files and byte arrays is performed by means of the function blocks JSONFileWriter and JSONByteArrayWriter.

A simple REST client can be implemented easily in connection with the library ‘Web Client SL’.

XML Utility SL

The library “XML Utility SL” contains function blocks to read and write xml files or xml strings on a control. All elements of the xml file are stored in an array of structures. The library also contains function blocks to find elements by name and attribute. The usage of the library is demonstrated by two example applications.

The library contains following components:

  • IEC 61131-3 library XML Utility SL (Namespace XML)

  • Example project XML Utility SL Example.project

  • Integrated CHM programming reference

  • Product data sheet (de und en)


Development system

CODESYS Development System V3.5.16.10


CODESYS Control V3.5.15.0

Supported platforms and devices

Note: Use the “Device Reader” project for locating the functions supported by the PLC.

Additional requirements

The libraries Web Client SL, MQTT Client SL, Mail Service SL, AWS IoT Core Client SL, Azure IoT Hub Client SL and Google Cloud IoT Core Client SL require amongst others the libraries SysSocket2, Net Base Services, CmpCrypto, CmpTls and CmpX509Cert.

The libraries CSV Utility SL, INI File Utility SL, JSON Utilities SL and XML Utility SL require amongst others the library SysFile.

The library SMS Service SL requires amongst others the library SysCom.




Single Device License: The license can be used on the target device/PLC on which the CODESYS Runtime System is installed.

Licenses are activated on a software-based license container (soft container), which is permanently connected to the controller. Alternatively the license can be stored on a CODESYS Key (USB-Dongle). By replugging the CODESYS Key, the license can be used on any other controller

Note: In demo mode, the software runs for 30 minutes without a license. After that, a manual restart is required.

Required accessories



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
MQTT Client SL-
  • Support of MQTT over WebSockets

  • Bugfix: Fragmented packets are now received correctly

AWS IoT Core Client SL-
  • Prefix ‘sCertCNPrefix’ added to certificate CN to prevent name conflicts with other certificates

Google Cloud IoT Core Client SL-
  • Added the possibility to disable the built-in SNTP client (default) and edit the SNTP server name.

Web Socket Client SL-
  • Bugfix: Receiving multiple data frames in one cycle is now possible

AWS IoT Core Client SL-
  • Improved timeout behavior of publisher and device shadow function blocks

  • Improved example project

Azure IoT Hub Client SL-
  • New function block to generate SaS Tokens

JSON Utilities SL-
  • JSONFileReader, Errors are now reset correctly

  • SetLRealRounded does now work for iDecimalPlaces > 4

Mail Service SL-
  • Support HTML encoded emails

  • Bugfix: Multiple recipients

  • Support of STARTTLS (needs Net Base Services

MQTT Client SL-
  • MQTTClient: New input udiTimeout

Web Client SL-
  • Bugfix: Invalid requests if webserver runs in sync mode

  • Bugfix: TCP_INIT_ERROR after 10 requests on a existing TLS connection

  • Bugfix: Close connection if required

  • OAuth2: Support Token lengths > 255

  • Bugfix: URL_ENCODE_(W)STRING might lead to StackOverflow

Web Socket Client SL-
  • New library

XML Utility SL-
  • Improved XMLGetElementAsync performance

  • Bugfix: Missing elements in mode READ_MODE.Recursive

  • All packages and libraries are signed now

AWS IoT Core Client SL
  • Integration of the library ‘Net Base Services’

Google Cloud IoT Core Client
  • Integration of the library ‘Net Base Services’

Azure IoT Hub Client SL
  • Integration of the library ‘Net Base Services’

Mail Service SL
  • Integration of the library ‘Net Base Services’

  • Support of multiple recipients with display name

MQTT Client SL
  • Integration of the library ‘Net Base Services’

  • Added filter mode for subscribers

  • Improved send/receive performance

  • Improved error handling

  • Bugfix: Clean up of interal queues after disconnect

SNMP Service SL
  • Integration of the library ‘Net Base Services’

  • Bugfix: OID encoding

  • Bugfix: SNMP trap, field enterprise

SNTP Service SL
  • Integration of the library ‘Net Base Services’

Web Client SL
  • Integration of the library ‘Net Base Services’

XML Utility SL
  • Bugfix: Self closing tags

With the integration of the library ‘Net Base Services’ TLS connections can be configured via the TLS context.

- 27.08.2020
Improvements | * APPLIB-307: AWS IoT Core: Increase default Keep alive time to 30s
* APPLIB-310: JSON Utilities SL: Support key greater than 80 chars
* APPLIB-309: JSON Utilities SL: Reduced memory consumption
* APPLIB-301: AWS IoT Core, MQTT Client Subscriber: Subscriber should be able to resubscribe

Bug fixes

  • APPLIB-304: JSON Utilities SL: JSONByteArrayReader: unified behaviour |

  • APPLIB-296: AWS IoT Core Client: Publishing (with QoS1) while AWSClient is not connected, causes Publisher to be always busy

  • APPLIB-299: SMS Service SL: Receiving string display just 9 digits

  • APPLIB-306: WebClient: BASE64 Encode - no NULL termination

- 31.03.2020


  1. Works Great
    Example programs Helped

    Review by

    Posted on

  2. CSV Utility does not work
    Main interest is quick CSV reader for support files in the PLC program. Writing the file works but reading is only possible by using a memory intense function block call (CSV.ReadAll). Both the more intelloigent routines CSV.NextLine and CSV.NextElement do not move the file poinmter and only retrieve the first line or element. Back to the drawing board with that one.

    Review by

    Posted on

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