Command

Several control or positioning commands of an object to be commanded have an influence on the output value PresentValue. All commands are stored in an array. The command with the highest priority determines the result at the output of the object.

A priority can be given a value between 1 and 16. The highest priority has the value 1.

The following objects in TwinCAT 3 Building Automation are objects to be commanded and thus have a priority array.

FB

Type

Description

FB_BA_BO_Raw

BO

Binary output with external declaration of variables for hardware mapping.

FB_BA_BO

BO

Binary.

FB_BA_BO_IO

BO

Binary output with internal declaration of variables for hardware mapping.

FB_BA_AO_Raw

AO

Analog output with external declaration of variables for hardware mapping.

FB_BA_AO

AO

Analog.

FB_BA_AO_IO

AO

Analog output with internal declaration of variables for hardware mapping.

FB_BA_MO_Raw

MO

Multi State output with external declaration of the variables for hardware mapping.

FB_BA_MO

MO

Multi State output.

FB_BA_MO_IO

MO

Multi State output with internal declaration of variables for hardware mapping.

FB_BA_BV

BV

Binary Value object.

FB_BA_MV

MV

Multistate Value object.

FB_BA_AV

AV

Analog Value object.

For an entry to be made in the priority array of an object, the associated enable input bEn... must be TRUE on the function block.

The Manual Remote priority is not activated by means of an input at the function block, but by writing to a parameter variable. The object is commanded either via the BACnet protocol, e.g. from an MBE, or from TwinCAT via ADS.

The following priorities are predefined at the objects by TwinCAT Building Automation:

Name

Description

Symbol release

Symbol value

Default Prio

Safety

Personal safety

bEnSafety

*ValSfty

1

Critical

Plant safety

bEnCrit

*ValCritical

3

ManLoc

Local manual override (LVB)

bEnManLoc

*ValManLoc

7

ManualRm

Manual override from a distance (MBE)

bEnManualRm

*ValManualRm

8

Pgm

Program control

bEnPgm

*ValPgm

15

Depending on whether the object type is Analog, Binary or Multi State, the value of a command is a REAL, BOOL or UDINT.

Changing priorities

The priorities can be changed in the variable list BA_BACnet_Param.

Command 1:
Command 2:

The active priority is displayed at the output of all objects to be commanded by means of the variable eActivePrio.

Variables

Name

Type

Description

bEnSafety

BOOL

Enabling the "Safety" priority.

fValSafety

REAL

Analog value for the "Safety" priority.

bValSafety

BOOL

Binary value for the "Safety" priority.

nValSafety

INT

Integer value for the "Safety" priority.

bEnCritical

BOOL

Enabling the "Critical" priority.

fValCritical

REAL

Analog value for the "Critical" priority.

bValCritical

BOOL

Binary value for the "Critical" priority.

nManCritical

INT

Integer value for the "Critical" priority.

bEnManLocal

BOOL

Enabling the "Manual Local" priority.

fValManLocal

REAL

Analog value for the "Manual Local" priority.

bValManLocal

BOOL

Binary value for the "Manual Local" priority.

nManLocal

INT

Integer value for the "Manual Local" priority.

bEnManualRm

BOOL

Enabling the "Manual Remote" priority.

fValManualRm

REAL

Analog value for the "Manual Remote" priority.

bValManualRm

BOOL

Binary value for the "Manual Remote" priority.

nManualRm

INT

Integer value for the "Manual Remote" priority.

bEnPgm

BOOL

Enabling the "Program" priority.

fValPgm

REAL

Analog value for the "Program" priority.

bValPgm

BOOL

Binary value for the "Program" priority.

nPgm

INT

Integer value for the "Program" priority.