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

Enable

BOOL

FALSE

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

Busy

BOOL

FALSE

Operation is running (while output Error is FALSE)

AbbLConC3

Error

BOOL

FALSE

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

Pause

BOOL

FALSE

0 => Normal operation; 1 => pause the current operation

ChannelInputBase

POINTER TO ARRAY [0..3] OF WORD

Base address of strain gauge channel, mapped address of state

ChannelOutputBase

POINTER TO ARRAY [0..3] OF WORD

Base address of strain gauge channel, mapped address of command

DigitalOutput

BOOL

FALSE

Imaged digital output field when “general digital output” is configured

DiagnosisType

Sgx_DIAGNOSIS_TYPE

0

0 => All; > 1 => Sensor; 2 => Channel; 3 => Module

DiagnosisObject

Sgx_DIAGNOSIS_OBJECT

0

Diagnosis object: “hardware”, “wiring” or “parameters” of channel

Output

Active

BOOL

FALSE

0 => Diagnosis(ErrorCountReturn and ErrorCodeList) are in progress; 1 => ErrorCountReturn and ErrorCodeList are ready

ErrorID

ERROR_ID

ERROR_ID.NO_ERROR

ERROR CODE

StateReturn

WORD

0

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

ErrorCountReturn

WORD

0

Error counts or numbers returned

ErrorCodeList

ARRAY [0..3] OF BYTE

[4(0)]

Error code listed