6 digital i/o control – Rice Lake iRite IDE User Manual
Page 66

62
920i
Programming Reference
SetSPVunder
For checkweigh (CHKWEI) setpoints, sets the underrange value (VUNDER parameter) of setpoint SP to the
value specified by V.
Method Signature:
function SetSPVunder (SP : Integer; V : Real) : SysCode;
Parameters:
[in]
S
P
Setpoint number
[in]
V
Underrange
SysCode values returned:
SysInvalidSetpoint
The setpoint specified by
SP
does not exist.
SysInvalidRequest
The setpoint specified by
SP
has no VUNDER parameter.
SysOK
The function completed successfully.
Example:
SP4VUR : Real;
…
SP4VUR := 26.4
SetSPVunder (4, SP4VUR);
StartBatch
Starts or resumes a batch run.
Method Signature:
function StartBatch : SysCode;
SysCode values returned:
SysPermissionDenied
The BATCHNG configuration parameter is set to OFF.
SysBatchRunning
A batch process is already in progress.
SysOK
The function completed successfully.
StopBatch
Stops a currently running batch.
Method Signature:
function StopBatch : SysCode;
SysCode values returned:
SysPermissionDenied
The BATCHNG configuration parameter is set to OFF.
SysBatchNotRunning
No batch process is running.
SysOK
The function completed successfully.
5.6
Digital I/O Control
In the following digital I/O control functions, slot 0 represents the J2 connector on the indicator CPU board and
supports four digital I/O bits (1–4). Digital I/O on expansion boards (slots 1–14) each support 24 bits of I/O (bits
1–24).
GetDigin
Sets V to the value of the digital input assigned to slot S, bit D. GetDigin sets the value of V to 0 if the input is on,
to 1 if the input is off. Note that the values returned are the reverse of those used when setting an output with the
SetDigout function.
Method Signature:
function GetDigin (S : Integer; D : Integer; VAR V : Integer) : SysCode;
Parameters:
[in]
S
Slot number
[in]
D
Bit number
[out]
D
Digital input status