FB_SetLedColor_BAPI

FB_SetLedColor_BAPI 1:
FB_SetLedColor_BAPI 2:

This functionality is only available on IPCs and Embedded PCs with a Usr-LED and with a BIOS version which supports the BIOS-API.

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 3: 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. The input must be reset as soon as the function block is no longer active (bBusy=FALSE).

tTimeout

TIME

Time until the internal ADS communication is aborted.

FB_SetLedColor_BAPI 4: 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