IIoT - Web Client Support

Introduction

The CODESYS Development System 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, digest access authentication and authentication via OAuth (Version 1a and 2).

alternate text

Caution

To do this project, the steps outlined in the previous section Preparation have to be completed successfully.

Install IIoT Library

To access the free IIoT Library functions e.g. Web Client functions, you must install the IIoT Single license with the CODESYS Installer.

This license is located on the CODESYS website store at IIoT License

Note

This Library does NOT require any payment to download! Just click on the Download button.

Project

The following project is a modified version taken form the IIoT Library example located in your install directory. This location for example would be at C:Users<username>Web Client SL along with an associated Help file.

The Web Client example project can be downloaded in Archive format here- Web Client project.

(1). With CODESYS IDE launched, click File > Project Archive > Extract Archive. Select all options in pop-up. Click “yes” on next pop-ups.

Update everything (including Library’s) to latest revisions. You may need to add a Library, e.g. Basic OSCAT.

The contents/raw data in the project, is located in the variable httpResult as shown below.

alternate text

Items of Note