Oc_getioconfiguration, Oc_getioconfiguration -21 – Rockwell Automation 1747-PCIS API Software - Open Controller User Manual

Page 81

Advertising
background image

Publication 1747-UM002A-US-P - June 2000

Library of Routines 6-21

Considerations:

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

Example:

HANDLE

Handle;

BYTE

count;

int

retcode;

retcode = OC_GetInputImageUpdateCounter( Handle, &count );

OC_GetIOConfiguration

OC_GetIOConfiguration queries the I/O rack about the installed rack
sizes and I/O modules in each 1746 chassis.

Syntax:

int

OC_GetIOConfiguration(HANDLE handle, OCIOCFG

*iocfg);

Parameters:

Description:

If the scanner is in Scan mode and OC_GetIOConfiguration returns
successfully, OC_GetIOConfiguration enables the host application to
access I/O. The scanner must have previously received a valid
configuration prior to going to Scan mode.

The

OCIOCFG

structure is defined as:

typedef struct tagOCIOCFG

{

BYTE

Rack1Size;/* number of slots in Rack 1 */

BYTE

Rack2Size;/* number of slots in Rack 2 */

ATTENTION

!

OC_GetIOConfiguration can take several
milliseconds to complete, depending upon the rack
configuration. While it is executing, I/O scanning
and DII’s are disabled.

Parameter:

Description:

handle

Must be a valid handle returned from OC_OpenScanner

iocfg

Specifies the rack sizes and installed modules
Use the information in

iocfg

as input to

OC_DownloadIOConfiguration to configure the scanner.

Advertising
This manual is related to the following products: