Windows nt considerations -3 – Rockwell Automation 1747-PCINT API Software for 1746 I/O User Manual

Page 19

Advertising
background image

Using the API

2–3

Publication 1747-6.5.3 June 1998

Windows NT Considerations

During development, the application must be linked with an import library that
provides information about the functions contained within the DLL. The API import
library is compatible with the Microsoft linker. You can generate import libraries
for other programming languages from the DLL.

The Windows NT API can only be accessed by one process at a time. The API is
designed to be multi-thread safe, so that multi-threaded control applications can be
developed. Where necessary, the API functions acquire a mutex before accessing
the scanner interface. In this way, access to the scanner device is serialized. If the
mutex is in use by another thread, a thread will be blocked until it is freed.

To create a consistent API, careful consideration was given to these requirements::

A group of thread-blocking functions are provided to aid multi-threaded application
development. The functions are:

OC_WaitForDII

OC_WaitForEos

OC_WaitForEosDmdOut

OC_WaitForIoInt

OC_WaitForDmdIn

OC_WaitForExtError

For more information, see chapter 6.

This requirement:

Considerations:

memory mapping

The NT API device driver detects the Scanner Adapter and automatically configures the memory
window address and interrupt assignment. The base memory address jumper must be positioned
to choose 32 bit addressing. The API and device driver must be installed on the system.

Place the base memory select jumper in 32-bit position to allow the PCI BIOS to assign a base
memory address anywhere in 32-bit memory for protected-mode applications (WinNT). NT
device drivers (1747-PCINT) use the PCI BIOS or OS services to determine the memory window
base address and provide access to the dual port memory.

To determine the allocated memory base address and interrupt, run the Windows NT
diagnostic found in Administrative Tools.

NT interrupts

An interrupt is automatically assigned to the scanner by the PCI bus at power-up

To determine the allocated memory base address and interrupt, run the Windows NT
diagnostic found in Administrative Tools.

Advertising
This manual is related to the following products: