FB_SetLedColor_BAPI

FB_SetLedColor_BAPI 1:

The function block FB_SetLedColor_BAPI can be used to switch the user LED to PCs and embedded PCs with BIOS API support. The LED color is switched via a positive edge at bExecute and the eNewColor parameter. The LED can be switched off (eNewColor = eUsrLED_Off) or set to red (eNewColor = eUsrLED_Red), blue (eNewColor = eUsrLED_Blue) or green (eNewColor = eUsrLED_Green).

FB_SetLedColor_BAPI 2: Inputs

VAR_INPUT
    sNetID         : T_AmsNetID;
    eNewColor      : E_UsrLED_Color;
    bExecute       : BOOL;
    tTimeout       : TIME;
END_VAR

Name

Type

Description

sNetID

T_AmsNetID

AMS network ID of the device (empty string or local network ID) (type T_AmsNetId)

eNewColor

E_UsrLED_Color

New LED color (type E_UsrLED_Color)

bExecute

BOOL

The command is executed with a rising edge.

tTimeout

TIME

Time until the internal ADS communication is aborted.

FB_SetLedColor_BAPI 3: Outputs

VAR_OUTPUT
    bBusy    : BOOL;
    bError   : BOOL;
    nErrID   : UDINT;
END_VAR

Name

Type

Description

bBusy

BOOL

TRUE, as long as the function block is active.

bError

BOOL

TRUE if an error occurs during command execution.

nErrID

UDINT

Contains the ADS error code or the command-specific error code of the last executed command. Is reset to 0 by the execution of a command at the inputs.

Requirements

Development environment

Target platform

PLC libraries to be integrated (category group)

TwinCAT v3.1.0

PC or CX (x86, x64, ARM)

Tc2_System (System) v3.4.14