Oc_enableslot -17 – Rockwell Automation 1747-PCINT API Software for 1746 I/O User Manual

Page 71

Advertising
background image

OC_EnableSlot

Library of Routines

6–17

Publication 1747-6.5.3 June 1998

OC_EnableSlot

OC_EnableSlot enables fine tuning of the I/O scanning process.

Syntax:

int

OC_EnableSlot(HANDLE handle, int slotnum, int state);

Parameters:

Description:

This function enables or disables the scanner from scanning the module in a specific

slotnum

. This applies

to both the input and output scan. Slots that are disabled are not included in the I/O scan. By default, all
slots are enabled.

Return Value:

Considerations:

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

Example:

HANDLE

Handle;

int

retcode;

retcode = OC_EnableSlot( Handle, 6, SLOT_DISABLE ); /* Exclude slot 6 */

Parameter:

Description:

handle

Must be a valid handle returned from OC_OpenScanner

slotnum

Must contain a valid slot number.

state

If

state

is:

SLOT_ENABLE

the module is released from its reset state and is
included in the I/O scan

SLOT_DISABLE

the module is no longer included in the I/O scan and
any outputs remain at their last state

Name:

Value:

Description:

SUCCESS

0

module was updated successfully

ERR_OCACCESS

2

handle

does not have access to scanner

ERR_OCNOFORCES

15

no forces installed, scanner cannot enable forces

ERR_OCPARAM

8

parameter contains invalid value

ERR_OCRESPONSE

10

scanner did not respond to request

ERR_OCSCANCFG

14

scanner has not been configured

Advertising
This manual is related to the following products: