Rockwell-automation 1747-PCINT API Software for 1746 I/O Manual de usuario Pagina 120

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 155
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 119
6–66 Library of Routines OC_SetHostWatchdog
Publication 1747-6.5.3 June 1998
OC_SetHostWatchdog OC_SetHostWatchdog sets the host-to-scanner watchdog delay and mode of the
scanner.
Syntax:
int OC_SetHostWatchdog(HANDLE handle, int mode, WORD delay);
Parameters:
Description
Once the Host Watchdog is enabled, the host application must call OC_PetHostWatchdog more often than
the time specified as the watchdog timeout. If the host application does not call OC_PetHostWatchdog for
a time longer than the watchdog timeout, then the action specified by
mode
is performed.Return Value
Return Value:
Considerations:
Supported in the DOS API library and the Windows NT API library
Example:
HANDLE Handle;
int retcode;
retcode = OC_SetHostWatchdog(Handle, WATCHDOG_IDLE, 10 );
/* Watchdog times out in 1 second and places scanner in idle mode */
Parameter: Description:
handle
Must be a valid handle returned from OC_OpenScanner
mode
If mode is:
WATCHDOG_IGNORE the host-to-scanner watchdog is
disabled (default)
WATCHDOG_IDLE a watchdog timeout causes the scanner to fault.
The status LED is set to flashing red, the I/O is
reset, I/O scanning stops, and internal scanner
error of 0x0B is set, and the major error code is
set to 0x40. Use OC_ClearFault before the
scanner can be set to Scan mode
delay
Specifies the watchdog timeout in multiples of 100ms and can have any
value from 1 (100ms) to 65535 (6553.5s).
Name: Value: Description:
SUCCESS
0
host watchdog was set successfully
ERR_OCACCESS
2
handle does not have access to scanner
ERR_OCINIT
5
scanner has not been initialized, see OC_InitScanner
ERR_OCPARAM
8
parameter contains invalid value
Vista de pagina 119
1 2 ... 115 116 117 118 119 120 121 122 123 124 125 ... 154 155

Comentarios a estos manuales

Sin comentarios