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
- 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
-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. - 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.