Oc_getioconfiguration -27 – Rockwell Automation 1747-PCINT API Software for 1746 I/O User Manual
Page 81
OC_GetIOConfiguration
Library of Routines
6–27
Publication 1747-6.5.3 June 1998
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 */
BYTE
Rack3Size;
/* number of slots in Rack 3 */
OCSLOTCFG SlotCfg[OCMAXSLOT];/* configuration for each slot */
} OCIOCFG;
!
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.