Software, Programming and Utilities
Precision MicroControl Corp.
30
The API itself is implemented in three parts. The low level device driver provides communications with the
motion controller, in a way that is compatible with the Microsoft Windows operating system. The Motion
Control API low level driver passes binary MCCL commands (Motion Control Command Language – the
instruction set of the controller ) to the controller . By placing the operating system specific portions of the
API here it will be possible to replace this component in the future to support new operating systems
without breaking application programs, which rely on the upper layers of the API.
Sitting above that, and communicating with the driver is the API Dynamic Link Library (DLL). The DLL
layer implements the high level motion functions that make up the API. This layer also handles the
differences in operation of the various PMC Motion Controllers, making these differences virtually
transparent to users of the API.
At the highest level are environment specific drivers and support files. These components support specific
features of that particular environment or development system.
Care has been exercised in the construction of the API to ensure it meets with Windows interface
guidelines. Consistency with the Windows guidelines makes the API accessible to any application that
can use standard Windows components - even those that were developed after the Motion Control API!
Please refer to the Motion Control Application Programming Interface (Motion Control API Reference
Manual for additional information on adapting the Motion Control API to other development environments.
Controller Interface Types
The controller supports two onboard interfaces, an ASCII (text) based interface and a binary interface.
The binary interface is used for high speed command operation, and the ASCII interface is used for
interactive text based operation. The high level sample programs (CWDEMO, PASDEMO, and VBDEMO)
use the binary interface, PMC WinControl uses the ASCII interface.
Application programs must indicate which interface they intend to use when they open a handle for a
particular controller. A controller may have more than one handle open at a time, but all open handles for
a particular controller must specify the same interface (all must be open with the binary interface or all
must be open with the ASCII interface). The open mode is specified by setting the second argument of
the
MCOpen( )
function to either
MC_OPEN_ASCII
or
MC_OPEN_BINARY
.
Note that not all functions are available in the ASCII mode of operation, this mode is intended primarily for
use with the
pmcgetc( )
,
pmcgets( )
,
pmcputc( )
, and
pmcputs( )
character based functions (these 4
functions are not available in binary mode). This restriction will be eliminated in a future release of the
API.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com