FB_Analysis

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

Syntax

Definition:

FUNCTION_BLOCK FB_Analysis
VAR_INPUT
    nConfigurationID: INT;
    ipV[n]_VirtualInputs: I_V[n]_Virtual_Input_Source;
END_VAR
VAR_OUTPUT
    bError: BOOL;
    ipTcResult: I_TcMessage;
END_VAR
VAR
    [network FBs]
END_VAR

FB_Analysis 1: Inputs

Name

Type

Description

nConfigurationID

INT

Configuration index

ipV[n]_VirtualInputs

I_V[n]_Virtual_Input_Source

Data for analysis from the specific data source

FB_Analysis 2: Outputs

Name

Type

Description

bError

BOOL

Becomes TRUE when an error situation occurs.

ipTcResult

I_TcMessage

Message interface of the TwinCAT 3 EventLogger, which provides further information about the return value.

FB_Analysis 3: Properties

Name

Type

Access

Description

nContext

DWORD

Get

Context index

FB_Analysis 4: Methods

Name

Definition location

Description

Call

Local

Method for background communication with the TwinCAT driver. The method must be called cyclically.

Reset

Local

Resets the entire analysis.

ResultStream

Local

Optional: If a result stream needs to be created.

SetHMIValues

Local

Method for filling the HMI structures

GetHMIValues

Local

Method for setting the parameters from the HMI into the analysis

Requirements

Development environment

Target platform

Plc libraries to include

TwinCAT v3.1.4024.0

PC or CX (x64, x86)

Tc3_Analytics