Oc_downloadio, Configuration -11 – Rockwell Automation 1747-PCINT API Software for 1746 I/O User Manual
Page 65

OC_DownloadIO Configuration
Library of Routines
6–11
Publication 1747-6.5.3 June 1998
OC_DownloadIO
Configuration
OC_DownloadIOConfiguration downloads an I/O configuration to the scanner.
Syntax:
int
OC_DownloadIOConfiguration(HANDLE handle, OCIOCFG *iocfg);
Parameters:
Description:
The scanner must be in Idle mode to receive an I/O configuration. This function forces the scanner to Idle
mode to download the configuration.
The scanner checks the downloaded I/O configuration for validity, and if there are any errors, an extended
error might be generated. If an error is generated, the scanner will fault.
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;
Return Value:
Parameter:
Description:
handle
Must be a valid handle returned from OC_OpenScanner
iocfg
Specifies the rack sizes and installed modules
Name:
Value:
Description:
SUCCESS
0
I/O configuration was downloaded successfully
ERR_OCACCESS
2
handle
does not have access to scanner
ERR_OCINIT
5
scanner has not been initialized, see OC_InitScanner
ERR_OCOUTOFMEM
17
unable to allocate memory for configuration data
ERR_OCRESPONSE
10
scanner did not respond to request