Example FB_BACnetRM_ReadPropertyEx
The following example shows the use of the FB_BACnetRM_ReadPropertyEx
function block.
VAR
fbClient : FB_BACnet_Client := (nDeviceInstance := 42,tReadCycleTime:=T#10S,nMaxParallelRequests:=255);
fbDevice : FB_BACnetRM_Device := (Client:=fbClient);
fbReadEx : FB_BACnetRM_ReadPropertyEx := (Client := fbClient);
bReadLowLimitEx : BOOL;
fLowLimitEx : REAL;
END_VAR
------------------------------------------------------------------
fbClient();
fbDevice();
// Read LowLimit using FB_BACnetRM_ReadPropertyEx
fbReadEx.bExecute := bReadLowLimitEx;
IF fbReadEx.bExecute THEN
bReadLowLimitEx := FALSE;
fbReadEx.pData:= ADR( fLowLimitEx );
fbReadEx.nData:= SIZEOF( fLowLimitEx );
fbReadEx.ePropID:= E_BACnet_PropertyIdentifier.PropLowLimit;
fbReadEx.nObjInst:= 1;
fbReadEx.eObjType:= E_BACnet_ObjectType.ObjAnalogInput;
END_IF
fbReadEx();