
DELIB API reference | Seite
59
return;
}
// Zum Testen - ein Ping senden
// ----------------------------------------------------
printf("PING\n");
anz=10;
for(i=0;i!=anz;++i)
{
data=DapiPing(handle, i);
if(i==data)
{
// OK
printf(".");
}
else
{
// No answer
printf("E");
}
}
printf("\n");
// ----------------------------------------------------
// Einen Wert auf die Ausgänge schreiben
data = 255;
DapiWriteByte(handle, 0, data);
printf("Schreibe auf Adresse=0 daten=0x%x\n", data);
// ----------------------------------------------------
// Einen Wert auf die Ausgänge schreiben
data = 255;
DapiWriteByte(handle, 1, data);
printf("Schreibe auf Adresse=0 daten=0x%x\n", data);
// ----------------------------------------------------
// Einen Wert auf die Ausgänge schreiben
data = 255;
DapiWriteByte(handle, 2, data);
printf("Schreibe auf Adresse=2 daten=0x%x\n", data);
// ----------------------------------------------------
// Einen Wert von den Eingängen lesen
data = (unsigned long) DapiReadByte(handle, 0);
printf("Gelesene Daten = 0x%x\n", data);
// ----------------------------------------------------
// Einen A/D Wert lesen
chan=11; // read chan. 11
data = DapiReadWord(handle, 0xff chan*2);
printf("Adress=%x, ret=%x volt=%f\n", chan, data, ((float) data) / 1024*5);//
Bei 5 Volt Ref
// ----------------------------------------------------
// Modul wieder schliessen
DapiCloseModule(handle);
printf("TASTE für weiter\n");
getch();
return ;
}
Содержание USB WATCHDOG STICK
Страница 1: ...Hardware Description März USB WATCHDOG STICK 2016 ...
Страница 4: ...I Introduction Seite 4 Introduction ...
Страница 6: ...II Hardware description Seite 6 Hardware description ...
Страница 8: ...Hardware description Seite 8 2 1 Overview screen ...
Страница 16: ...III Software Seite 16 Software ...
Страница 26: ...Software Seite 26 Check under Projekte und Projektmappen Erweiterte Buildkonfigurationen anzeigen ...
Страница 35: ...Software Seite 35 Choose the option create VIs for DLL and press continue ...
Страница 36: ...Software Seite 36 In the next window choose the path to the delib h and delib dll and press continue ...
Страница 37: ...Software Seite 37 Press continue again The Header File will now be analized Afterwards press continue ...
Страница 38: ...Software Seite 38 Follow the instructions and configurate the name and the saving location for the VIs ...
Страница 39: ...Software Seite 39 In the new window choose Easy error correction in the drop down menu and press continue ...
Страница 45: ...Software Seite 45 ...
Страница 46: ...IV DELIB API reference Seite 46 DELIB API reference ...
Страница 60: ...V Appendix Seite 60 Appendix ...