Getting Started Last updated: 02-06-2024

DEPRAG Smart is a digital solution with multiple Tools (MQTT, REST, File operations, ...) for your challenges in your PLC development. With DEPRAG Smart you have a tool at your fingertips that goes further than a simple library. DEPRAG Smart provides the basis for the realization of content relevant to Industry 4.0 and offers numerous options in accordance with the industrial standard. DEPRAG Smart can be used with different PLCs (Beckhoff, Siemens) and can be integrated into your PLC project in just a few minutes and can be used directly.

System requirements

The software solution consists of two components: an OPC UA Server component that is installed on an IPC and native client libraries for your PLC environment. The client libraries provide an easy and fast way to exchange data with the OPC UA Server and to execute functions.

DEPRAG Smart
Operating system: Windows 10 or newer or corresponding server version, 64 bit - alternative Raspberry Pi 4 or newer or similar devices with Linux ARM processor
CPU: 2 cores with at least 1.5GHz
Hard disk space: at least 1GB

The client libraries are provided for the following PLC providers. Other, not listed PLC providers can - if they offer an OPC UA Client - be connected by simply calling the OPC UA Server.

Beckhoff TwinCAT 3 Siemens TIA Portal
OPC UA capable control
Installation of the Beckhoff TwinCAT OPC UA package (TF6100)
OPC UA capable controller
TIA Portal V17
OPC UA Runtime license
Current firmware version of the controller CPU

Installation

The following explains how to install the DEPRAG Smart OPC UA Server on a Windows system. For installation on a Raspberry PI 4, follow the steps in the supplied Readme.tx

By clicking on the icon shown below, a setup is started, which guides you through the individual steps of the installation:
logo
Select the language to be used for the setup.
logo
A welcome page is displayed with further instructions on the installation.
logo
Select the destination folder where DEPRAG Smart will be installed.
logo

Here you can select how DEPRAG Smart will be used after installation:

Option 1: Installation to start and stop DEPRAG Smart manually.
Option 2: The DEPRAG Smart OPC UA Server and the DEPRAG Smart website are registered and started as Windows service.
Option 3: Only the DEPRAG Smart OPC UA Server is registered and started as a Windows service.
logo
Select the start menu directory.
logo
This page displays a summary of the settings made during setup.
logo
The current status of the running installation is displayed here.
logo
On this page final notes for the installation are displayed. If the option "Installation to start / stop DEPRAG Smart manually" is selected, DEPRAG Smart can be started automatically after the setup is closed.
logo

OPC UA

The structure of the return values is described below. These always have the same, following structure.

Structure of the return values

    IsOk
    Indicates whether the execution of the method was OK.

Beckhoff TwinCAT 3

The following explains how to integrate and use DEPRAG Smart in your TwinCAT 3 project.

Download DEPRAG Smart Library and TwinCAT 3 Sample Project

The following content for use with TwinCAT 3 can be downloaded from the DEPRAG Smart website in the left-hand navigation under "Service" in the "PLC Integration" submenu:

A library that allows to call the functionalities of the DEPRAG Smart OPC UA Server after integration into your TwinCAT 3 project.
A sample project that shows how to access the DEPRAG Smart OPC UA Server using the DEPRAG Smart TwinCAT 3 library. The downloaded zip file also contains the DEPRAG Smart TwinCAT 3 library.
logo

Return codes/error codes in TwinCAT 3

Each method in the TwinCAT 3 example returns a return value of type HRESULT. This can contain either the predefined SUCCESS codes or ERROR codes for HRESULT (To the description on the Beckhoff website) or the ERROR codes of the OPC UA client (To the description on the Beckhoff website).

Before the first execution and during the execution the return values of the methods return "S_FALSE". On successful execution, the methods return "S_OK". On incorrect execution, the methods return one of the previously described ERROR codes.

Return values ​​of type "STRING"

In principle, string variables within method returns can have a maximum length of 80 characters, even if they are defined in the corresponding return type with a length of 255 characters.

Siemens TIA Portal

For the deployment a Siemens TIA Portal in version V17 or newer is required. A corresponding OPC UA runtime license must be purchased from Siemens and deposited.

Start DEPRAG Smart and set up your Siemens TIA project. In the Tia Portal you can establish the online connection to the DEPRAG SMART server and use the functions.

For a detailed description of the individual commissioning steps using the Siemens TIA Portal, please refer to the documentation of the PLC supplier.

In the following examples and explanations concerning the calls of nodes via Siemens TIA Portal are shown.

Startup and OPC UA client configuration:

The commissioning and the OPC UA Client configuration can be found in the S7 user module description of the OPC UA Client. "Siemens OPC UA module"


Lists and method calls without switching

The following steps describe the procedure of lists and method calls without switching

The functions OPC_UA_ReadList_C, OPC_UA_WriteList_C and OPC_UA_MethodCall_C can be added to the existing program via drag & drop, or by double-clicking on the respective function block.
logo
Now select the type as well as the name of the instance for the function module used.
logo
Click the instance name to open the configuration.
logo
Select the respective OPC UA Client Interface.
logo
Select the method list with the method to be executed.
logo
Select the required write list.
logo
Select the read list you need.
logo
The REQ and MaintainSession parameters are required for the method call.
The remaining output parameters (Busy, Done, Error, Status) are optional.
logo
If the input MaintainSession is "FALSE" and a positive edge is detected at input REQ, the connection to the OPC UA Server is established, the function is executed and then the connection is terminated again.
If the input MaintainSession is "TRUE", the connection to the OPC UA Server is established and maintained after the function has been executed. The function can then be started by a positive edge at input REQ.
logo
The variables with the final values of the respective function can be found in the data block "OpcUaClientInterface_Data" under the associated structure.
logo

Lists and method calls with switching

The following steps describe the procedure of lists and method calls with switching

The functions OPC_UA_ReadList_C, OPC_UA_WriteList_C and OPC_UA_MethodCall_C can be added to the existing program via drag & drop, or by double-clicking on the respective function block.
logo
Now select the type as well as the name of the instance for the function module used.
logo
Click the instance name to open the configuration.
logo
Select the respective OPC UA Client Interface.
logo
Create variables for the function parameters of the MethodCall_C block and link them to the respective inputs/outputs of the function block.
The index number of the variables MethodHdl and MethodResult depends on the position of the method in the method list.
logo
Create variables for the function parameters of the WriteList_C block and link them to the respective inputs/outputs of the function block.
logo
Create variables for the function parameters of the ReadList_C block and link them to the respective inputs/outputs of the function block.
logo
In this example, the switching is done by an IF query.
logo
If the input MaintainSession is "FALSE" and a positive edge is detected at input REQ, the connection to the OPC UA Server is established, the function is executed and then the connection is terminated again.
If the input MaintainSession is "TRUE", the connection to the OPC UA Server is established and maintained after the function has been executed. The function can then be started by a positive edge at input REQ.
ATTENTION!
The variable MaintainSession must be reset before each switching operation, otherwise it will lead to connection problems.
logo
The variables with the final values of the respective function can be found in the data block "OpcUaClientInterface_Data" under the associated structure.
logo

Processing of large strings (>255 characters)

In order for the WSTRING data type to be able to display more than 255 characters in the TIA Portal programming environment, this data type must be assigned a fixed, defined size. In order to be able to change this assignment for the PLC data types used, you must first copy the PLC data type to be changed and then rename it.

logo

CAUTION! The name of the copied PLC data type must not match the name of an existing PLC data type, as the changes will be reversed during the compilation process.
In the newly created PLC data type, a permanently defined size can now be assigned to the variable of the WSTRING data type.

logo

Create a variable (e.g. local variable in a function block) with the newly created data type and link it to the respective input / output argument of the method call.

logo

CAUTION! In the data blocks OpcUaClientInterface_Data and OpcUaClientInterface_Configuration, no new variables may be created or existing variables modified, since the initial state of these data blocks is restored during a compilation process.

Special case!
If the copied data type contains several PLC data types, all PLC data types that are affected by the modification of the tag must also be copied and created again. The data type should then, as described above, be reproduced again using the newly created / existing PLC data types.

logo logo

Devices

In the area Devices various functionalities for the administration of different devices are available to you, so that these can be integrated into your PLC. Sequence controllers from DEPRAG are available as devices. But also devices of other manufacturers can be added via Open Protocol. All possibilities are explained in detail in the following sections.

DEPRAG devices

Devices DEPRAG devices

Provides functionality for managing, querying and parameterizing devices from DEPRAG Schulz GmbH & Co.

Sequence controller

Devices DEPRAG devices Sequence controller

Provides functionality for managing, querying and parameterizing devices from DEPRAG Schulz GmbH & Co.

Method node

OPC UA Node
Description
TwinCAT
TIA

Adds a new device to the ActiveDevices list. The device type is specified via the "AstType" variable.

Adds a new device to the ActiveDevices list. The device is not configured yet and must be configured using the Configure method afterwards.

Terminates the connection to the device and removes it from the ActiveDevices list.

Terminates connections to all devices and removes them from the ActiveDevices list.

ActiveDevices

Devices DEPRAG devices Sequence controller ActiveDevices

All active, registered DEPRAG sequence controllers. By default, 10 unparameterized device nodes are already created, which can be configured via the "Configure" method.

One client

Devices DEPRAG devices Sequence controller ActiveDevices One client

Specifies the structure and setup of a DEPRAG sequence controller including all methods and parameters.

Method node

OPC UA Node
Description
TwinCAT
TIA

The command configures a device registered at the DEPRAG Smart OPC UA Server. This can then be parameterized and retrieved.

Variable nodes / properties

OPC UA Node
Description
Write
Read
TwinCAT
TIA
Id

Unique list index to retrieve the device in the list of ActiveDevices.

AST devices type: AST12

IP address of the DEPRAG controller.

Process data

Devices DEPRAG devices Sequence controller ActiveDevices One client Process data

Query of the end values of the last screwdriving operation. The end values contain all relevant information about the screwdriving steps and commands that were executed. The unit of the values is given in the object.

Screwdriving sequence

Devices DEPRAG devices Sequence controller ActiveDevices One client Screwdriving sequence

In this area, the screwdriving sequences of the sequence controller can be viewed, edited and deleted.

Method node

OPC UA Node
Description
TwinCAT
TIA

Creates or modifies an existing screwdriving sequence.

Deletes all existing screwdriving sequences on the connected sequence controller.

Deletes the specified screwdriving sequence on the connected sequence controller.

Retrieves the specified screwdriving sequence from the connected sequence control.

Settings

Devices DEPRAG devices Sequence controller ActiveDevices One client Settings

In this area the settings of the sequence controller can be called up and edited.

System info

Devices DEPRAG devices Sequence controller ActiveDevices One client System info

In this area, system data of the sequence controller can be called up. System data can be general information as well as set parameters of the sequence controller. The system data is retrieved from the sequence control by means of a key identifier.

Controller data

Devices DEPRAG devices Sequence controller ActiveDevices One client System info Controller data

In this area, system data of the sequence controller can be called up. System data can be general information as well as set parameters of the sequence controller. The system data is retrieved from the sequence control by means of a key identifier.

Method node

OPC UA Node
Description
TwinCAT
TIA

Gets one entry.

Gets the number of items in the system data.

Requests an index-dependent key from the system data.

Requests all keys of the system data.

Tool data

Devices DEPRAG devices Sequence controller ActiveDevices One client System info Tool data

In this area, tool data of the screwdriver can be viewed. The tool data contains information about the connected screwdriving tool. The tool data is retrieved from the sequence controller by means of a key identifier.

Method node

OPC UA Node
Description
TwinCAT
TIA

Requests a specific value of the tool data.

Requests the number of items of tool data.

Requests an index-dependent key of the tool data.

Requests all keys of the tool data.

Multi-vendor devices

Devices Multi-vendor devices

Provides functionalities for the management, query and parameterization of devices from different manufacturers.

Open Protocol devices

Devices Multi-vendor devices Open Protocol devices

Provides functionality for managing, querying and parameterizing devices that support the Open Protocol interface.

Method node

OPC UA Node
Description
TwinCAT
TIA

Adds a new device to the "OpenProtocolDevices" list.

Removes a device from the OpenProtocolDevices list.

Removes all devices from the "OpenProtocolDevices" list.

OpenProtocolDevices

Devices Multi-vendor devices Open Protocol devices OpenProtocolDevices

All registered Open Protocol devices. By default, 10 unparameterized device nodes are already created, which can be configured and connected via the "Connect" method.

One device

Devices Multi-vendor devices Open Protocol devices OpenProtocolDevices One device

Provides various methods, events and properties to interact with an Open Protocol device.

Method node

OPC UA Node
Description
TwinCAT
TIA

Establishes the connection to an Open Protocol device. DEPRAG Smart acts as an Open Protocol client that establishes the connection to an Open Protocol server.

Disconnects the connection to an Open Protocol device.

This message can be used to cancel the start enable. No screwdriving runs can be started, the device is not ready for screwdriving.

This message can be used to set the start enable. Screwdriving runs can be started, the controller is ready for screwdriving.

Selects a screwdriving program.

Used to transmit an annotation (equivalent to VIN or VehicleId) to the device.

Query of the end values of the last screw connection.

Event node

OPC UA Node
Description
TwinCAT
TIA

The event is triggered when a screwdriving result is received from the connected Open Protocol Server.

The event is triggered as soon as no response is received from the connected Open Protocol Server to a keep alive message sent.

Variable nodes / properties

OPC UA Node
Description
Write
Read
TwinCAT
TIA
Id

Unique list index to retrieve the device in the list of OpenProtocolDevices.

Local

Provides functions for accessing local resources.

Drive management

Local Drive management

Functions for accessing drives.

Method node

OPC UA Node
Description
TwinCAT
TIA

The command returns a list of all logical drives with their properties.

The command returns the number of available drives.

The command returns the properties for the drive with the specified index.

File and directory access

Local File and directory access

Functions for accessing files and folders.

Folder

Local File and directory access Folder

Functions to access folders on the file system.

Method node

OPC UA Node
Description
TwinCAT
TIA

The command creates the specified directory.

The command deletes the specified directory.

The command outputs an array with all directories in the specified path. Each array element contains the properties of a directory.

The command returns the number of directories contained in the specified path.

The command returns the properties of the directory with the specified index that is located in the specified directory.

The command outputs an array with all files in the specified path. Each array element contains the properties of a file.

The command returns the number of files contained in the specified path.

The command returns the properties of the file with the specified index, located in the specified directory.

The command reads the properties of the directory.

The command gets the size of the specified directory in bytes.

Excel

Local File and directory access Excel

Provides functions for editing Excel files.

Method node

OPC UA Node
Description
TwinCAT
TIA

The command creates a new Excel worksheet in a specified path. If the specified Excel worksheet already exists, no new Excel worksheet will be created.

The command deletes the Excel worksheet in the specified path.

The command writes a new value to a cell of the specified Excel worksheet in a specified path.

The command reads a value from a cell of the specified Excel worksheet in a specified path.

The command reads the values of cells of a row with specified start and end column index of the specified Excel worksheet in a specified path.

The command reads out the values from the first filled cell to the last filled cell of a row in the specified Excel worksheet in a specified path. If there are empty entries between the first and the last filled cell, they are included in the output.

The command reads the values of all cells in a row of the specified Excel worksheet in a specified path.

The command writes new values to the cells of a row of the specified Excel worksheet in a specified path.

The command deletes a row from the specified Excel worksheet in the specified path.

File

Local File and directory access File

Functions to access the file system.

Method node

OPC UA Node
Description
TwinCAT
TIA

The command copies an existing file to a specified path. If the specified file already exists, an error is output.

The command copies an existing file to a specified path. If the specified file already exists, it can be overwritten.

The command deletes the file in the specified path.

The command returns the file properties of the specified file.

The command reads the contents of the file into a byte array.

The command writes a byte array to a file.

The command reads the contents of a file into a string.

The command writes a string to the specified file.

JSON reader

Local File and directory access JSON reader

Provides the function of a JSON reader.

Method node

OPC UA Node
Description
TwinCAT
TIA

The command opens a JSON file for further processing. The reader can be retrieved from the ActiveJsonDocuments list using the returned index.

The command inserts a JSON reader in the ActiveJsonDocuments list. The reader can be retrieved from the ActiveJsonDocuments list using the returned index.

The command closes the JSON document and releases the index in the ActiveJsonDocuments list.

ActiveJsonDocuments

Local File and directory access JSON reader ActiveJsonDocuments

List of active JSON documents

A JSON document

Local File and directory access JSON reader ActiveJsonDocuments A JSON document

Functions that can be applied to a JSON document.

Method node

OPC UA Node
Description
TwinCAT
TIA

The command sets the path of the JSON document.

This command can be used to check whether the specified element is included in the JSON document.

The command returns the value of the specified element. This command is used when a scalar value is expected.

The command checks whether the value of the specified element contains an array.

The command returns the value of the specified key. This command is used when an array is expected as a value.

Variable nodes / properties

OPC UA Node
Description
Write
Read
TwinCAT
TIA
Id

Unique index

Path of the JSON document.

XML reader

Local File and directory access XML reader

Provides function for accessing XML files.

Method node

OPC UA Node
Description
TwinCAT
TIA

The command opens an XML file for further processing. The reader can be retrieved from the "ActiveXMLDocuments" list via the returned index.

The command registers an unconfigured XML reader. The reader can be retrieved from the "ActiveXMLDocuments" list via the returned index.

The command closes the XML document and releases the index in the ActiveXMLDocuments list.

ActiveXMLDocuments

Local File and directory access XML reader ActiveXMLDocuments

List of active XML documents.

A reader

Local File and directory access XML reader ActiveXMLDocuments A reader

A concrete XML reader.

Method node

OPC UA Node
Description
TwinCAT
TIA

The command sets the path of the XML document.

The command returns the value of the specified XML element.

This command can be used to check whether the specified XML element is contained in the XML document.

Variable nodes / properties

OPC UA Knoten
Beschreibung
Schreiben
Lesen
TwinCAT
TIA
Id

Eindeutiger Index.

Pfad des XML-Dokuments.

Mausfunktionen

Lokal Mausfunktionen

Im Bereich Mausfunktionen stehen Ihnen Funktionalitäten zur Verfügung, um Mausereignisse, wie z. B. das Drücken einer Maustaste, auszuwerten.

Methoden-Knoten

OPC UA Knoten
Beschreibung
TwinCAT
TIA

Gibt die Position der Maus beim letzten Drücken einer Maustaste zurück. Voraussetzung dafür ist, dass die Detektion der Position vorher über die Funktion "StartDetectingMouseClick" aktiviert wurde.

Startet die Überwachung der Position der Maus beim Drücken einer Maustaste.

Stoppt die Überwachung der Position der Maus beim Drücken einer Maustaste.

Event-Knoten

OPC UA Knoten
Beschreibung
TwinCAT
TIA

Das Event wird ausgelöst sobald eine Maustaste gedrückt wurde. Voraussetzung dafür ist, dass die Detektion der Position vorher über die Funktion "StartDetectingMouseClick" aktiviert wurde.

Drucken

Lokal Drucken

Im Bereich Drucken stehen Ihnen Funktionalitäten zur Verfügung, um mit dem verbundenen Standarddrucker zu kommunizieren und beispielsweise Dateien zu drucken.

Methoden-Knoten

OPC UA Knoten
Beschreibung
TwinCAT
TIA

Erlaubt beliebige Dateien auf dem am System eingestellten Standarddrucker auszudrucken.

Netzwerk

Im Bereich Netzwerk stehen Ihnen diverse Netzwerk-Funktionalitäten zur Verfügung, um Ihre SPS in ein modernes Industrie 4.0 Umfeld einzubinden. Hierzu zählen unter anderem Funktionalitäten zum Versenden von E-Mails, MQTT-Funktionen, REST, sowie TCP/IP und allgemeine Netzwerk-Werkzeuge. Diese werden in den nachfolgenden Abschnitten detailliert erläutert.

E-Mail

Netzwerk E-Mail

Stellt Funktionalitäten zum Versenden von E-Mail Nachrichten an mehrere Empfänger zur Verfügung. Optional können Anhänge übermittelt werden. Vor Verwendung der Funktionalität muss der SMTP-Server in den Einstellungen SmtpServerSettings gesetzt werden.

Methoden-Knoten

OPC UA Knoten
Beschreibung
TwinCAT
TIA

Dieser Befehl sendet eine E-Mail-Nachricht ohne Anhänge an alle im Feld MailAddressTo hinterlegten E-Mail-Adressen. Vor Verwendung der Funktionalität muss der SMTP-Server in den Einstellungen SmtpServerSettings gesetzt werden.

Dieser Befehl sendet eine E-Mail-Nachricht mit Anhängen an alle im Feld MailAddressTo hinterlegten E-Mail-Adressen. Dateianhänge werden im Feld AttachmentFilePaths übergeben. Vor Verwendung der Funktionalität muss der SMTP-Server in den Einstellungen SmtpServerSettings gesetzt werden.

SmtpServerSettings

Netzwerk E-Mail SmtpServerSettings

Ermöglicht die Konfiguration eines SMTP-Servers (Simple Mail Transfer Protocol) für den Versand von E-Mail-Nachrichten.

Variablen-Knoten / Eigenschaften

OPC UA Knoten
Beschreibung
Schreiben
Lesen
TwinCAT
TIA

Legt fest, ob die Verbindung zum SMTP-Server mittels SSL-Protokoll verschlüsselt werden soll.

Adresse des SMTP-Servers.

Port des SMTP-Servers.

Der Benutzernamen, mit dem sich die Anwendung beim SMTP-Server authentifiziert.

Passwort, mit dem sich die Anwendung beim SMTP-Server authentifiziert.

REST Client

Netzwerk REST Client

Erlaubt die Übermittlung von HTTP Anforderungen, Abfragen oder Änderungen (GET, POST, PUT). Es wird eine REST Client (Representational State Transfer) Bibliothek zur Kommunikation mit einer REST API zur Verfügung gestellt.

Methoden-Knoten

OPC UA Knoten
Beschreibung
TwinCAT
TIA

Der Befehl registriert einen nicht konfigurierten REST Client. Der Client muss vor Verwendung über den Befehl Configure konfiguriert werden.

Erstellt einen neuen, vollständig parametrierten REST Client. Der REST Client kann über den zurückgegebenen Index aus der Liste "ActiveClients" abgerufen werden.

Der Befehl beendet die Verbindung eines konkreten REST Clients und entfernt diesen aus der Liste der aktiven Clients.

Der Befehl beendet alle aktiven REST Verbindungen und entfernt alle REST Clients aus der Liste der aktiven Clients.

ActiveClients

Netzwerk REST Client ActiveClients

Liste der aktiven Clients

Ein Client

Netzwerk REST Client ActiveClients Ein Client

Eigenschaften eines ActiveClients.

Methoden-Knoten

OPC UA Knoten
Beschreibung
TwinCAT
TIA

Konfiguriert einen REST Client. Dieser Befehl ist auszuführen, wenn der Client über die Methode AddUnparameterizedClient hinzugefügt worden ist oder einer der 10 standardmäßig angelegten Clients verwendet wird.

Der Befehl fügt ein neues Header-Element im Request hinzu.

Der Befehl entfernt den angegebenen Header.

Setzt den Proxy-Server. Der Proxy-Server wird für alle Anfragen an die API verwendet.

Entfernt den Proxy-Server.

Get

Sendet einen GET Request an eine URL.

Sendet einen DELETE Request an eine URL.

Sendet einen POST Befehl an eine URL.

Sendet einen PATCH Befehl an eine URL.

Put

Sendet einen PUT Befehl an eine URL.

Lädt eine Datei vom angegebenen Endpunkt herunter und stellt ein byte-Array als Antwort zur Verfügung.

Lädt eine Datei an den angebenden Endpunkt hoch.

Variablen-Knoten / Eigenschaften

OPC UA Knoten
Beschreibung
Schreiben
Lesen
TwinCAT
TIA
Id

Eindeutige Identifikation des REST Clients.

Setzt oder ruft den Content-Typ HTTP Header ab.

Maximale Zeit in Millisekunden für den Verbindungsaufbau zur REST-API. Kann innerhalb des Zeitintervalls keine Verbindung aufgebaut werden, wird ein Fehler ausgegeben.

Vorgegebene Header, die bei jedem Aufruf der REST-API gesendet werden.

Die Basisadresse der URI für die Aufrufe der REST-API.

Maximale Anzahl der zwischenzuspeichernden Bytes für Aufrufe der REST-API.

MQTT Client

Netzwerk MQTT Client

Hochperformante MQTT (Message Queing Telemetry Transport) Client Bibliothek zur Kommunikation mit MQTT Brokern. Die Implementierung erlaubt eine schnelle Übertragung von MQTT Messages ohne zeitkritischen Overhead.

Methoden-Knoten

OPC UA Knoten
Beschreibung
TwinCAT
TIA

Erstellt einen neuen, vollständig parametrierten MQTT Client. Der MQTT Client kann über einen nullbasierten Index aus der Liste ActiveClients abgerufen werden.

Der Befehl registriert einen nicht konfigurierten MQTT Client. Das Gerät muss vor Verwendung über den Befehl Configure konfiguriert werden.

Der Befehl beendet die Verbindung eines konkreten MQTT Client und entfernt diesen aus der Liste der aktiven Clients.

Der Befehl beendet alle aktiven MQTT Verbindungen und entfernt alle MQTT Clients aus der Liste der aktiven Clients.

ActiveClients

Netzwerk MQTT Client ActiveClients

Liste der aktiven MQTT Clients.

Ein Client

Netzwerk MQTT Client ActiveClients Ein Client

Eigenschaften eines ActiveClients.

Methoden-Knoten

OPC UA Knoten
Beschreibung
TwinCAT
TIA

Konfiguriert einen MQTT Client. Dieser Befehl ist auszuführen, wenn der Client über die Methode AddUnparameterizedClient hinzugefügt worden ist.

Der Befehl sendet eine Nachricht mit dazugehörigem Topic an den MQTT Broker.

Der Befehl sendet eine Nachricht mit dazugehörigem Topic an den MQTT Broker.

Parametriert den MQTT Client mit allen Parametern und stellt eine Verbindung zum angegebenen MQTT Broker her.

Parametriert den MQTT Client und stellt eine Verbindung zum angegebenen MQTT Broker her.

Leichtgewichtige Funktion um die Verbindung zum angegebenen MQTT Broker herzustellen.

Parametriert den MQTT Client und stellt eine Verbindung zum angegebenen MQTT Broker her.

Trennt die Verbindung zwischen MQTT Client und dem MQTT Broker.

Abonniert ein MQTT Topic mit Standardeinstellungen vom MQTT Broker.

Abonniert ein MQTT Topic mit QoS vom MQTT Broker.

Abonniert ein MQTT Topic vom MQTT Broker. Die Methode erlaubt alle Eigenschaften eines MQTT Abonnements zu setzen.

Deabonniert ein Abonnement zu einem MQTT Topic vom MQTT Broker.

Event-Knoten

OPC UA Knoten
Beschreibung
TwinCAT
TIA

Das Event wird ausgelöst sobald die MQTT-Verbindung erfolgreich aufgebaut wurde.

Das Event wird ausgelöst sobald die MQTT-Verbindung unterbrochen wurde.

Das Event wird ausgelöst sobald das Verbinden zum MQTT-Broker fehlgeschlagen ist.

Das Event wird ausgelöst sobald eine MQTT Nachricht empfangen wurde.

Variablen-Knoten / Eigenschaften

OPC UA Knoten
Beschreibung
Schreiben
Lesen
TwinCAT
TIA
Id

Eindeutige Identifikation des MQTT Clients in der Liste der aktiven Clients.

Gibt an, ob der MQTT Client mit dem MQTT Broker verbunden ist.

Gibt an, ob der MQTT Client gestartet ist.

Anzahl an noch nicht übertragenden Messages im lokalen Pufferspeicher. Die Nachrichten müssen noch an den MQTT Broker übertragen werden.

TCP/IP Client

Netzwerk TCP/IP Client

Stellt die Möglichkeit bereit, sich mit einem TCP/IP Server zu verbinden und Nachrichten auszutauschen.

Methoden-Knoten

OPC UA Knoten
Beschreibung
TwinCAT
TIA

Erstellt einen neuen, vollständig parametrierten TCP/IP Client. Der Client kann über den zurückgegebenen Index aus der Liste "ActiveClients" abgerufen werden.

Der Befehl registriert einen nicht konfigurierten TCP/IP-Client. Der Client muss vor Verwendung über den Befehl "Configure" konfiguriert werden.

Der Befehl beendet die Verbindung eines konkreten TCP/IP-Clients und entfernt diesen aus der Liste "ActiveClients".

Der Befehl beendet alle aktiven TCP/IP-Verbindungen und entfernt alle Clients aus der Liste "ActiveClients".

ActiveClients

Netzwerk TCP/IP Client ActiveClients

Liste der angelegten TCP/IP Clients.

Ein Client

Netzwerk TCP/IP Client ActiveClients Ein Client

Ein konkreter TCP/IP Client.

Methoden-Knoten

OPC UA Knoten
Beschreibung
TwinCAT
TIA

Konfiguriert einen TCP/IP-Client. Dieser Befehl ist auszuführen, wenn der Client über die Methode AddUnparameterizedClient hinzugefügt worden ist oder einer der 10 standardmäßig angelegten Clients verwendet wird.

Der Befehl sendet eine Zeichenkette als TCP/IP-Nachricht an den Server.

Der Befehl sendet ein Byte-Array als TCP/IP-Nachricht an den Server.

Der Befehl empfängt alle Zeichen bis zum ersten Vorkommen der angegebenen Zeichenkette.

Der Befehl empfängt eine angegebene Anzahl an Zeichen.

Der Befehl stellt eine Verbindung zwischen TCP/IP-Client und Server her.

Der Befehl beendet die Verbindung zwischen TCP/IP-Client und Server.

Variablen-Knoten / Eigenschaften

OPC UA Knoten
Beschreibung
Schreiben
Lesen
TwinCAT
TIA
Id

Eindeutiger Index, mit dem der TCP/IP-Client aus der Liste "ActiveClients" abgerufen werden kann.

IP oder DNS-Adresse des Servers.

Port des Servers.

Gibt an, ob der TCP/IP-Client mit dem Server verbunden ist.

Legt fest ob nach einem Verbindungsabbruch die Verbindung automatisch wiederhergestellt werden soll.

Maximale Zeit in Millisekunden für das Senden einer Nachricht. Kann die Nachricht nicht innerhalb des Zeitintervalls vollständig gesendet werden, wird ein Fehler ausgegeben.

Maximale Zeit in Millisekunden die der Client auf den Empfang einer Nachricht wartet. Kann die Nachricht nicht innerhalb des Zeitintervalls vollständig empfangen werden, wird ein Fehler ausgegeben.

Die Codierung des Nachrichteninhalts: Ascii, BigEndian, Unicode, Default, Latin1, Unicode, Utf32, Utf7, Utf8

Netzwerk-Werkzeuge

Netzwerk Netzwerk-Werkzeuge

Im Bereich Netzwerk-Werkzeuge stehen Ihnen typische Netzwerk-Befehle zur Verfügung mit denen Sie die Erreichbarkeit von Netzwerkteilnehmern prüfen können.

Methoden-Knoten

OPC UA Knoten
Beschreibung
TwinCAT
TIA

Dieser Befehl sendet an die konfigurierte Hostadresse eine ICMP-Anforderung (Internet Control Message Protocol). Es wird eine entsprechende Antwort von der Hostadresse innerhalb der konfigurierten Zeit erwartet. Diese Funktion ist für den Test von Netzwerkverfügbarkeiten, Erreichbarkeit von SPSen, Statusdiagnose des Netzwerkes, etc. hilfreich.

Mit diesem Befehl kann die Erreichbarkeit eines spezifizierten Ports an einer konfigurierten IP-Adresse überprüft werden.

Softwareversion und Updateverfügbarkeit

Diese Funktion liefert die Möglichkeit nach Updates für DEPRAG Smart zu suchen.

Methoden-Knoten

OPC UA Knoten
Beschreibung
TwinCAT
TIA

Überprüft ob ein neues Softwareupdate bereit steht.

Variablen-Knoten / Eigenschaften

OPC UA Knoten
Beschreibung
Schreiben
Lesen
TwinCAT
TIA

Eine Zeichenkette die den Herausgeber der Software anzeigt.

Beinhaltet die aktuell verwendete Softwareversion.

Gibt an ob ein Softwareupdate verfügbar ist.

Gibt an ob der Updateserver erreichbar ist.

Gibt an wann zuletzt eine Prüfung nach Softwareupdates durchgeführt worden ist.

Werkzeuge

In diesem Bereich werden kleine, nützliche Funktionalitäten, wie z.B. Funktionalitäten für den Umgang mit Byte-Arrays und Strings, zur Verfügung gestellt.

ByteArray Funktionen

Werkzeuge ByteArray Funktionen

In diesem Bereich werden Funktionalitäten für den Umgang mit Byte-Arrays und Konvertierungsmethoden für diese zur Verfügung gestellt.

Methoden-Knoten

OPC UA Knoten
Beschreibung
TwinCAT
TIA

Konvertiert die angegebene, Base-64 codierte Zeichenfolge in ein entsprechendes Byte-Array.

Konvertiert ein Byte-Array in die entsprechende Base-64 codierte Zeichenfolgendarstellung.

Konvertiert die angegebene, hexadezimal codierte Zeichenfolge in ein entsprechendes Byte-Array.

Konvertiert ein Byte-Array in die entsprechende hexadezimale Zeichenfolgendarstellung.

Konvertiert die angegebene Zeichenfolge in ein entsprechendes Byte-Array.

Konvertiert ein Byte-Array unter Verwendung der angegebenen Zeichenkodierung in die entsprechende Zeichenfolgendarstellung.

String Funktionen

Werkzeuge String Funktionen

In diesem Bereich werden Funktionalitäten für den Umgang mit Strings (Zeichenketten) zur Verfügung gestellt.

Methoden-Knoten

OPC UA Knoten
Beschreibung
TwinCAT
TIA

Vergleicht zwei angegebene Zeichenketten und gibt eine Ganzzahl zurück, die ihre relative lexikographische Ordnung angibt.

Verkettet die erste angegebene Zeichenkette mit der zweiten angegebenen Zeichenkette.

Überprüft, ob ein Text in einem anderen Text vorkommt und gibt das Ergebnis zurück.

Überprüft ob ein Text mit einem anderen Text endet.

Überprüft ob zwei Texte gleich sind.

Fügt in einen Text an einer angegebenen Indexposition in einen weiteren Text ein und gibt das Ergebnis zurück.

Ersetzt in einem Text alle Vorkommen einer angegebenen Zeichenkette durch eine andere.

Teilt einen Text bei einem Zeichen (Separator) in unterschiedliche Bestandteile.

Überprüft ob ein Text mit einem bestimmten Wert startet.

Gibt den Teil des angegebenen Textes ab einer übergebenen Indexposition zurück.

Gibt einen Teil des angegebenen Textes zurück. Der Teil beginnt ab den Parameter Startindex und endet bei Startindex+Length.

Entfernt alle Leerraumzeichen am Anfang und Ende des angegebenen Textes.

Konvertiert alle Großbuchstaben des angegebenen Textes in Kleinbuchstaben.

Konvertiert alle Kleinbuchstaben des angegebenen Textes in Großbuchstaben.

Sucht einen Text in einem anderen Text und gibt die nullbasierte Position des ersten Auftretens zurück.