Oc_setioidlestate -68 – Rockwell Automation 1747-PCINT API Software for 1746 I/O User Manual

Page 122

Advertising
background image

6–68

Library of Routines

OC_SetIOIdleState

Publication 1747-6.5.3 June 1998

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: