Beschreibung
Mit diesem Befehl können Statuswerte abgerufen werden.
Definition
ULONG DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO, cmd, fifo_instance, 0);
Parameter
cmd = DAPI_SPECIAL_SW_FIFO_GET_STATUS
fifo_instance = Gibt die Instanz des Software FIFO an
Return-Wert
Befehl
|
Beschreibung
(FIFO-Status erzeugt einen Return-Wert...)
|
Wert(hex)
|
DAPI_SPECIAL_SW_FIFO_
STATUS_IS_ACTIVE
|
... wenn die Ausgabe des D/A-Wandlers aktiv ist
|
0x01
|
DAPI_SPECIAL_SW_FIFO_
STATUS_IO_IS_ACTIVE
|
... wenn die Ausgabe des FIFO I/O aktiv ist
|
0x02
|
DAPI_SPECIAL_SW_FIFO_
STATUS_FIFO_OVERFLOW
|
... wenn zuviele Daten in den FIFO geschrieben werden
|
0x04
|
DAPI_SPECIAL_SW_FIFO_
STATUS_FIFO_UNDERRUN
|
... wenn der FIFO leer läuft (es soll eine Ausgabe am I/O-Modul stattfinden, aber es sind keine Daten im Fifo vorhanden)
|
0x08
|
DAPI_SPECIAL_SW_FIFO_
STATUS_FIFO_OUT_OF_SYNC
|
... wenn die FIFO-Kommunikation innerhalb der Module unterbrochen ist
|
0x10
|
Programmierbeispiel
unsigned long ret;
ret = DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO,DAPI_SPECIAL_SW_FIFO_GET_STATUS, fifo_instance, 0);
if((ret & 0x01) != 0) {printf("is_active");}
if((ret & 0x02) != 0) {printf("io_is_active");}
if((ret & 0x04) != 0) {printf("fifo_overflow");}
if((ret & 0x08) != 0) {printf("fifo_underrun");}
if((ret & 0x10) != 0) {printf("fifo_out_of_sync);}
|