Supported platforms: CODESYS 2.3, CODESYS 3.5

Picture 1. Equivalent circuit.
This function controls sourcing digital output and monitors its failure situations. Output diagnostic feedback monitoring is started when time of G_DO_DIAGFILTERDELAY (50 ms by default) and number of G_DO_DIAGPROGRAMCYCLES (3 by default) program cycles are passed from the last i_Control input state change.
The output diagnostic has a filtering functionality, which prevents false diagnostics. The diagnostic filtering delay values can be set from application.
o_ShortCut is true, when the output diagnostic feedback signal is false and the output is controlled on (true). This diagnosed error can be delayed with value G_DO_SHORTCUT_ERRORDELAY (0ms by default, i.e. no delay).
o_ExternalVoltage is true, when the output diagnostic feedback signal is true and the output is not controlled (false). This diagnosed error can be delayed with value G_DO_EXTERNAL_ERRORDELAY (0ms by default, i.e. no delay)

Picture 2. Shortcut

Picture 3. Broken circuit

Picture 4. External voltage.
|
If there is an error in the output control, i_Control must be set to false in order to set off the error. |
|
Any automatic recovery from errors requires the user to be acknowledged. |
Input variable name |
Data type |
Range |
Description |
i_Control |
BOOL |
TRUE / FALSE |
Control signal for output |
i_Status |
BOOL |
TRUE / FALSE |
State of output |
Output variable name |
Data type |
Range |
Description |
o_OutputControl |
BOOL |
TRUE / FALSE |
Output control of the monitored output. |
o_ShortCut |
BOOL |
TRUE / FALSE |
Error signal for shortcut in monitored output. |
o_ExternalVoltage |
BOOL |
TRUE / FALSE |
Error signal for external voltage in monitored output or broken circuit. |

Source file Topic000465.htm
Last updated 4-Sep-2025