Supported platforms: CODESYS 3.5, CODESYS 3.5 SAFETY

 

How to use S Series and E Series HW diagnostics

This section describes how to use hardware diagnostics in S Series / E Series Control Units.

It also describes how to control an output group and reference voltage output by an application.

 

Hardware diagnostics are implemented by the SafeSSeriesHardware library in a control unit specific program

(e.g. S_SC52_Diagnostic (PRG)).

 

The default state of the output group and reference voltage output controls are OFF.

Controls are activated by an application.

 

Hardware diagnostics have an output S_o_DiagStatusOk which indicates that all monitored diagnostics are OK.

See SafeSSeriesHardware library manual for details.

 

The hardware specific diagnostic program is executed in MultiTool Creator code template.

 

 

Control unit specific hardware diagnostic errors are also added to application log when MultiTool Creator code template is used (MT 6.4 / SDK3.6 or later).

See also How to use application error log.

SC52SC52

Output group control and reference voltage control are activated by writing the following diagnostic program inputs.

 

Control conditions are application specific.

 

S_o_DiagStatusOk status affects MultiTool Creator code template's status G_StatusFlags_Safe.S_SafeOperationEnable

 

The application shall use S_SafeOperationEnable as a condition for safety related controls.

 

Output group control can only be activated once.

After output group deactivation, reboot is required for output group re-activation.

 

Output group control is automatically deactivated if a firmware error or output group validation error is detected.

 

Following control inputs are not set in code template.

 

The following is an example of output group and reference voltage control

 

The current state of controls can be read by the application from the following variables:

 

The application can also access all other output variables from the diagnostic program such as measured voltages and

status variables for each measurement.

SL84SL84

SL84 product does not have output group control.

Output group voltages are supplied externally.

Supply group 1 voltage is monitored by library and affects S_o_DiagStatusOk.

Supply group 2 & 3 voltages are measured but not diagnosed by library.

See also S_SL84_Diagnostic (PRG)

 

S_o_DiagStatusOk status affects MultiTool Creator code template's status G_StatusFlags_Safe.S_SafeOperationEnable

 

The application shall use S_SafeOperationEnable as a condition for safety related controls.

 

The code template includes status flags for monitoring each output group's voltage in G_StatusFlags_Safe global variable list. E.g. G_StatusFlags_Safe.S_OutputGroup2VoltageOK.

 

Status flag is TRUE when corresponding output group voltage is within low/high limits. Status flags are also reset to FALSE when S_SafeOperationEnable is FALSE. Status flags do not have delay.

 

These status flags should be used by application as a condition when controlling outputs in addition to S_SafeOperationEnable. Otherwise the output diagnostic blocks will trigger error if output is controlled ON when output group voltage is not supplied.

 

Control conditions are application specific.

 

The following control inputs are not set in the code template.

 

The following is an example of reference voltage control

 

Code:

 

EPEC_SHWD.S_SL84_Diagnostic.i_RefVoltageControl := G_StatusFlags_Safe.S_SafeOperationEnable;

 

The current state of control can be read by the application from the following variable:

 

The application can also access all other output variables from the diagnostic program such as measured voltages and status variables for each measurement.

 

EC44EC44

Output group control and reference voltage control are activated by writing the following diagnostic program inputs.

 

Control conditions are application specific.

 

S_o_DiagStatusOk status affects MultiTool Creator code template's status G_StatusFlags.SystemOk.

 

Output group control is automatically deactivated if a firmware error or output group validation error is detected.

 

Following control inputs are not set in code template.

 

The following is an example of output group and reference voltage control

Code:

 

IF G_StatusFlags.SystemOk THEN

    EPEC_SHWD.S_EC44_Diagnostic.i_OutputGroup1Control := TRUE;

    EPEC_SHWD.S_EC44_Diagnostic.i_RefVoltageControl := TRUE;

ELSE

    EPEC_SHWD.S_EC44_Diagnostic.i_OutputGroup1Control := FALSE;

    EPEC_SHWD.S_EC44_Diagnostic.i_RefVoltageControl := FALSE;

END_IF

 

 

The current state of controls can be read by the application from the following variables:

 

The application can also access all other output variables from the diagnostic program such as measured voltages and status variables for each measurement.

 

 

See also

 

 

Source file topic100548.htm

Last updated 19-Dec-2024