3 rate of change, Rate of change – Rice Lake iRite IDE User Manual
Page 38

34
920i
Programming Reference
TareType values returned:
NoTare
There is no tare value associated with the specified scale.
PushbuttonTare
The current tare was acquired by pushbutton.
KeyedTare
The current tare was acquired by key entry or by setting the tare.
SysCode values returned:
SysInvalidScale
The scale specified by
S
does not exist.
T
is unchanged.
SysOK
The function completed successfully.
Example:
TT : TareType;
…
GetTareType (Scale1, TT);
if TT=KeyedTare then …
SetTare
Sets the tare weight for the specified channel.
Method Signature:
function SetTare (S : Integer; U : Units; W : Real) : SysCode;
Parameters:
[in]
S
Scale number
[in]
U
Units (Primary, Secondary, Tertiary)
[in]
W
Tare weight
SysCode values returned:
SysInvalidScale
The scale specified by
S
does not exist.
SysInvalidUnits
The units specified by
U
is not valid.
SysLFTViolation
The tare operation would violate configured legal-for-trade restrictions for the
specified scale. No tare is acquired.
SysOutOfRange
The tare operation would acquire a tare that may cause a display overload. No tare
is acquired.
SysDeviceError
The scale is reporting an error condition.
SysOK
The function completed successfully.
Example:
DesiredTare : Real;
…
DesiredTare := 1234.5;
SetTare (Scale1, Primary, DesiredTare);
5.1.3
Rate of Change
GetROC
Sets R to the current rate-of-change value of scale S.
Method Signature:
function GetROC (S : Integer; VAR R : Real) : SysCode;
Parameters:
[in]
S
Scale number
[out]
R
Rate of change value
SysCode values returned:
SysInvalidScale
The scale specified by
S
does not exist.
SysDeviceError
The scale is reporting an error condition.
SysOK
The function completed successfully.
Example:
ROC : Real;
…
GetROC (Scale3, ROC);
WriteLn (Port1, "Current ROC is", ROC);