FB_CX7000_LED_ERR
The function block allows the use of the ERR LED on the CX7000. The function block is immediately active when it is called and controls the ERR LED via the mode.
The ERR LED of the CX7000 can be used to make the states of the PLC program, communication or other indications externally visible.
The ERR LED has two colors, red and green. If both colors are switched on, the LED lights up yellow. You can either turn the LED on or make it flash.
User-specific function of the LEDs Due to the user-specific usability of the LEDs, Beckhoff Support cannot know the meaning of a flashing code and cannot support the customer.
|
Inputs
VAR_INPUT
bEnable : BOOL; // set TRUE to enable LED handling; Reset in order to reset error
eLED : E_CX7000_LED; // LED flashing mode
tFlashingTimeP1 : TIME:=T#250MS; // Flashing Time >=200ms first pulse
tFlashingTimeP2 : TIME:=T#250MS; // Flashing Time >=200ms second pulse
END_VAR
Name | TYPE | Description |
---|---|---|
bEnable | BOOL | The function block controls the LED as soon as and as long as the input is TRUE. |
eLED | E_CX7000_LED | LED mode |
tFlashingTimeP1 | TIME | Time for the first pulse (>= 200 ms) |
tFlashingTimeP2 | TIME | Time for the second pulse (>= 200 ms) |
Outputs
VAR_OUTPUT
bError : BOOL; // error flag
nErrorID : UDINT; (* ADS Error ID. If nErrorID=DEVICE_SRVNOTSUPP probably the image version need to be updated to support this feature. *)
END_VAR
Name | Type | Description |
---|---|---|
bError | BOOL | The function block has an error. |
nErrorID | UDINT | ADS Error Code DEVICE_SRVNOTSUPP: the image version of the CX7000 does not support this feature. An update (>=35695) is necessary. |
Sample:
VAR
BK9000_BoxState AT %I* : WORD;
fbErrorLED : FB_CX7000_LED_ERR;
END_VAR
IF BK9000_BoxState=0 THEN
fbErrorLED.eLED :=E_CX7000_LED.LED_flashing_GREEN_OFF;
ELSE
fbErrorLED.eLED :=E_CX7000_LED.LED_flashing_RED_OFF;
END_IF
fbErrorLED(
bEnable := TRUE,
tFlashingTimeP1 := ,
tFlashingTimeP2 := ,
bError => ,
nErrorID => );
Notice | |
Function block can only be used for CX7000 The function block can and must only be used for the CX7000. |