5 - configuring i/o modules, Introduction, Configuring i/o – Rockwell Automation 1747-PCIS API Software - Open Controller User Manual
Page 55: Chapter 5, Configuring i/o modules, Introduction -1 configuring i/o -1, Chapter

1
Publication 1747-UM002A-US-P - June 2000
Chapter
5
Configuring I/O Modules
Introduction
This chapter explains how to configure the I/O modules for your 1746
I/O PCI Interface system. You can either use the autoconfigure
(OC_GetIOConfiguration) function or build your own configuration
(OC_CreateIOConfiguration).
A separate I/O configuration utility is available for the PCI SLC I/O
bus interface to simplify this process. The utility is on the 1746 I/O
PCI Interface utilities disk that ships with the 1746 I/O PCI Interface
(1747-PCIS[2]). The I/O configuration utility (ioconfig.exe) allows an
I/O configuration data file to be created and saved to disk.
Configuring I/O
The application configures the scanner by downloading information
about the installed rack sizes and module types. Call the
OC_GetIOConfiguration function to get the current I/O configuration
or use OC_CreateIOConfiguration to build an I/O configuration. Both
of these functions return a valid I/O configuration that can be
downloaded to the scanner.
The scanner will not go to Scan mode until the
OC_DownloadIOConfiguration function sends the configuration
information. The scanner checks the downloaded I/O configuration
against the installed modules when the application attempts to set the
scanner to Scan mode. The scanner returns an extended error if the
I/O configuration is not valid and the scanner will fault.
The OC_CreateIOConfiguration function requires a structure
containing rack sizes and module types or module names. The
structure is:
struct {
BYTE
Rack1Size;
/* number of slots in rack1 (4,7,10,
or 13) */
BYTE
Rack2Size;
/* number of slots in rack2 (0,4,7,10,
or 13) */
BYTE
Rack3Size;
/* number of slots in rack3 (0,4,7,10,
or 13) */
OCSLOTCFGSlotCfg[31];/* slot information */
} OCIOCFG;
Initialize the three rack size variables with the total number of slots in
each rack. If rack 2 or rack 3 is not installed, set the size to 0.