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.
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:
Name | Description | Example |
---|---|---|
<AmsNetId>:<port> | AmsNetId of the target device including the port | 5.44.184.224.1.1:851 |
TwinCAT 2.x
Use the following ports to connect to TwinCAT 2.x Environments:
801 | PLC RuntimeSystem 1 |
---|---|
811 | PLC RuntimeSystem 2 |
821 | PLC RuntimeSystem 3 |
831 | PLC RuntimeSystem 4 |
For configuration, goto Beckhoff WebSite
TwinCAT 3.x
Use the following ports to connect to TwinCAT 3.x Environments:
851 | PLC RuntimeSystem 1 |
---|---|
852 | PLC RuntimeSystem 2 |
853 | PLC RuntimeSystem 3 |
854 | PLC 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):
DataType | HumanOS System Datatype | TwinCAT Datatype |
---|---|---|
Boolean Value | System.Boolean | BOOL |
8bit unsigned integer | System.Byte | BYTE |
8bit unsigned integer | System. UInt8 | USINT |
16bit unsigned integer | System.UInt16 | WORD, UINT |
32bit unsigned integer | System.UInt32 | UDINT |
64bit unsigned integer | System.UInt64 | ULINT |
8bit signed integer | System.Int8 | SINT |
16bit signed integer | System.Int16 | INT |
32bit signed integer | System.Int32 | DINT |
64bit signed integer | System.Int64 | LINT |
32bit floating point | System.Single | REAL |
64bit floating point | System.Double | LREAL |
String values | System.String | STRING |
Boolean Array | System.Boolean[] | ARRAY [0..N] OF BOOL |
8bit unsigned integer Array | System.Byte[] | ARRAY [0..N] OF BYTE |
8bit unsigned integer Array | System.UInt8[] | ARRAY [0..N] OF USINT |
16bit unsigned integer Array | System.UInt16[] | ARRAY [0..N] OF WORD, UINT |
32bit unsigned integer Array | System.UInt32[] | ARRAY [0..N] OF UDINT |
64bit unsigned integer Array | System.UInt64[] | ARRAY [0..N] OF ULINT |
8bit signed integer Array | System.Int8[] | ARRAY [0..N] OF SINT |
16bit signed integer Array | System.Int16[] | ARRAY [0..N] OF INT |
32bit signed integer Array | System.Int32[] | ARRAY [0..N] OF DINT |
64bit signed integer Array | System.Int64[] | ARRAY [0..N] OF LINT |
32bit floating point Array | System.Single[] | ARRAY [0..N] OF REAL |
64bit floating point Array | System.Double[] | ARRAY [0..N] OF LREAL |
String values Array | System.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
}
}