FB_BACnet_GetDiagInfo
Function block for access to BACnet diagnosis via ADS.
Use
The function block instance is created by the PLC program and called cyclically.
The required NetID (AMS NetID) of the BACnet device can be read in the System Manager (see Figure 1: The NetID does not match the local NetID and always has to be specified - empty strings cannot be used!). Another possibility is to query the NetID from the device function block or adapter function block in the PLC (see Figure 2).
For information on the operating principle of the adapter function block see FB_BACnet_Adapter.
VAR_INPUT
sNetId : T_AmsNetId;
bExecute : BOOL;
tTimeout : TIME := tBACnet_ADSTimeOut;
sNetId: AMS NetID of the BACnet device (adapter) under which the server or client was configured.
bExecute: Rising edge at the input starts the read process.
tTimeout: Optional input, monitoring time for ADS access (default: tBACnet_ADSTimeOut).
VAR_OUTPUT
bBusy : BOOL;
bError : BOOL;
nErrID : UDINT;
stInfo : ST_BACnet_Diagnosis;
bBusy: The block is busy.
bError: Error during processing.
nErrID: ADS error code.
stInfo: Structure with diagnostic information on BACnet.