BACnet properties

This example shows the presetting of further BACnet properties, such as the status texts or Change-of-Value settings (COV). Also shown is how function blocks can be called using a for loop.

For multistate objects, the number of stages is defined via the stage texts (Property State_Text). The default value is a limit of 12 states. This number can be changed in the Global Variables in the parameter list BACnet_Param.

Variables

// optional unit, range and COV properties
fbAi : FB_BACnet_AI := (
            eUnit := E_BA_Unit.eTemperature_DegreesCelsius,
            fCovIncrement := 2.0,
            fMinPresValue := 0.0,
            fMaxPresValue := 100.0
        );

// optional state text information
fbBi : FB_BACnet_BI := (
            sInactiveText := 'DOWN',
            sActiveText := 'UP'
        );

// number of states determined by aStateText
fbMi : FB_BACnet_MI := (
            aStateText := ['AUTO', 'Low', 'Medium', 'High', 'Turbo']
        );

// array of BACnet FBs
afbAV : ARRAY[0..499] of FB_BACnet_AV;
nCount : INT;


Code

fbAi();
fbBi();
fbMi();

FOR nCount := 0 to 499 do
    afbAV[nCount]();
END_FOR