Rice Lake iRite IDE User Manual
Page 34

30
920i
Programming Reference
DualAnalogOut );
-- Array size must match MAX_SLOTS in core code common.h.
type HW_array_type is array[14] of HW_type;
-- Graph type must match definitions in graphing.h.
type GraphType is ( Line, Bar, XY );
-- Decimal_Type must match enumeration in cfg.h.
type Decimal_type is (
DP_8_888888,
DP_88_88888,
DP_888_8888,
DP_8888_888,
DP_88888_88,
DP_888888_8,
DP_8888888,
DP_8888880,
DP_8888800,
DP_DEFAULT );
-- IQValType must match the enumeration in iQube.h in the core software.
type IQValType is ( IQSys, IQPlat, IQRawLC, IQCCorrLC, IQZeroLC, IStatLC
IQ2ScaleWt, IQ2StatusLC );
type USBDeviceType is(USBNoDevice, USBHostPC, USBPrinter1, USBPrinter2,
USBKeyboard, USBFileSystem);
type FileAccessMode is(FileCreate, FileAppend, FileRead);
type FileLineTermination is(FileCRLF, FileCR, FileLF);
Using SysCode Data
SysCode data can be used to take some action based on whether or not a function completed successfully. For
example, the following code checks the SysCode result following a
GetTare
function. If the function completed
successfully, the retrieved tare weight is written to Port 1:
Scale1 : constant Integer := 1;
Port1 : constant Integer := 1;
SysResult : SysCode;
TareWeight : Real;
…
SysResult:= GetTare (Scale1, Primary, TareWeight);
if SysResult = SysOK then
WriteLn (Port1, "The current tare weight is ", TareWeight)’
end if;