Code version 4.x

Code version 4.x 1:

Tasks:

A separate task is created for the analytics analysis and for each configuration of a Virtual Input Source.

StreamHelper:

For each data source of type MQTT binary stream, the code generation creates an instance of a stream helper object to process the incoming binary stream patterns.

DataTypes:

The data types are created for the analysis. They contain STRUCTs for the reset function or result processing and ENUMs to select the various components.

GVLs:

To conveniently map module inputs and outputs with the HMI dashboard, selected variables are generated as global variables. In addition, the Data Source function block instances and various parameters are generated as global variables.

ClosedNetwork:

The ClosedNetwork FBs are generated once with all subnetworks and modules. They can be instantiated multiple times in the analysis. In this way, the generated code can be reduced and simplified.

VirtualInputSource / DataSource:

The VirtualInputSource interfaces abstract the DataSource symbols from the analysis. The FB DataSource manages the receipt of input values from the various sources. In the OUTPUT declaration you will find all configured inputs.

Network:

All modules are sorted in a specific network to achieve a better overview and structure of the configured analysis.

Modules:

The module FBs contain all inputs and outputs of the configured modules from the workbench configurator. It is also possible to reconfigure the modules during runtime. To do this, simply change the parameter and then start the reconfiguration process with a rising edge at INPUT bReconfigure.

ClosedNetwork Instance:

In this FB the corresponding ClosedNetwork is instantiated for the analysis. Internally used modules are no longer generated as module FBs in this case.

Results:

If analysis results need to be saved or streamed, the FB Results manages this and streams the selected variables to the message broker in binary or Json format, or saves the data locally to an Analytics binary file.

Analysis:

The entire analysis routine is defined in the FB Analysis. All configured networks with their modules and error handling are created.

MAIN PRGs:

In the MAIN_Analytics program, the DataSource FBs are called, the reset function is managed and, if appropriate, the values are mapped with the HMI dashboard. The program is assigned to a separate task.

The FB Analysis is called in the programs MAIN_Analytics_Vx_Cx. The programs are each assigned to a separate task.

It is also possible to reset single modules, whole networks or all defined networks with only one rising flag. First, select the component to be reset. Then a rising edge at INPUT bReset starts the reset process.

All reset calls are defined in the action A_Reset.

Requirements

Development environment

Target platform

Plc libraries to include

TwinCAT v3.1.4024.0

PC or CX (x64, x86)

Tc3_Analytics Version >= 3.1.0.0