FB_C69xxSetLedColor

FB_C69xxSetLedColor 1:

The function block FB_C69xxSetLedColor can be used to change the color of the User-LED off the C69xx. The LED color is changed with a rising edge on bExecute and new color in eNewColor. The LED can be switched off (eNewColor = eULED_Off) or to red (eNewColor = eULED_Red), blue (eNewColor = eULED_Blue) or green (eNewColor = eULED_Green).

TYPE E_UserLED_Color : (
 eULED_Off := 0,
 eULED_Red := 1,
 eULED_Blue := 2,
 eULED_Green := 3
);
END_TYPE 

FUNCTION_BLOCK FB_C69xxSetLedColor

VAR_INPUT

VAR_INPUT
    bExecute  : BOOL;
    eNewColor : E_UserLED_Color;
END_VAR

bExecute: With a rising edge on bExecute the new color is set.

eNewColor: New LED color

VAR_OUTPUT

VAR_OUTPUT
    eLastSetColor : E_UserLED_Color;
    bError        : BOOL;
END_VAR

eLastSetColor: Last LED color that was set using this FB.

bError: Error when setting the LED color.

Requirements

Development environment

Target plattform

PLC Libraries to include

TwinCAT v3.0.0

PC (i386)

Tc2_SystemC69xx