Oc_getscanner, Watchdogcount -35 – Rockwell Automation 1747-PCINT API Software for 1746 I/O User Manual

Page 89

Advertising
background image

OC_GetScanner WatchdogCount

Library of Routines

6–35

Publication 1747-6.5.3 June 1998

OC_GetScanner
WatchdogCount

OC_GetScannerWatchdogCount reads the contents of the watchdog register of the
scanner.

Syntax:

int

OC_GetScannerWatchdogCount(HANDLE handle, BYTE *count);

Parameters:

Description:

The watchdog register is incremented by the scanner after every timed I/O scan.

This register is incremented in both Scan and Idle modes, and is incremented even if both output and input
scans are disabled. The control application can monitor this register to ensure that the scanner is functioning
normally. It is also useful for synchronizing with the I/O scan.

Return Value:

Considerations:

Supported in the DOS API library and the Windows NT API library

Example:

HANDLE

Handle;

BYTE

wdog_count;

int

retcode;

retcode = OC_GetScannerWatchdogCount( Handle, &wdog_count );

Parameter:

Description:

handle

Must be a valid handle returned from OC_OpenScanner

count

Returns the watchdog register contents

Name:

Value:

Description:

SUCCESS

0

watchdog was read successfully

ERR_OCACCESS

2

handle

does not have access to scanner

Advertising
This manual is related to the following products: