SgxDiagnosis (FB)
FUNCTION_BLOCK SgxDiagnosis EXTENDS AbbLConC3
SgxDiagnosis function block performs diagnostics on “All classes”, “Sensor”, “Channel” or “Module”
DianosisType := 0 to diagnose all classes: “Sensor”, “Channel” and “Module”
DianosisType := 1 to diagnose sensor health (hardware, wiring or parameter)
DiagnosisType := 2 to diagnose channel health (hardware, wiring or parameter)
DiagnosisType := 3 to diagnose module health (hardware, wiring or parameter)
Diagnoistics start on “Enable := TRUE”
- InOut:
Scope
Name
Type
Initial
Comment
Inherited from
Input
EnableBOOLFALSE
A rising edge (Enable = TRUE) starts the operation, the output Busy goes to TRUE. All other inputs are read and considered continuously. Execution will continue forever until a falling edge (Enable = FALSE) aborts the operation. During Aborting the Busy is still TRUE. Afterward all outputs are reset.
AbbLConC3
Output
BusyBOOLFALSE
Operation is running (while output Error is FALSE)
AbbLConC3
ErrorBOOLFALSE
Operation is stopped with error (while output Busy is FALSE). This output is TRUE for at least one cycle or until Enable is set to FALSE. The output ErrorID gives more details about the error.
AbbLConC3
Input
PauseBOOLFALSE
0 => Normal operation; 1 => pause the current operation
ChannelInputBasePOINTER TO ARRAY [0..3] OF WORD
Base address of strain gauge channel, mapped address of state
ChannelOutputBasePOINTER TO ARRAY [0..3] OF WORD
Base address of strain gauge channel, mapped address of command
DigitalOutputBOOLFALSE
Imaged digital output field when “general digital output” is configured
DiagnosisType0
0 => All; > 1 => Sensor; 2 => Channel; 3 => Module
DiagnosisObject0
Diagnosis object: “hardware”, “wiring” or “parameters” of channel
Output
ActiveBOOLFALSE
0 => Diagnosis(ErrorCountReturn and ErrorCodeList) are in progress; 1 => ErrorCountReturn and ErrorCodeList are ready
ErrorIDERROR_ID.NO_ERROR
ERROR CODE
StateReturnWORD0
State returned, [0] => digital output state;[1] => Done; [8:10] => calibration type, 1 = ZERO, 2 = TARE, 4 = TWO_POINTS_CALIBRATION; [11] => Eeprom; [12:15] = 2
ErrorCountReturnWORD0
Error counts or numbers returned
ErrorCodeListARRAY [0..3] OF BYTE
[4(0)]
Error code listed