Supported platforms: CODESYS 2.3, CODESYS 3.5

DOD_SourcingOutput (FB)

Picture 1. Equivalent circuit.

Description

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.

 

Limitations

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.

 

Inputs

Input variable name

Data type

Range

Description

i_Control

BOOL

TRUE / FALSE

Control signal for output

i_Status

BOOL

TRUE / FALSE

State of output

Outputs

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.

Example code

See also

 

Source file Topic000465.htm

Last updated 4-Sep-2025