0 api reference, 1 scale data acquisition, 1 weight acquisition – Rice Lake iRite IDE User Manual

Page 35: Api reference, Weight acquisition

Advertising
background image

920i

Programming Reference - API Reference

31

5.0

API Reference

This section lists the application programming interfaces (APIs) used to program the

920i

indicator. Functions

are grouped according to the kinds of operations they support.

Note

If you are unsure whether your version of software supports a given API, check the system.src file to see if
the API is present.

5.1

Scale Data Acquisition

Note

Unless otherwise stated, when an API with a VAR parameter returns a SysCode value other than SysOK,
the VAR parameter is not changed.

5.1.1Weight Acquisition

CloseDataRecording

Turns off data recording started with InitDataRecording. This procedure removes all connections to the data
recording function. To restart data recording, use the InitDataRecording function.

Method Signature:
procedure CloseDataRecording (scale_no : Integer);

Parameters:

[in]

scale_no

Scale number

GetDataRecordSize

Returns the number of data points recorded in the user-specified data array.

Method Signature:
function GetDataRecordSize (scale_no : Integer) : Integer;

Parameters:

[in]

scale_no

Scale number

SysCode values returned:

number

The SysCode contains the number of data points recorded.

GetGross

Sets W to the current gross weight value of scale S, in the units specified by U. W will contain a weight value even
if the scale is in programmed overload.

Method Signature:
function GetGross (S : Integer; U : Units; VAR W : Real) : SysCode;

Parameters:

[in]

S

Scale number

[in]

U

Units (Primary, Secondary, Tertiary)

[out]

W

Gross weight

SysCode values returned:

SysInvalidScale

The scale specified by

S

does not exist.

SysInvalidUnits

The units specified by

U

is not valid.

SysInvalidRequest

The requested value is not available.

SysDeviceError

The scale is reporting an error condition.

SysOK

The function completed successfully.

Example:
GrossWeight : Real;

GetGross (Scale1, Primary, GrossWeight);

WriteLn (Port1, "Current gross weight is", GrossWeight);

Advertising
This manual is related to the following products: