Oc_setioidlestate, Oc_setioidlestate -59, Syntax – Rockwell Automation 1747-PCIS API Software - Open Controller User Manual

Page 119: Parameters: description, Return value: considerations, Example

Advertising
background image

Publication 1747-UM002A-US-P - June 2000

Library of Routines 6-59

OC_SetIOIdleState

OC_SetIOIdleState controls the state of I/O when the scanner goes
from Scan mode to Idle mode.

Syntax:

int

OC_SetIOIdleState(HANDLE handle, int mode);

Parameters:

Description:

The I/O will always be reset in the case of a fault.

Return Value:

Considerations:

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

Example:

HANDLE

Handle;

int

retcode;

retcode = OC_SetIOIdleState( Handle, IDLESTATE_HOLD );

/* Outputs will remain in last state when scanner goes to idle

mode */

Parameter:

Description:

handle

Must be a valid handle returned from OC_OpenScanner

mode

If

mode

is:

IDLESTATE_HOLD

module I/O’s maintain their last state.

IDLESTATE_RESET

module I/O’s are reset by the scanner.

The default I/O idle state is IDLESTATE_RESET.

Name:

Value:

Description:

SUCCESS

0

I/O state was changed 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: