Beckhoff TF3500 User Manual

Manual | EN
TF3500
TwinCAT 3 Analytics Logger
8/12/2020 | Version: 1.0

Table of contents

Table of contents
1 Foreword ....................................................................................................................................................5
2 Overview.....................................................................................................................................................7
3 Installation..................................................................................................................................................8
4 Analytics Workflow - First Steps............................................................................................................11
4.1 Recording data from the machine ...................................................................................................11
4.2 Communication................................................................................................................................14
4.3 Historicize data ................................................................................................................................15
4.4 Analyse data....................................................................................................................................20
4.5 24h Analytics application .................................................................................................................24
5 Technical introduction ............................................................................................................................34
5.1 Basic Concepts................................................................................................................................34
5.2 MQTT...............................................................................................................................................35
5.3 Data Compression...........................................................................................................................39
6 Configuration ...........................................................................................................................................41
6.1 Basic settings ..................................................................................................................................41
6.1.1 TLS .................................................................................................................................. 43
6.2 Data Streams...................................................................................................................................46
6.2.1 Data Handling .................................................................................................................. 49
6.3 Using the Programming Interface....................................................................................................51
7 Samples....................................................................................................................................................53
8 Appendix ..................................................................................................................................................54
8.1 FAQ - frequently asked questions and answers..............................................................................54
TF3500 3Version: 1.0
Table of contents
TF35004 Version: 1.0
Foreword

1 Foreword

1.1 Notes on the documentation

This description is only intended for the use of trained specialists in control and automation engineering who are familiar with applicable national standards. It is essential that the documentation and the following notes and explanations are followed when installing and commissioning the components. It is the duty of the technical personnel to use the documentation published at the respective time of each installation and commissioning.
The responsible staff must ensure that the application or use of the products described satisfy all the requirements for safety, including all the relevant laws, regulations, guidelines and standards.
Disclaimer
The documentation has been prepared with care. The products described are, however, constantly under development. We reserve the right to revise and change the documentation at any time and without prior announcement. No claims for the modification of products that have already been supplied may be made on the basis of the data, diagrams and descriptions in this documentation.
Trademarks
Beckhoff®, TwinCAT®, EtherCAT®, EtherCAT G®, EtherCAT G10®, EtherCAT P®, Safety over EtherCAT®, TwinSAFE®, XFC®, XTS® and XPlanar® are registered trademarks of and licensed by Beckhoff Automation GmbH. Other designations used in this publication may be trademarks whose use by third parties for their own purposes could violate the rights of the owners.
Patent Pending
The EtherCAT Technology is covered, including but not limited to the following patent applications and patents: EP1590927, EP1789857, EP1456722, EP2137893, DE102015105702 with corresponding applications or registrations in various other countries.
EtherCAT® is a registered trademark and patented technology, licensed by Beckhoff Automation GmbH, Germany
Copyright
© Beckhoff Automation GmbH & Co. KG, Germany. The reproduction, distribution and utilization of this document as well as the communication of its contents to others without express authorization are prohibited. Offenders will be held liable for the payment of damages. All rights reserved in the event of the grant of a patent, utility model or design.
TF3500 5Version: 1.0
Foreword

1.2 Safety instructions

Safety regulations
Please note the following safety instructions and explanations! Product-specific safety instructions can be found on following pages or in the areas mounting, wiring, commissioning etc.
Exclusion of liability
All the components are supplied in particular hardware and software configurations appropriate for the application. Modifications to hardware or software configurations other than those described in the documentation are not permitted, and nullify the liability of Beckhoff Automation GmbH & Co. KG.
Personnel qualification
This description is only intended for trained specialists in control, automation and drive engineering who are familiar with the applicable national standards.
Description of symbols
In this documentation the following symbols are used with an accompanying safety instruction or note. The safety instructions must be read carefully and followed without fail!
DANGER
Serious risk of injury!
Failure to follow the safety instructions associated with this symbol directly endangers the life and health of persons.
WARNING
Risk of injury!
Failure to follow the safety instructions associated with this symbol endangers the life and health of per­sons.
CAUTION
Personal injuries!
Failure to follow the safety instructions associated with this symbol can lead to injuries to persons.
NOTE
Damage to the environment or devices
Failure to follow the instructions associated with this symbol can lead to damage to the environment or equipment.
Tip or pointer
This symbol indicates information that contributes to better understanding.
TF35006 Version: 1.0
Overview

2 Overview

The TwinCAT Analytics Logger records process and application data of the machine controller in synchronization with task cycles. The logger is characterized by its high performance as it operates directly in the real-time context of the TwinCAT controller.
The TwinCAT Analytics Logger may either act as an MQTT client and transmit the data to a MQTT message broker on a regular basis (called MQTT-mode) or store the data locally in a file on the hard disk of the machine controller (called file-mode). The configuration required is performed in Microsoft Visual Studio®. All variables of the process image and the PLC application can be added easily to the configuration via check boxes without the need for programming.
When used as an MQTT Client the Logger is able to bypass short disconnects to the Message Broker using a ring buffer functionality to prevent loss of data temporarily. Used in file-mode, a ring buffer can also be configured, which may be useful in case of limited storage capacity or if there is no need for data to be recorded (henceforth referred to as logged) permanently, instead focusing on a fixed time interval.
The logged data may be used in various ways but its main intention is data analysis with TwinCAT Analytics as wells as data visualization with TwinCAT Scope.
Components
• Configuration surface in TwinCAT project tree
• Description files TcAnalytics.tmc and TcIotBase.tmc
• Drivers TcAnayltics.sys and TcIotDrivers.sys
List of key features
Functionality TC3 Analytics Logger as MQTT Client TC3 Analytics Logger for local storage
Programable record control
Configuration Interface
RT Context Yes Yes
MQTT Yes No
Analytics Binary Format
JSON Format No No
File Storage No Yes
Ring Buffer Yes Yes
Authentication Yes No
Encryption Yes Yes
Compression Yes Yes
Yes Yes
Yes Yes
Yes Yes
TF3500 7Version: 1.0
Installation

3 Installation

The TwinCAT Analytics Logger is installed with TwinCAT XAE and XAR. Therefore, the Logger should always be available but in order to use it, one “TC3 Analytics Logger” license per target device is needed which may either be a permanent or a 7-day trial license.
For general information about licensing, please refer to the licensing paragraph below.

3.1 System requirements

Technical Data TF3500 TC3 Analytics Logger
Operating System Windows 7, Windows 8, Windows 10, WinCE
PC (x86, x64 und ARM)
Min. TwinCAT Version 3.1.4022.31
Min. TwinCAT Level TC1100 TC3 | I/O

3.2 Licensing

The TwinCAT3function can be activated as a full version or as a 7-day test version. Both license types can be activated via the TwinCAT 3 development environment (XAE).
Licensing the full version of a TwinCAT3Function
A description of the procedure to license a full version can be found in the Beckhoff Information System in the documentation "TwinCAT3Licensing".
Licensing the 7-day test version of a TwinCAT3Function
Note: A 7-day test version cannot be enabled for a TwinCAT 3 license dongle.
1. Start the TwinCAT 3 development environment (XAE).
2. Open an existing TwinCAT 3 project or create a new project.
3. If you want to activate the license for a remote device, set the desired target system. To do this, select the target system from the Choose Target System drop-down list in the toolbar.
ð The licensing settings always refer to the selected target system. When the project is activated on
the target system, the corresponding TwinCAT 3 licenses are automatically copied to this system.
4. In the Solution Explorer, double-click License in the SYSTEM subtree.
ð The TwinCAT 3 license manager opens.
TF35008 Version: 1.0
Installation
5. Open the Manage Licenses tab. In the AddLicense column, check the check box for the license you want to add to your project (e.g."TF6420:TC3DatabaseServer").
6. Open the Order Information (Runtime) tab.
ð In the tabular overview of licenses, the previously selected license is displayed with the status
“missing”.
7. Click7-DayTrialLicense... to activate the 7-day trial license.
ð A dialog box opens, prompting you to enter the security code displayed in the dialog.
8. Enter the code exactly as it appears, confirm it and acknowledge the subsequent dialog indicating successful activation.
ð In the tabular overview of licenses, the license status now indicates the expiry date of the license.
9. Restart the TwinCAT system.
TF3500 9Version: 1.0
Installation
ð The 7-day trial version is enabled.
TF350010 Version: 1.0
Analytics Workflow - First Steps

4 Analytics Workflow - First Steps

This step by step documentation presents the complete TwinCAT Analytics workflow. From the data acquisition over the communication and historizing up to the evaluation and analysis of the data and to the presentation of the data in web-based dashboard.

4.1 Recording data from the machine

On the machine side is the Analytics Logger the recorder of process data from the machine image, PLC, NC and so on. The Logger is working in the real-time context of TwinCAT.
The TwinCAT Analytics Logger is installed with TwinCAT XAE and XAR. The Logger can act as MQTT Client to communicate the recorded data to a native MQTT Message Broker or store the data in the same data format in a local binary file. By the usage as MQTT Client the Logger is able to bypass short disconnects to the Message Broker with a ring buffer functionality. You can configure a ring buffer as well for the local binary file storage.
• To configure the Analytics Logger you have to navigate in your existing TwinCAT Project to the Analytics tree node
TF3500 11Version: 1.0
Analytics Workflow - First Steps
• Right click on this node and click on “Add Data Logger” to add one new instance to your configuration
• For configuring the base settings, please double click on the new tree item
You can make your specific Analytics Logger settings
-Data Format: Binary file or MQTT stream
-FILE format: Analytics Logger stores the data in local binary files and all other settings are not necessary anymore. The files will be stored in C:\TwinCAT\3.1\Boot\Analytics.
-BINARY: Data will be sent to the configured MQTT Message Broker. You can have multiple Logger in one TwinCAT project to communicate data to different MQTT Message Broker.
-Data Compression: on (default) or off
TF350012 Version: 1.0
Analytics Workflow - First Steps
-Max Compression: mode of the compression
-MQTT host name
-MQTT Tcp port
-MQTT main topic for own hierarchical levels to keep the identification easy
-MQTT Client ID should be unique in the network
-MQTT username
-MQTT password to make authentication at the message broker
-At the TLS (Transport Layer Security) tab, security settings can be configured. TLS is a secure communication channel between client and server. By the usage of certificates, the TCP port 8883 is exclusively reserved for MQTT over TLS. Analytics Logger is supporting the modes CA Certificates, CA Certificates & Client Certificate and Preshared Key (PSK) mode.
• If variables in your PLC application are marked in the declaration with the attribute {attribute 'TcAnalytics'} they will be shown automatically as a stream below the Data Logger tree node.
An additional device stream will be shown if your configuration provides an EtherCAT Process Image.
TF3500 13Version: 1.0
Analytics Workflow - First Steps
• In the stream a Selection tab is available to choose the variables that should be recorded
• Finally it is possible to change the package size for the frames or to configure the ring buffer for disconnects and file in the Data Handling tab.

4.2 Communication

Currently, the Analytics workflow is fully mappable via MQTT. The engineering tools can also access the data of the machines via ADS and carry out analyzes.
TF350014 Version: 1.0
Analytics Workflow - First Steps
If you choose for the IoT communication protocol MQTT you have to setup a native MQTT Message Broker somewhere in the network (VM in a cloud system is also possible). This Message Broker provides a decoupling of the different applications in the Analytics Workflow.

4.3 Historicize data

After installation of the TwinCAT Analytics Storage Provider you are able to configure the service running in the background. You will find therefore the TcAnalyticsStorageProvider_Config application in the folder C: \TwinCAT\Functions\TF3520-Analytics-StorageProvider\WinService.
TF3500 15Version: 1.0
Analytics Workflow - First Steps
The main part of the topic can be set in the configuration as well as the comment which will be used for identification if more than one Storage Provider is registered at the Message Broker.
You are able to provide the Message Broker settings and to decide for storage type:
• Analytics File (binary file)
• Microsoft SQL
• Microsoft Azure Blob (Azure Cloud necessary)
Finally, you can save the config and start the service. The next step is the configuration of the specific record. Therefore you should choose in your development environment the Storage Provider Recorder.
TF350016 Version: 1.0
Analytics Workflow - First Steps
The recorder has also to connect to the Message Broker. So you have to provide the same settings as for the background service.
After this you can click to icon with the small cloud to search Storage Providers at the configured Message Broker. Here you will find also the comment you gave already by the service configuration to identify your Storage Provider.
TF3500 17Version: 1.0
Loading...
+ 39 hidden pages