FB_BangOlufsenGetDeviceInfo
Reads the version and the name of the TwinCAT Bang & Olufsen Server.
VAR_INPUT
sNetId : T_AmsNetId;
bExecute : BOOL;
tTimeout : TIME := t#5s;
sNetId: AMS Net ID of the target device on which the TwinCAT Bang & Olufsen Server is operated.
bExecute: The command is triggered by a rising edge at this input.
tTimeout: Indicates the time before the function is cancelled.
VAR_OUTPUT
bBusy : BOOL;
bError : BOOL;
udiErrorId : UDINT;
udiDeviceVersion : UDINT;
sDeviceName : STRING;
bBusy: This output remains TRUE until the block has executed a command request, but at the longest for the time period applied at the tTimeout input. No new commands are accepted at the inputs as long as bBusy = TRUE.
bError: This output is switched to TRUE if an error occurs during the execution. The command-specific error code is contained in udiErrorId. If the function block is called again with TRUE on bExecute, then bError is reset to FALSE and udiErrorId to 0.
udiErrorId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by the execution of a command at the inputs.
udiDeviceVersion: Version of the TwinCAT Bang & Olufsen Server.
sDeviceName: Name of the TwinCAT Bang & Olufsen Server.
Requirements
Development environment | Target system | Required libraries |
---|---|---|
TwinCAT 2.11 R3/x64 | PC/CX | TcBangOlufsen library from V1.0.0 |