SgxCalibration (FB)

FUNCTION_BLOCK SgxCalibration EXTENDS AbbLConC3

SgxCalibration function block is utilized to calibrate “ZERO”, “TARE” and “TWO_POINTS_CALIBRATION” to increase the precision of weighting

CalibrationType = “ZERO”, the rising edge of “Execute” signal will set the current weight as “ZERO”, an offset subtraction before export

CalibrationType = “TARE”, the rising edge of “Execute” signal will store the current weight(eg. packaging) to convert between “Gross” and “Net” weights

CalibrationType = “TWO_POINTS_CALIBRATION”, below three steps implements two-point calibration of the weight factor to boost measurement accuracy

Step 1: Use standard or calibrated object 1, then set “ReferenceWeight” as the first reference weight and “Index” = 0, with rising edge of “Execute” to get and return the actual measurement of reference point 1

Step 2: Replace with standard or calibrated object 2, then set “ReferenceWeight” as the second reference weight and “Index” = 1, with rising edge of “Execute” to get and return the actual measurement of reference point 2

Step 3: Finally, set “Index” = 2, with rising edge of “Execute”, the calibration data “scale” and “offset” will be calculated and stored internally

“Eeprom” is selectable between temporary storage and non-volatile data retention

A new calibration cycle is initiated by the rising edge of “Execute” signal

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

Set

BOOL

FALSE

A rising edge starts a single operation of “ZERO”, “TARE” or a step of “TWO_POINTS_CALIBRATION”

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

Eeprom

BOOL

FALSE

Calibration data to be stored in data flash memory

CalibrationType

Sgx_CALIBRATION_TYPE

Sgx_CALIBRATION_TYPE.NONE

Option of “ZERO”, “TARE” or “TWO_POINTS_CALIBRATION” calibration

DigitalOutput

BOOL

FALSE

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

Index

Sgx_CALIBRATION_INDEX

Sgx_CALIBRATION_INDEX.REFERENCE_WEIGHT_1

Parameter ID or index of parameter of calibration data

ReferenceWeight

DINT

0

Input reference weight

Output

CarryOut

BOOL

FALSE

Calibration state, 0 => calibration in progress; 1 => calibration is carried out

ErrorID

ERROR_ID

ERROR_ID.NO_ERROR

Error code returned

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

IndexReturn

WORD

0

Index returned, valid as CalibrationType = “TWO_POINTS_CALIBRATION”

DataCalibration

SgxParameterData

CalibrationData returned