Herunterladen Inhalt Inhalt Diese Seite drucken

Quancom Watchdog3 Benutzerhandbuch Seite 30

Inhaltsverzeichnis

Werbung

QAPIExtSpecial(hwdog3, JOB_WDOG3_SET_RELAIS_TIME, 1000L, 0L);
Relaisanzugszeit = 1000 ms
QAPIExtSpecial(hwdog3, JOB_WDOG3_SET_REPEAT_TIME, 100L, 100L);
Wiederholzeit = 100 ms * 100 = 10 s
QAPIExtSpecial(hwdog3, JOB_WDOG3_RELAIS_INVERSION, 0L, 0L);
Relaisinversion aus
/*
**
Im Normalfall wird bei der Watchdog3 das Relais nur beim Eintritt
eines Watchdogereignisses angezogen.
**
Soll dagegen das Relais bei Aktivierung des Watchdogs angezogen sein
und nur bei einem Watchdogereignis
**
abfallen, so wird dies über den Job-Code JOB_WDOG3_RELAIS_INVERSION
und para1=1L eingestellt.
*/
if (inv_flag)
{
QAPIExtSpecial(hwdog3, JOB_WDOG3_RELAIS_INVERSION, 1L, 0L);
Relais-Inversion an
Ruhezustandd = Relais an
Watchdogereignis = Relais aus
}
QAPIExtWatchdog(hwdog3, JOB_ENABLE_WATCHDOG);
for (;;)
{
//Sleep(50L);
tcntr = QAPIExtSpecial(hwdog3, JOB_IOREAD_BYTE, 0L, 0L);
rcntr = QAPIExtSpecial(hwdog3, JOB_IOREAD_BYTE, 3L, 0L);
printf("Timeout-Counter = %3ld
rcntr);
//QAPIExtWatchdog(hwdog3, JOB_RETRIGGER_WATCHDOG);
if (kbhit() && getch()==27) break;
}
QAPIExtWatchdog(hwdog3, JOB_DISABLE_WATCHDOG);
QAPIExtCloseCard(hwdog3);
}
Seite 30
Retrigger-Counter = %3ld\n", tcntr,
QLIB Befehle
//
//
//
//
//
//
Produktbeschreibung

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis