FB_BA_OpMod1StExt01

FB_BA_OpMod1StExt01 1:

The template maps a single-stage plant selector switch with the operating modes Auto, Manual Off and Manual On.

The variable bSelector can be used to parameterize a plant in "Auto" mode so that the plant is switched on or off either via the input bValPgm or via the time schedule Sched.

FB_BA_OpMod1StExt01 2:

The initialization of the template takes place within the method FB_Init.

Block diagram

FB_BA_OpMod1StExt01 3:

Syntax

FUNCTION_BLOCK FB_BA_OpMod1St EXTENDS FB_BA_View
VAR_INPUT
  bValPgm         : BOOL;
END_VAR
VAR_INPUT CONSTANT PERSISTENT
  bSelector       : BOOL;
END_VAR
VAR_INPUT CONSTANT
  OpModMan        : FB_BA_MV_Op;
  Sched           : FB_BA_SchedM;
  OpModPr         : FB_BA_MV_Op;
END_VAR
VAR_OUTPUT
  eOpMod          : E_BA_OnOff;
  bCmd            : BOOL;
END_VAR
VAR
  PrioSwiOpMod    : FB_BA_PrioSwi_UDI04;
END_VAR

FB_BA_OpMod1StExt01 4: Inputs

Name

Type

Description

bValPgm

BOOL

A plant can be switched on or off via the input in the operating mode "Auto".

FB_BA_OpMod1StExt01 5: Inputs CONSTANT

Name

Type

Description

bSelector

BOOL

The variable can be used to parameterize a system in the "Auto" operating mode so that the system is switched on or off either via the input bValPgm or via the schedule Sched.

FB_BA_OpMod1StExt01 6: Inputs CONSTANT

Name

Type

Description

OpModMan

FB_BA_MV_Op

The Multistate-Value object represents an operating mode switch with the operating modes "Auto", "Manual Off" and "Manual On".

Sched

FB_BA_SchedM

A plant can be switched on or off by the schedule in the operating mode "Auto" and the parameter bSelector = TRUE.

OpModPr

FB_BA_MV_Op

The Multistate-Value object indicates the state of the currently valid plant operating mode.

FB_BA_OpMod1StExt01 7: Outputs

Name

Type

Description

eOpMod

E_BA_OnOff

Displays the state of the currently valid plant operating mode.

bCmd

BOOL

The output shows the state of the currently valid plant operating mode.

Variables

Name

Type

Description

PrioSwiOpMod

FB_BA_PrioSwi_UDI04

The priority switch detects the operating modes, prioritizes them and forwards the result to OpModPr.

Requirements

Development environment

Necessary function

TwinCAT from v3.1.4024.35

TF8040 | TwinCAT Building Automation from V5.0.0.0