Rice Lake iRite IDE User Manual
Page 36

32
920i
Programming Reference
GetNet
Sets W to the current net 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 GetNet (S : Integer; U : Units; VAR W : Real) : SysCode;
Parameters:
[in]
S
Scale number
[in]
U
Units (Primary, Secondary, Tertiary)
[out]
W
Net 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:
NetWeight : Real;
…
GetNet (Scale2, Secondary, NetWeight);
WriteLn (Port1, "Current net weight is", NetWeight);
GetTare
Sets W to the tare weight of scale S in weight units specified by U.
function GetTare (S : Integer; U : Units; VAR W : Real) : SysCode;
Parameters:
[in]
S
Scale number
[in]
U
Units (Primary, Secondary, Tertiary)
[out]
W
Tare 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.
SysNoTare
The specified scale has no tare.
W
is set to 0.0.
SysDeviceError
The scale is reporting an error condition.
SysOK
The function completed successfully.
Example:
TareWeight : Real;
…
GetTare (Scale3, Tertiary, TareWeight);
WriteLn (Port1, "Current tare weight is ", TareWeight);
InitDataRecording
InitDataRecording allows raw weights to be stored to a user program-specified array on each iteration of the
scale processor. Recording begins when the
start_sp
is satisfied and ends when the
stop_sp
is satisfied.
InitDataRecording specifies the data array used for the recording, scale number, and the start and stop setpoint
numbers.
Note
If the setpoint conditions return to the start conditions (start_sp satisfied, stop_sp not satisfied), recording
will continue at the array location where it left off. Thus, a continuous batch will need to call
CloseDataRecording to stop recording, then call InitDataRecording to restart data recording at the
beginning of the array.
Method Signature:
function InitDataRecording (data : DataArray; scale_no : Integer; start_sp :
Integer; stop_sp : Integer) : SysCode;