5 scale operations, Scale operations – Rice Lake iRite IDE User Manual

Page 41

Advertising
background image

920i

Programming Reference - API Reference

37

Example:
AvgAccum : Real;

GetAvgAccum (Scale1, AvgAccum);

GetUnitsString

Sets V to the text string representing the current display units for scale S.

Method Signature:
function GetUnitsString (S : Integer; U : Units; VAR V : String) : SysCode;

Parameters:

[in]

S

Scale number

[in]

U

Units (Primary, Secondary, Tertiary)

[out]

V

Current display units string

Units values sent:

Primary

Primary units are currently displayed on scale

S

.

Secondary

Secondary units are currently displayed on scale

S

.

Tertiary

Tertiary units are currently displayed on scale

S

.

SysCode values returned:

SysInvalidScale

The scale specified by

S

does not exist.

SysInvalidUnits

The units value specified by

U

does not exist.

SysOK

The function completed successfully.

Example:
CurrentUnitsString : Units;

GetUnitsString (Scale1, Primary, CurrentUnitsString);

SetAccum

Sets the value of the accumulator associated with scale S to weight W, in units specified by U.

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

Parameters:

[in]

S

Scale number

[in]

U

Units (Primary, Secondary, Tertiary)

[in]

W

Accumulator value

SysCode values returned:

SysInvalidScale

The scale specified by

S

does not exist.

SysInvalidUnits

The units specified by

U

is not valid.

SysDeviceError

The scale is reporting an error condition.

SysPermissionDenied

The accumulator is not enabled for the specified scale.

SysOK

The function completed successfully.

Example:
AccumValue : Real;

AccumValue := 110.5

SetAccum (Scale1, Primary, AccumValue);

5.1.5

Scale Operations

CurrentScale

Sets S to the numeric ID of the currently displayed scale.

Method Signature:
function CurrentScale : Integer;

Advertising
This manual is related to the following products: