5-6
Programming
Configuring the Direct I/O Driver
The Direct I/O Driver requires that you configure a DriverLINX Logical Device
using the DriverLINX Configuration Panel utility. The Direct I/O driver does not
require any separate configuration.
Programming the Direct I/O Interface
The Direct I/O Interface is an ActiveX Automation object hosting one interface.
This control is compatible with Microsoft Visual C++ and Visual Basic as well as
other ActiveX-hosting languages.
The methods of the control’s interface, ISAPIO, access the 8-bit ports of an Intel
8255 chip. Consult an Intel hardware manual or DriverLINX manual for information
on programming the 8255 chip.
IISAPIO Intel 8255 interface
The following syntax descriptions are shown in C/C++. For Visual Basic, use the
Object Browser to see the VB syntax (see the next subsection,
Using the Direct I/O
Driver in Visual Basic
).
•
HRESULT Open Device(long Device);
Opens a PIO device
Device is the DriverLINX Logical Device number of the PIO board to open.
•
HRESULT CloseDevice();
Closes a previously opened PIO device.
The number of CloseDevice calls must match the number of OpenDevice
calls.
•
HRESULT Read(short Offset, unsigned char * Result);
Reads an 8-bit value from the PIO board.
Offset is the value of the register to read relative to the base I/O address.
Result is the value read from the register.
•
HRESULT Write(short Offset, unsigned char Value);
Writes an 8-bit value to the PIO board.
Offset is the value of the register to write relative to the base I/O address.
Value is the output to write to the register.
•
HRESULT OpenCount(long *Count);
Returns the number of times a client has called OpenDevice for this Logical
Device. Count is the address of the value for the result.
•
HRESULT Device(long *LogicalDevice);
Returns the Logical Device number if the device is open. Otherwise it returns
-1. LogicalDevice is the address of the value for the result.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
Содержание PIO-24
Страница 14: ...1 Introduction Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...
Страница 21: ...2 Installation Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...
Страница 29: ...3 I OAddressMap Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...
Страница 42: ...5 Programming Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...
Страница 49: ...6 Troubleshooting Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...