FB_BA_PIDControlSync

FB_BA_PIDControlSync 1:

The function block FB_BA_PIDControlSync is used for parameter synchronization for 2 controllers of type FB_BA_PIDControl. This function block can be used, for example, to calibrate master controllers that are used to generate the supply air setpoints for an air conditioning system.

The following parameters of the FB_BA_PIDControl are synchronized:

Error detection

The error messages listed below are detected by the FB_BA_PIDControlSync.

The error messages are output in the TwinCAT 3 development environment in the "Error list" window. This can be activated under the menu item View.

The error texts are output via the property ErrText and the output sErrText.

In addition, the messages are displayed by the enum eErrState.

Error messages

Message text German

Message text English

'Synchronisation eAction fehlerhaft'

'Synchronization eAction faulty'

'Synchronisation nDampConstant fehlerhaft'

'Synchronization nDampConstant faulty'

'Synchronisation fDerivativeConstant fehlerhaft'

'Synchronization fDerivativeConstant faulty'

'Synchronisation fIntegralConstant fehlerhaft'

'Synchronization fIntegralConstant faulty'

'Synchronisation fMaxOutput fehlerhaft'

'Synchronization fMaxOutput faulty'

'Synchronisation fMinOutput fehlerhaft'

'Synchronization fMinOutput faulty'

'Synchronisation fNeutralZone fehlerhaft'

'Synchronization fNeutralZone faulty'

'Synchronisation eOpMode fehlerhaft'

'Synchronization eOpMode faulty'

'Synchronisation fProportionalConstant fehlerhaft'

'Synchronization fProportionalConstant faulty'

Syntax

FUNCTION_BLOCK FB_BA_LoopSync
VAR_OUTPUT
  bErr         : BOOL;
  sErrText     : T_MaxString;
  eErrState    : E_BA_StatePIDControlSync;
END_VAR
VAR_IN_OUT
  PID01        : FB_BA_PIDControl;
  PID02        : FB_BA_PIDControl;
END_VAR

FB_BA_PIDControlSync 2: Outputs

Name

Type

Description

bErr

BOOL

The output indicates when an error has occurred during synchronization.

sErrText

T_MaxString

The variable shows the state of synchronization in text form.

eErrState

E_BA_StatePIDControlSync

The enumeration shows the state of the synchronization.

FB_BA_PIDControlSync 3: / FB_BA_PIDControlSync 4: Inputs Outputs

Name

Type

Description

Loop1

FB_BA_PIDControl

Reference to controller no. 1 of the parameter adjustment.

Loop2

FB_BA_PIDControl

Reference to controller no. 2 of the parameter adjustment.

FB_BA_PIDControlSync 5: Properties

Name

Type

Access

Description

ErrText

T_MaxString

Get

The property ErrText displays the error texts from sErrText.

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4024.56

Tc3_BA2 from v5.4.2.0