Supported platforms: CODESYS 2.3, CODESYS 3.5
This function is used to set the status led. The user sets boolean inputs correctly and firmware controls blinking of the output led.
This function controls the 5050 unit's status LED according to the application status.
The LED is also controlled by HW and FW. The LED's control priority order is as follows: 1. HW, 2. FW, 3. Application. (application has the lowest priority).
The following table describes how LEDs are controlled in different states by the application.
FB's output control logic: (T=true, F=false, X=true or false)
i_SystemOk |
i_RunWithErrors |
i_InitState |
GreenLed |
RedLed |
X |
X |
T |
ON |
OFF |
T |
F |
F |
Blink 2 Hz |
OFF |
T |
T |
F |
OFF |
Blink 5 Hz |
F |
X |
F |
OFF |
Blink 2 Hz |
Input variable name |
Data type |
Description |
i_SystemOk |
BOOL |
System OK information from application |
i_RunWithErrors |
BOOL |
HW/SW error information from application (for example a short circuit in output) |
i_InitState |
BOOL |
True until application initializing functions are done |
Output variable name |
Data type |
Description |
- |
(ErrorCodes) DINT |
Status of the execution |
Definitions: |
|
error:DINT; i_SystemOk: BOOL; i_RunWithErrors: BOOL; i_InitState: BOOL;
|
Init: |
|
-
|
Code: |
|
error := IO_SET_LED(i_SystemOk, i_RunWithErrors, i_InitState);
|
EXP - files: |
|
No related exp-files.
|
Source file Topic0000222.htm
Last updated 24-Apr-2025