User manual

Table Of Contents
DELIB API reference |
Seite 110
4.3.4. DapiDIGet32
Description
This command reads 32 digital inputs simultaneously.
Definition
ULONG DapiDIGet32(ULONG handle, ULONG ch);
Parameters
handle=This is the handle of an opened module.
ch=Specifies the number of the input, from which it begins to read from (0, 32,
64, ..)
Return value
State of the read inputs.
Example program
unsigned long data;
// ----------------------------------------------------
// Einen Wert von den Eingängen lesen (Eingang 1-31)
data = (unsigned long) DapiDIGet32(handle, 0);
// Chan Start = 0
printf("Eingang 0-31 : 0x%x\n", data);
printf("Taste r weiter\n");
getch();
// ----------------------------------------------------
// Einen Wert von den Eingängen lesen (Eingang 32-64)
data = (unsigned long) DapiDIGet32(handle, 32);
// Chan Start = 32
printf("Eingang 32-64 : 0x%x\n", data);
printf("Taste r weiter\n");
getch();