Oc_setinputupdate mode, Oc_setinputupdatemode -58, Example – Rockwell Automation 1747-PCIS API Software - Open Controller User Manual

Page 118: Syntax, Parameters: description, Return value: considerations

Advertising
background image

Publication 1747-UM002A-US-P - June 2000

6-58 Library of Routines

Example:

HANDLE

Handle;

int

retcode;

retcode = OC_SetHostWatchdog(Handle, WATCHDOG_IDLE, 10 );

/* Watchdog times out in 1 second and places scanner in idle

mode */

OC_SetInputUpdate
Mode

OC_SetInputUpdateMode controls how the scanner updates inputs.

Syntax:

int

OC_SetInputUpdateMode(HANDLE handle, int mode);

Parameters:

Description:

This function does not affect output image scanning.

Return Value:

Considerations:

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

Example:

HANDLE

Handle;

int

retcode;

retcode = OC_SetInputUpdateMode( Handle, INUPD_NEVER );

/* Must use OC_DemandInputScan() function to obtain new input

data */

Parameter:

Description:

handle

Must be a valid handle returned from OC_OpenScanner

mode

If

mode

is:

INUPD_NEVER

The scanner does not scan inputs unless
explicitly requested by the
C_DemandInputScan function.

INUPD_ALWAYS

The scanner continuously updates inputs
on every scan.

By default, the input update mode is INUPD_ALWAYS. A change in
status of the input update mode takes effect at start of next scan.

Name:

Value:

Description:

SUCCESS

0

conditional scan 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

Advertising
This manual is related to the following products: