FB_Module

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.

Syntax

Definition:

FUNCTION_BLOCK FB_N[n]_M[n]_[Module] 
VAR_INPUT
    [module inputs]
END_VAR
VAR_INPUT PERSISTENT
    [module persistent parameter inputs]
END_VAR
VAR_OUTPUT
    bError: BOOL;
    ipTcResult: I_TcMessage;
    [module outputs]
END_VAR

FB_Module 1: Inputs

Name

Type

Description

Module inputs

 

Inputs of the selected module.

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

Module outputs

 

Outputs of the selected module.

FB_Module 3: Properties

Name

Type

Access

Description

nContext

DWORD

Get

Context index

FB_Module 4: Methods

Name

Definition location

Description

Call

Local

Method for background communication. The method must be called cyclically.

Reset

Local

Resetting the module.

SetHMI

Local

Sets the inputs/outputs to the global HMI structures.

GetHMI

Local

Optional: Sets the inputs of the global HMI structures to the inputs of the module

Requirements

Development environment

Target platform

Plc libraries to include

TwinCAT v3.1.4024.0

PC or CX (x64, x86)

Tc3_Analytics