Skip to main content
Version: 2.4

Introduction

BECKHOFF Control Driver is part of the HumanOS® Runtime. It allows to integrate BECKHOFF PLC Controls into the smart industrial machining platform.

This document explicitly describes the BECKHOFF driver. For common description on HumanOS® Runtime, Software Design and device information files, see the "Operation Manual".

BECKHOFF Control Driver

The BECKHOFF Control Driver is a ubiquitous hardware abstraction (UHAL) plugin of HumanOS®. It allows to integrate BECKHOFF Controls into the world of Smart Industrial Machining.

This manual helps system engineers to configure and maintain the BECKHOFF Control Driver and HumanOS® Runtime setups.

INFORMATION

The BECKHOFF Driver plugin communicates over Ads-Library. A minimal installation of BECKHOFF Communication Gateway is required. Download Twincat ADS (TC31-ADS-Setup) from BECKHOFF website, either as guest or registered user.

Add Ads connection

For connecting to a Beckhoff control, you must add the Ads Route:

Click to the Beckhoff icon in taskbar. -> "Router" -> "Edit Routes"

You get a Window with the TwinCAT Static Routes. Click "Add...". Then you get the Window for set the connection:

Enter the IP Address of your control, then press the button "Enter Host Name / IP:". Select your control and add the Route.

TwinCat version 3 and upwards can prompt for credentials. These credentials are specified in the Beckhoff Device Manager which is a web portal running on the PLC (https://<ip-address>/config).

Driver Configuration

Device Information File

The device information file is used to configure the access to the BECKHOFF hardware. Each device is identified by a unique device id (GUID), which MUST match the machine license id. The information file also specifies the driver that must be used to connect to the hardware. Use the following driver id for BECKHOFF Control Driver:

{DBC6DEB3-951F-4A23-8477-7D8784995A95}

The BECKHOFF Device information file describes

  • Data Access Points

Detailed reference for device information files, see the HumanOS® Operation Manual chapter "Device Information File".

Connection Address

The Address for BECKHOFF Controls is the AdsAmsNetId of the target:

NameDescriptionExample
<AmsNetId>:<port>AmsNetId of the target device including the port5.44.184.224.1.1:851

TwinCAT 2.x

Use the following ports to connect to TwinCAT 2.x Environments:

801PLC RuntimeSystem 1
811PLC RuntimeSystem 2
821PLC RuntimeSystem 3
831PLC RuntimeSystem 4

For configuration, goto Beckhoff WebSite

TwinCAT 3.x

Use the following ports to connect to TwinCAT 3.x Environments:

851PLC RuntimeSystem 1
852PLC RuntimeSystem 2
853PLC RuntimeSystem 3
854PLC RuntimeSystem 4

For configuration, goto Beckhoff WebSite

Example

{
"Name": "Beckhoff Device",
"Id": "6f007270-ff97-48f8-b1cf-6e0f20e49366",
"DriverId": "DBC6DEB3-951F-4A23-8477-7D8784995A95",
"Address": "5.82.10.47.1.1:851"
}

Data Access

The BECKHOFF Control drives is capable to access all PLC variables. This chapter outlines the possibilities or accessing these data points and how to configure them.

DataTypes

Following data types are fully supported (read and event callbacks):

DataTypeHumanOS System DatatypeTwinCAT Datatype
Boolean ValueSystem.BooleanBOOL
8bit unsigned integerSystem.ByteBYTE
8bit unsigned integerSystem. UInt8USINT
16bit unsigned integerSystem.UInt16WORD, UINT
32bit unsigned integerSystem.UInt32UDINT
64bit unsigned integerSystem.UInt64ULINT
8bit signed integerSystem.Int8SINT
16bit signed integerSystem.Int16INT
32bit signed integerSystem.Int32DINT
64bit signed integerSystem.Int64LINT
32bit floating pointSystem.SingleREAL
64bit floating pointSystem.DoubleLREAL
String valuesSystem.StringSTRING
Boolean ArraySystem.Boolean[]ARRAY [0..N] OF BOOL
8bit unsigned integer ArraySystem.Byte[]ARRAY [0..N] OF BYTE
8bit unsigned integer ArraySystem.UInt8[]ARRAY [0..N] OF USINT
16bit unsigned integer ArraySystem.UInt16[]ARRAY [0..N] OF WORD, UINT
32bit unsigned integer ArraySystem.UInt32[]ARRAY [0..N] OF UDINT
64bit unsigned integer ArraySystem.UInt64[]ARRAY [0..N] OF ULINT
8bit signed integer ArraySystem.Int8[]ARRAY [0..N] OF SINT
16bit signed integer ArraySystem.Int16[]ARRAY [0..N] OF INT
32bit signed integer ArraySystem.Int32[]ARRAY [0..N] OF DINT
64bit signed integer ArraySystem.Int64[]ARRAY [0..N] OF LINT
32bit floating point ArraySystem.Single[]ARRAY [0..N] OF REAL
64bit floating point ArraySystem.Double[]ARRAY [0..N] OF LREAL
String values ArraySystem.String[]ARRAY [0..N] OF STRING

Writing is also possible, although not all memory ranges are supported.

Address

The native address of a data access point is the absolute variable name.

Example

PROGRAM PRG_Test
VAR
Int32Value : DINT;
END_VAR
{
"Id": "93DEE416-DF8C-4F89-8BCE-EB21EF4963A9",
"Name": "Int32Value",
"DataClass": "Event",
"DataType": "System.Int32",
"Address": "PRG_Test.Int32Value ",
"Access": {
"Read": true,
"Receive": true
}
}