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 Node
Description
Write
Read
TwinCAT
TIA
Id

Unique index.

Path of the XML document.

Mouse functions

Local Mouse functions

The Mouse functions section provides functionalities for evaluating mouse events, such as pressing a mouse button.

Method node

OPC UA Node
Description
TwinCAT
TIA

Returns the position of the mouse when a mouse button was last pressed. The prerequisite for this is that the detection of the position was previously activated via the "StartDetectingMouseClick" function.

Starts monitoring the position of the mouse when a mouse button is pressed.

Stops monitoring the position of the mouse when a mouse button is pressed.

Event node

OPC UA Node
Description
TwinCAT
TIA

The event is triggered as soon as a mouse button is pressed. The prerequisite for this is that the detection of the position was previously activated via the "StartDetectingMouseClick" function.

Print

Local Print

In the Print area, functionalities are available to communicate with the connected standard printer and to print files, for example.

Method node

OPC UA Node
Description
TwinCAT
TIA

Allows to print any files on the default printer set on the system.

Network

In the network area, various network functionalities are available to integrate your PLC into a modern Industry 4.0 environment. These include functionalities for sending emails, MQTT functions, REST, as well as TCP/IP and general network tools. These are explained in detail in the following sections.

E-Mail

Network E-Mail

Provides functionalities for sending e-mail messages to multiple recipients. Optionally, attachments can be transmitted. Before using the functionality, the SMTP server must be set in the SmtpServerSettings settings.

Method node

OPC UA Node
Description
TwinCAT
TIA

This command sends an e-mail message without attachments to all e-mail addresses stored in the MailAddressTo field. Before using the functionality, the SMTP server must be set in the SmtpServerSettings settings.

This command sends an e-mail message with attachments to all e-mail addresses stored in the MailAddressTo field. File attachments are passed in the AttachmentFilePaths field. Before using the functionality, the SMTP server must be set in the SmtpServerSettings settings.

SmtpServerSettings

Network E-Mail SmtpServerSettings

Enables configuration of a Simple Mail Transfer Protocol (SMTP) server for sending e-mail messages.

Variable nodes / properties

OPC UA Node
Description
Write
Read
TwinCAT
TIA

Specifies whether the connection to the SMTP server should be encrypted using SSL protocol.

Address of the SMTP server.

Port of the SMTP server.

The user name with which the application authenticates itself to the SMTP server.

Password with which the application authenticates itself to the SMTP server.

REST Client

Network REST Client

Allows the submission of HTTP requests, queries or changes (GET, POST, PUT). A REST client (Representational State Transfer) library is provided for communication with a REST API.

Method node

OPC UA Node
Description
TwinCAT
TIA

The command registers an unconfigured REST client. The client must be configured using the Configure command before use.

Creates a new, fully parameterized REST client. The REST client can be retrieved from the "ActiveClients" list via the returned index.

The command terminates the connection of a concrete REST client and removes it from the list of active clients.

The command terminates all active REST connections and removes all REST clients from the list of active clients.

ActiveClients

Network REST Client ActiveClients

List of active clients

One client

Network REST Client ActiveClients One client

Properties of an ActiveClient.

Method node

OPC UA Node
Description
TwinCAT
TIA

Configures a REST client. This command must be executed if the client has been added via the AddUnparameterizedClient method or one of the 10 clients created by default is used.

The command adds a new header element in the request.

The command removes the specified header.

Sets the proxy server. The proxy server is used for all requests to the API.

Removes the proxy server.

Get

Sends a GET request to a URL.

Sends a DELETE request to a URL.

Sends a POST command to a URL.

Sends a PATCH command to a URL.

Put

Sends a PUT command to a URL.

Downloads a file from the specified endpoint and provides a byte array as response.

Uploads a file to the specified endpoint.

Variable nodes / properties

OPC UA Node
Description
Write
Read
TwinCAT
TIA
Id

Unique identification of the REST client.

Sets or retrieves the content type HTTP header.

Maximum time in milliseconds for establishing a connection to the REST API. If a connection cannot be established within the time interval, an error is issued.

Predefined headers that are sent each time the REST API is called.

The base address of the URI for the REST API calls.

Maximum number of bytes to cache for calls to the REST API.

MQTT Client

Network MQTT Client

High-performance MQTT (Message Queing Telemetry Transport) client library for communication with MQTT brokers. The implementation allows fast transmission of MQTT messages without time-critical overhead.

Method node

OPC UA Node
Description
TwinCAT
TIA

Creates a new, fully parameterized MQTT client. The MQTT client can be retrieved from the ActiveClients list via a zero-based index.

The command registers an unconfigured MQTT client. The device must be configured via the Configure command before use.

The command terminates the connection of a concrete MQTT client and removes it from the list of active clients.

The command terminates all active MQTT connections and removes all MQTT clients from the list of active clients.

ActiveClients

Network MQTT Client ActiveClients

List of active MQTT clients.

One client

Network MQTT Client ActiveClients One client

Properties of an ActiveClient.

Method node

OPC UA Node
Description
TwinCAT
TIA

Configures an MQTT client. This command must be executed if the client has been added via the AddUnparameterizedClient method.

The command sends a message with associated topic to the MQTT broker.

The command sends a message with associated topic to the MQTT broker.

Parameterizes the MQTT client with all parameters and establishes a connection to the specified MQTT broker.

Parameterizes the MQTT client and establishes a connection to the specified MQTT broker.

Lightweight function to connect to the specified MQTT broker.

Parameterizes the MQTT client and establishes a connection to the specified MQTT broker.

Disconnects the MQTT client from the MQTT broker.

Subscribes to an MQTT topic with default settings from the MQTT broker.

Subscribes to an MQTT topic with QoS from the MQTT broker.

Subscribes an MQTT topic from the MQTT broker. The method allows to set all properties of a MQTT subscription.

Unsubscribes a MQTT Topic from the MQTT Broker.

Event node

OPC UA Node
Description
TwinCAT
TIA

The event is triggered as soon as the MQTT connection has been successfully established.

The event is triggered as soon as the MQTT connection is interrupted.

The event is triggered as soon as the connection to the MQTT broker has failed.

The event is triggered as soon as an MQTT message is received.

Variable nodes / properties

OPC UA Node
Description
Write
Read
TwinCAT
TIA
Id

Unique identification of the MQTT client in the list of active clients.

Indicates whether the MQTT client is connected to the MQTT broker.

Indicates whether the MQTT client is started.

Number of messages not yet transmitted in the local buffer memory. The messages still have to be transferred to the MQTT broker.

TCP/IP client

Network TCP/IP client

Provides the ability to connect to a TCP/IP server and exchange messages.

Method node

OPC UA Node
Description
TwinCAT
TIA

Creates a new, fully parameterized TCP/IP client. The client can be retrieved from the "ActiveClients" list via the returned index.

The command registers an unconfigured TCP/IP client. The client must be configured via the Configure command before use.

The command terminates the connection of a concrete TCP/IP client and removes it from the ActiveClients list.

The command terminates all active TCP/IP connections and removes all clients from the ActiveClients list.

ActiveClients

Network TCP/IP client ActiveClients

List of created TCP/IP clients.

One client

Network TCP/IP client ActiveClients One client

A concrete TCP/IP client.

Method node

OPC UA Node
Description
TwinCAT
TIA

Configures a TCP/IP client. This command is to be executed if the client has been added via the AddUnparameterizedClient method or one of the 10 clients created by default is used.

The command sends a string as a TCP/IP message to the server.

The command sends a byte array as a TCP/IP message to the server.

The command receives all characters up to the first occurrence of the specified string.

The command receives a specified number of characters.

The command establishes a connection between TCP/IP client and server.

The command terminates the connection between TCP/IP client and server.

Variable nodes / properties

OPC UA Node
Description
Write
Read
TwinCAT
TIA
Id

Unique index with which the TCP/IP client can be retrieved from the "ActiveClients" list.

IP or DNS address of the server.

Port of the server.

Indicates whether the TCP/IP client is connected to the server.

Determines whether the connection should be restored automatically after a connection loss.

Maximum time in milliseconds for sending a message. If the message cannot be sent completely within the time interval, an error is output.

Maximum time in milliseconds that the client waits for the reception of a message. If the message cannot be received completely within the time interval, an error is issued.

The encoding of the message content: Ascii, BigEndian, Unicode, Default, Latin1, Unicode, Utf32, Utf7, Utf8

Network tools

Network Network tools

The Network Tools section provides you with typical network commands that you can use to check the accessibility of network participants.

Method node

OPC UA Node
Description
TwinCAT
TIA

This command sends an ICMP (Internet Control Message Protocol) request to the configured host address. A corresponding response is expected from the host address within the configured time. This function is useful for testing network availability, PLC reachability, network status diagnostics, etc.

This command can be used to check the reachability of a specified port at a configured IP address.

Software version and update availability

This function provides the possibility to search for updates for DEPRAG Smart.

Method node

OPC UA Node
Description
TwinCAT
TIA

Checks if a new software update is available.

Variable nodes / properties

OPC UA Node
Description
Write
Read
TwinCAT
TIA

A string indicating the publisher of the software.

Contains the currently used software version.

Indicates whether a software update is available.

Indicates whether the update server is reachable.

Indicates when a check for software updates was last carried out.

Tools

This area provides small, useful functionalities, such as functionalities for handling byte arrays and strings.

ByteArray functions

Tools ByteArray functions

This section provides functionalities for handling byte arrays and conversion methods for them.

Method node

OPC UA Node
Description
TwinCAT
TIA

Converts the specified base-64 encoded string into a corresponding byte array.

Converts a byte array to the corresponding base-64 encoded string representation.

Converts the specified hexadecimal encoded string into a corresponding byte array.

Converts a byte array to the corresponding hexadecimal string representation.

Converts the specified string to a corresponding byte array.

Converts a byte array to the appropriate string representation using the specified character encoding.

String functions

Tools String functions

This area provides functionalities for handling strings (character strings).

Method node

OPC UA Node
Description
TwinCAT
TIA

Compares two specified strings and returns an integer indicating their relative lexicographic order.

Concatenates the first specified string with the second specified string.

Checks if a text occurs in another text and returns the result.

Checks if a text ends with another text.

Checks if two texts are the same.

Inserts text at a specified index position into another text and returns the result.

Replaces all occurrences of a specified string in a text with another one.

Divides a text at one character (separator) into different parts.

Checks if a text starts with a certain value.

Returns the part of the specified text starting from a passed index position.

Returns a part of the specified text. The part starts from the Startindex parameter and ends at Startindex+Length.

Removes all white space characters at the beginning and end of the specified text.

Converts all uppercase letters of the specified text to lowercase.

Converts all lowercase letters of the specified text to uppercase.

Searches for a text in another text and returns the zero-based position of the first occurrence.