4 program scale, 5 setpoints and batching, 4 program scale 5.5 setpoints and batching – Rice Lake iRite IDE User Manual

Page 56

Advertising
background image

52

920i

Programming Reference

5.4

Program Scale

SubmitData

For

920i

indicators configured for program scale operation, passes data from a user program to the scale

processor. Weight, mode, and tare values are provided by the user program; the displayed weight is the weight
value minus tare. Gross/net mode is set by the gn parameter regardless of whether a tare value is passed. This
allows display of a net value when the net is known but gross and tare values are not available.

Note that because the user program supplies all weight data, weight data acquisition APIs are not valid for
program scales. When used with program scales, these APIs (including GetGross, GetNet, GetTare) will
typically return a SysCode value of SysInvalidScale. Always check the returned SysCode value of scale-related
APIs to ensure valid data.

Syntax:

function SubmitData (scale : Integer; weight : Real; gn : Mode; units : UnitType;
tare : Real) : SysCode;

SysCode values returned:

SysInvalidScale

The scale is not set up as a program scale.

SysOK

The function completed successfully.

SubmitDSPData

Submit data to a program scale. This function works much like SubmitData() but has fewer parameters. New to
this function is the dp : Decimal_Type that allows the program to set the decimal point for the display. The call
assumes Gross mode and primary units.

Syntax:

function SubmitDSPData( scale : integer; weight : real; units : string; dp :
Decimal_Type ) : SysCode;

SysCode values returned:

SysInvalidScale

The scale is not set up as a program scale.

SysOK

The function completed successfully.

5.5

Setpoints and Batching

Note

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

DisableSP

Disables operation of setpoint SP.

Method Signature:
function DisableSP (SP : Integer) : SysCode;

Parameters:

[in]

S

P

Setpoint number

SysCode values returned:

SysInvalidSetpoint

The setpoint specified by

SP

does not exist.

SysBatchRunning

Setpoint

SP

cannot be disabled while a batch is running.

SysInvalidRequest

The setpoint specified by

SP

cannot be enabled or disabled.

SysOK

The function completed successfully.

Example:
DisableSP (4);

EnableSP

Enables operation of setpoint SP.

Method Signature:
function EnableSP (SP : Integer) : SysCode;

Advertising
This manual is related to the following products: