Constants

By defining constants in the PLC it is possible to specify how many objects of a certain type can be created. If the appropriate constant does not exist, then the default value listed below is used.

If you change one of the constants you must recompile the PLC program. Subsequently, the TPY file must be read in again and the project re-activated in the TwinCAT Building Automation Manager.

Unused objects also use resources on the target system. Do not set the constants any highly than is necessary for the application. A reserve of approx. 10% can be taken as a guide value here. If it is to be expected that, for example, you will have a maximum of 142 lighting actuators, then you should set the constant constBAFMaxLamps to 157.

In the example below, the maximum number of lights is set to 65 and that of the sun blinds to 0.

Constants 1:

In the TwinCAT Building Automation Manager, the value of the respective constant is displayed in the application program area under the Performance features dialog.

Constants 2:

The table shows the names of the individual constants and their default values. If a constant is not re-declared, then the appropriate default value is used.

Sensors

Name of the constant

Default value

Digital Signals

constBAFMaxDigitalSignals

80

Analog Signals

constBAFMaxAnalogSignals

50

Actuators

 

 

Lamps

constBAFMaxLamps

80

Blind Drives

constBAFMaxBlindDrives

60

Valve Actuators

constBAFMaxValveActuators

60

Window Drives

constBAFMaxWindowDrives

60

Sensor Groups

 

 

Digital Signal Groups

constBAFMaxDigitalSignalGroups

80

Analog Signal Groups

constBAFMaxAnalogSignalGroups

50

Actuator Groups

 

 

Lamp Groups

constBAFMaxLampGroups

80

Blind Drive Groups

constBAFMaxBlindDriveGroups

60

Valve Drive Groups

constBAFMaxValveActuatorGroups

60

Window Drive Groups

constBAFMaxWindowDriveGroups

60

Functional Units

 

 

Lightings

constBAFMaxLightings

80

Sunblinds

constBAFMaxSunblinds

60

HVAC

constBAFMaxHVACs

50

Windows

constBAFMaxWindows

60

Composite Modules

 

 

Composite Modules

constBAFMaxCompositeModules

40

Scenes

 

 

Scenes

constBAFMaxScenes

100

Time Scheduler Channels

 

 

Time Scheduler Channels

constBAFMaxTimeSchedulerChannels

50

Weather Stations

 

 

Weather Stations

constBAFMaxWeatherStations

4

Subsystems

 

 

EnOcean Lines

constBAFMaxEnOceanLines

8

DALI Lines

constBAFMaxDALILines

8

Serial Communication Lines

constBAFMaxSerialCommunicationLines

4

Power Measurement Lines

constBAFMaxPowerMeasurementLines

4