Rockwell Automation 1747-PCINT API Software for 1746 I/O User Manual
Page 5

Publication 1747-6.5.3 June 1998
Table of Contents
Overview
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1
Relationship to the Open Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1
The 1746 I/O PCI Interface API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Understanding the 1746 I/O PCI Interface Architecture . . . . . . . . . . . . . . . 1-3
Scanner Modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
Installing the DOS API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5
Installing the Windows NT API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6
Using the API
DOS Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Windows NT Considerations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
Sample DOS MAKE file for Borland compilers . . . . . . . . . . . . . . . . . . . 2-5
Sample DOS MAKE file for Microsoft compilers . . . . . . . . . . . . . . . . . . 2-6
Sample Windows NT MAKE file for Microsoft compilers. . . . . . . . . . . . 2-7
Sample Windows NT MAKE file for Borland compilers. . . . . . . . . . . . . 2-9
Chapter 3
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1
How the API Functions Are Organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1
Programming Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
Access the scanner. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
Initialize the scanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
Configure the scanner. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
Control scanner operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
Scan I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5
Programming Example for DOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6
Programming Example for Windows NT. . . . . . . . . . . . . . . . . . . . . . . . . . 3-12
Handling Interrupt Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-18
Handling Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-18
Determining Partition Sizes for Shared Memory. . . . . . . . . . . . . . . . . . . . 3-18
Chapter 4