Reset priorities

In some cases it may be necessary to reset priority levels described via BACnet from the PLC or visualization (i.e. write the value NULL to this priority level).
This can be done on the server side with the call WritePropertyNull.

It should be noted that for binary objects, priority level 6 is reserved for the minimum switch-on and switch-off times and therefore cannot be written.

Variables

fbBV               :    FB_BACnet_BV;
nCount             :    INT;
bEmptyPrioArray    :    BOOL;
nRet               :    DINT;

Code

fbBV();
IF bEmptyPrioArray THEN
    bEmptyPrioArray := FALSE;
    FOR nCount := 1 TO 16 DO
        IF nCount = 6 THEN
            CONTINUE;
        END_IF
        nRet := fbBV.WritePropertyNull( E_BACnetPropIdentifier.PropPresentValue, bPrio := TO_BYTE( nCount) );
    END_FOR
END_IF