FC_GenerateExceptionNumber - General Information
Type: |
Function |
Available as of: |
V1.4.0.0 |
Inherits from: |
- |
Implements: |
- |
The Function generates the udiExceptionNumber for a ST_Exception structure.
The udiExceptionNumber of a ST_Exception structure has to be a unique number to identify the exception which is used on e.g. a HMI to translate the exception into local language. The structure of udiExceptionNumber is defined as XXXYYYY where YYYY is the value of ET_DiagExt which describes the exception, and XXX is the value of ET_ExceptionSource which specifies the ET_DiagExt table where the ET_DiagExt comes from.
The input i_udiDiagExt is devided modulo by 10000. If values are given to the input greater than 9999, the result is not a unique number anymore, because there can be another ET_DiagExt with a value below 10000 which leads to the same number.
Input |
Data type |
Description |
---|---|---|
i_etSource |
The source describes the ET_DiagExt table where the input i_udiDiagExt is from. |
|
i_udiDiagExt |
UDINT |
The value of ET_DiagExt. |
Output |
Data type |
Description |
---|---|---|
q_etDiag |
General, library-independent statement on the diagnostic. A value unequal to GD.ET_Diag.Ok corresponds to a diagnostic message. |
|
q_etDiagExt |
POU-specific output on the diagnostic. q_etDiag = GD.ET_Diag.Ok -> status message q_etDiag <> GD.ET_Diag.Ok -> diagnostic message |
Data type |
Description |
---|---|
UDINT |
The number which combines ET_ExceptionSource and ET_DiagExt accoring to the rules of udiExceptionNumber in ST_Exception. |
q_etDiag |
q_etDiagExt |
Enumeration value |
Description |
---|---|---|---|
OK |
0 |
Ok |
Enumeration name: |
Ok |
Enumeration value: |
0 |
Description: |
Ok |
The exception number was generated successfully.