FB_BangOlufsenVirtualButtonEvent

FB_BangOlufsenVirtualButtonEvent 1:

Triggers a Virtual Button Event in the Bang & Olufsen Masterlink Gateway.

Examples

Download demo project

VAR_INPUT

sNetId             : T_AmsNetId;
sMLGWClientName    : STRING;
byVirtualButtonId  : BYTE;
bExecute           : BOOL;
tTimeout           : TIME := t#5s;

sNetId: AMS Net ID of the target device on which the TwinCAT Bang & Olufsen Server is operated.

sMLGWClientName: Name of the Masterlink Gateway Client on which the Virtual Button Event is to be triggered.

byVirtualButtonId: Contains the ID of the Virtual Button whose event is to be triggered.

bExecute: The command is triggered by a rising edge at this input.

tTimeout: Indicates the time before the function is cancelled.

FB_BangOlufsenVirtualButtonEvent 2:

sMLGWClientName convention

  • Upper/lower case is ignored
  • Letters and numbers
  • No special characters or umlauts, except “_” (underscore)
  • Minimum length 1 character
  • Maximum length 80 characters
FB_BangOlufsenVirtualButtonEvent 3:

byVirtualButtonId convention

  • must lie between 1 and 255

VAR_OUTPUT

bBusy       : BOOL;
bError      : BOOL;
udiErrorId  : UDINT;

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.

Requirements

Development environment

Target system

Required libraries

TwinCAT 2.11 R3/x64

PC/CX

TcBangOlufsen library from V1.0.0