Oc_getscanner watchdogcount, Oc_getscannerwatchdogcount -29 – Rockwell Automation 1747-PCIS API Software - Open Controller User Manual

Page 89

Advertising
background image

Publication 1747-UM002A-US-P - June 2000

Library of Routines 6-29

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: