Keithley Instruments, Inc. warrants this product to be free from defects in material and workmanship for a period of
1 year from date of shipment.
Keithley Instruments, Inc. warrants the following items for 90 days from the date of shipment: probes, cables,
rechargeable batteries, diskettes, and documentation.
During the warranty period, we will, at our option, either repair or replace any product that proves to be defective.
To exercise this warranty, write or call your local Keithley Instruments representative, or contact
Keithley Instruments headquarters in Cleveland, Ohio. You will be given prompt assistance and return instructions.
Send the product, transportation prepaid, to the indicated service facility. Repairs will be made and the product
returned, transportation prepaid. Repaired or replaced products are warranted for the balance of the original
warranty period, or at least 90 days.
LIMITATION OF WARRANTY
This warranty does not apply to defects resulting from product modification without Keithley Instruments’ express
written consent, or misuse of any product or part. This warranty also does not apply to fuses, software,
non-rechargeable batteries, damage from battery leakage, or problems arising from normal wear or failure to follow
instructions.
THIS WARRANTY IS IN LIEU OF ALL OTHER WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING ANY
IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. THE REMEDIES
PROVIDED HEREIN ARE BUYER’S SOLE AND EXCLUSIVE REMEDIES.
NEITHER KEITHLEY INSTRUMENTS, INC. NOR ANY OF ITS EMPLOYEES SHALL BE LIABLE FOR ANY
DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF
ITS INSTRUMENTS AND SOFTWARE EVEN IF KEITHLEY INSTRUMENTS, INC., HAS BEEN ADVISED IN
ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES. SUCH EXCLUDED DAMAGES SHALL INCLUDE, BUT
ARE NOT LIMITED TO: COSTS OF REMOVAL AND INSTALLATION, LOSSES SUSTAINED AS THE RESULT
OF INJURY TO ANY PERSON, OR DAMAGE TO PROPERTY.
A G R E A T E R M E A S U R E O F C O N F I D E N C E
Manual Print HistoryKPXI 48-Channel General Purpose Card User’s Manual
Manual Print History
The print history shown below lists the printing dates of all Revisions and Addenda created for this
manual. The Revision Level letter increases alphabetically as the manual undergoes subsequent
updates. Addenda, which are released between Revisions, contain important change information that
the user should incorporate immediately into the manual. Addenda are numbered sequentially. When a
new Revision is created, all Addenda associated with the previous Revision of the manual are
incorporated into the new Revision of the manual. Each new Revision includes a revised copy of this
print history page.
Revision A (Document Number KPXI-DIO-900-01) ............................................January 2007
All Keithley Instruments product names are trademarks or registered trademarks of Keithley Instruments, Inc.
Other brand names are trademarks or registered trademarks of their respective holders.
KPXI-DIO-900-01 Rev. A / January 2007
The following safety precautions should be observed before using this product and any associated instrumentation. Although
some instruments and accessories would normally be used with non-hazardous voltages, there are situations where hazardous
conditions may be present.
This product is intended for use by qualified personnel who recognize shock hazards and are familiar with the safety precautions
required to avoid possible injury. Read and follow all installation, operation, and maintenance information carefully before using
the product. Refer to the manual for complete product specifications.
If the product is used in a manner not specified, the protection provided by the product may be impaired.
The types of product users are:
Responsible body is the individual or group responsible for the use and maintenance of equipment, for ensuring that the
equipment is operated within its specifications and operating limits, and for ensuring that operators are adequately trained.
Operators use the product for its intended function. They must be trained in electrical safety procedures and proper use of the
instrument. They must be protected from electric shock and contact with hazardous live circuits.
Maintenance personnel perform routine procedures on the product to keep it operating properly, for example, setting the line
voltage or replacing consumable materials. Maintenance procedures are described in the manual. The procedures explicitly state
if the operator may perform them. Otherwise, they should be performed only by service personnel.
Safety Precautions
Service personnel are trained to work on live circuits, and perform safe installations and repairs of products. Only properly
trained service personnel may perform installation and service procedures.
Keithley Instruments products are designed for use with electrical signals that are rated Measurement Category I and
Measurement Category II, as described in the International Electrotechnical Commission (IEC) Standard IEC 60664. Most
measurement, control, and data I/O signals are Measurement Category I and must not be directly connected to mains voltage or
to voltage sources with high transient over-voltages. Measurement Category II connections require protection for high transient
over-voltages often associated with local AC mains connections. Assume all measurement, control, and data I/O connections are
for connection to Category I sources unless otherwise marked or described in the Manual.
Exercise extreme caution when a shock hazard is present. Lethal voltage may be present on cable connector jacks or test
fixtures. The American National Standards Institute (ANSI) states that a shock hazard exists when voltage levels greater than
30V RMS, 42.4V peak, or 60VDC are present. A good safety practice is to expect that hazardous voltage is present in any
unknown circuit before measuring.
Operators of this product must be protected from electric shock at all times. The responsible body must ensure that operators
are prevented access and/or insulated from every connection point. In some cases, connections must be exposed to potential
human contact. Product operators in these circumstances must be trained to protect themselves from the risk of electric shock.
If the circuit is capable of operating at or above 1000 volts, no conductive part of the circuit may be exposed.
Do not connect switching cards directly to unlimited power circuits. They are intended to be used with impedance limited sources.
NEVER connect switching cards directly to AC mains. When connecting sources to switching cards, install protective devices to
limit fault current and voltage to the card.
Before operating an instrument, make sure the line cord is connected to a properly grounded power receptacle. Inspect the
connecting cables, test leads, and jumpers for possible wear, cracks, or breaks before each use.
12/06
When installing equipment where access to the main power cord is restricted, such as rack mounting, a separate main input
power disconnect device must be provided, in close proximity to the equipment and within easy reach of the operator.
For maximum safety, do not touch the product, test cables, or any other instruments while power is applied to the circuit under
test. ALWAYS remove power from the entire test system and discharge any capacitors before: connecting or disconnecting
cables or jumpers, installing or removing switching cards, or making internal changes, such as installing or removing jumpers.
Do not touch any object that could provide a current path to the common side of the circuit under test or power line (earth) ground.
Always make measurements with dry hands while standing on a dry, insulated surface capable of withstanding the voltage being
measured.
The instrument and accessories must be used in accordance with its specifications and operating instructions or the safety of the
equipment may be impaired.
Do not exceed the maximum signal levels of the instruments and accessories, as defined in the specifications and operating
information, and as shown on the instrument or test fixture panels, or switching card.
When fuses are used in a product, replace with same type and rating for continued protection against fire hazard.
Chassis connections must only be used as shield connections for measuring circuits, NOT as safety earth ground connections.
If you are using a test fixture, keep the lid closed while power is applied to the device under test. Safe operation requires the use
of a lid interlock.
If a screw is present, connect it to safety earth ground using the wire recommended in the user documentation.
!
The symbol on an instrument indicates that the user should refer to the operating instructions located in the manual.
The symbol on an instrument shows that it can source or measure 1000 volts or more, including the combined effect of
normal and common mode voltages. Use standard safety precautions to avoid personal contact with these voltages.
The symbol on an instrument shows that the surface may be hot. Avoid personal contact to prevent burns.
The symbol indicates a connection terminal to the equipment frame.
The WARNING heading in a manual explains dangers that might result in personal injury or death. Always read the associated
information very carefully before performing the indicated procedure.
The CAUTION heading in a manual explains hazards that could damage the instrument. Such damage may invalidate the
warranty.
Instrumentation and accessories shall not be connected to humans.
Before performing any maintenance, disconnect the line cord and all test cables.
To maintain protection from electric shock and fire, replacement components in mains circuits, including the power transformer,
test leads, and input jacks, must be purchased from Keithley Instruments. Standard fuses, with applicable national safety
approvals, may be used if the rating and type are the same. Other components that are not safety related may be purchased
from other suppliers as long as they are equivalent to the original component. (Note that selected parts should be purchased only
through Keithley Instruments to maintain accuracy and functionality of the product.) If you are unsure about the applicability of a
replacement component, call a Keithley Instruments office for information.
To clean an instrument, use a damp cloth or mild, water based cleaner. Clean the exterior of the instrument only. Do not apply
cleaner directly to the instrument or allow liquids to enter or spill on the instrument. Products that consist of a circuit board with
no case or chassis (e.g., data acquisition board for installation into a computer) should never require cleaning if handled
according to instructions. If the board becomes contaminated and operation is affected, the board should be returned to the
factory for proper cleaning/servicing.
Section 1: IntroductionKPXI 48-Channel General Purpose Card User’s Manual
Introduction
The Model KPXI-DIO-48 is a general purpose, 48 channel digital input / output (DIO) product. The
KPXI-DIO-48 emulates two industry standard Programmable Peripheral Interface (PPI) chips
operated under mode zero configuration. The cards are compatible in hardware connections as
well as software programming.
Each PPI connector has 3 ports: PA, PB, and PC. The PC can also be subdivided into 2 nibblewide (4-bit) ports - PC Upper and PC Low. Each connector is corresponding to one PPI chip with
24 DIO points. The Model KPXI-DIO-48 is equipped with one 100-pin SCSI-type connector.
Features
Model KPXI-DIO-48 products provide the following advanced features:
Digital I/O ports
•48 TTL/DTL compatible digital I/O lines
•Emulates industry standard mode 0 of 8255 PPI
•Buffered circuits for higher driving
•Output status read-back
Timer/counter and interrupt system
•A 32 bit timer to generate watchdog timer interrupt
•A 16 bit event counter to generate event interrupt
•Programmable interrupt source
•Dual interrupt system
Miscellaneous
•On board fuses that can be reset protect the power supply from external devices
Applications
•Programmable mixed digital input & output
•Industrial monitoring and control
•Digital I/O control
•Contact closure, switch/keyboard monitoring
•Useful with A/D and D/A to implement a data acquisition & control system
Safety symbols and terms
The following symbols and terms may be found on the KPXI DIO series module or used in this
manual.
The symbol indicates that the user should refer to the operating instructions located in the
!
manual.
The symbol shows that high voltage may be present on the terminal(s). Use standard safety
precautions to avoid personal contact with these voltages.
The symbol on an instrument shows that the surface may be hot. Avoid personal contact to
prevent burns.
1-2Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
KPXI 48-Channel General Purpose Card User’s ManualSection 1: Introduction
The WARNING heading used in this manual explains dangers that might result in personal injury
or death. Always read the associated information very carefully before performing the indicated
procedure.
The CAUTION heading used in this manual explains hazards that could damage the unit. Such
damage may invalidate the warranty.
Specifications
Refer to the product data sheet for updated KPXI DIO card specifications. Check the Keithley
Instruments website at www.keithley.com for the latest updates to the specifications.
Unpacking and inspection
Inspection for damage
CAUTIONYour KPXI DIO series module contains electro-static sensitive components
that can be easily be damaged by static electricity.
Therefore, handle the card on a grounded anti-static mat. The operator should
be wearing an anti-static wristband, grounded at the same point as the
antistatic mat.
The KPXI General Purpose DIO series module was carefully inspected electrically and
mechanically before shipment.
Inspect the module carton for obvious damages. Shipping and handling may damage the module.
Make sure there are no shipping and handling damages on the module’s carton before continuing.
After opening the card module carton, extract the system module and place it only on a grounded
anti-static surface with component side up. Save the original packing carton for possible future
shipment.
Again, inspect the module for damages. Report any damage to the shipping agent immediately.
Shipment contents
The following items are included with every Model KPXI DIO series order:
•Model KPXI DIO series module
•CD containing required software and manuals
Instruction manual
A CD-ROM containing this User’s Manual and required software is included with each Model KPXI
General Purpose DIO series order. If a hardcopy of the Model KPXI-DIO Series User’s Manual is
required, you can order the Manual Package (Keithley Instruments Part Number Model KPXI-DIO900-01). The Manual Package includes an instruction manual and any pertinent addenda.
Always check the Keithley Instruments’ website at www.keithley.com for the latest revision of the
manual. The latest manual can be downloaded (in PDF format) from the website.
KPXI-DIO-900-01 Rev. A / January 2007Return to Section Topics1-3
Section 1: IntroductionKPXI 48-Channel General Purpose Card User’s Manual
Repacking for shipment
Should it become necessary to return the Model KPXI General Purpose DIO series module for
repair, carefully pack the unit in its original packing carton or the equivalent, and follow these
instructions:
•Call Keithley Instruments’ repair department at 1-888-KEITHLEY (1-888-534-8453) for a
Return Material Authorization (RMA) number.
•Let the repair department know the warranty status of the Model KPXI General Purpose
DIO series module.
•Write ATTENTION REPAIR DEPARTMENT and the RMA number on the shipping label.
•Complete and include the Service Form located at the back of this manual.
Supporting software
This section contains information on provided software. Keithley Instruments’ provides versatile
software drivers and packages for different systems. Keithley Instruments not only provides
programming libraries such as DLL’s for most Windows
software packages such as LabVIEW.
All software options are included in the Keithley Instruments’ CD.
1
®
based systems, but also drivers for other
Programming library KDIO-DRVR
KDIO-DRVR includes device drivers and DLL’s for Windows XP® and Windows 2000®. Therefore,
all applications developed with KDAQ-DRVR are compatible on Windows XP/2000. The
developing environment can be VB, VC++, BC5, or any Windows programming language that
allows calls to a DLL. Documentation includes a User's Guide (refer to
User’s Guide), and a Function Reference (refer to Appendix B: KDIO-DRVR Function Reference).
KDAQ-LVIEW LabVIEW® driver
KDAQ-LVIEW contains the VI’s, which are used to interface with National Instrument's Lab-VIEW®
software package. The KDAQ-LVIEW supports Windows XP/2000. The LabVIEW
shipped free with the board — you can install and use them without a license. Documentation
includes an Interface Guide (refer to
and an interface Function Reference (refer to Appendix D: KIDAQ®-LabVIEW Compatible
Section 2: InstallationKPXI 48-Channel General Purpose Card User’s Manual
Introduction
This section contains information about handling and installing Keithley Instruments’ KPXI series
cards:
•Handling precautions
•PXI configuration
•Installation
•Jumper description
•Termination boards connection
•PCB layout
Handling precautions
CAUTIONUse care when handling the KIDAQ
When handling, make sure to observe the following guidelines:
•Only handle the card on a grounded anti-static mat.
•Wear an an anti-static wristband that is grounded at the same point as the anti-static mat.
PXI configuration
Plug and play
As a plug and play component, the board requests an interrupt number via its cPCI controller. The
system BIOS responds with an interrupt assignment based on the board information and system
parameters. These system parameters are determined by the installed drivers and the hardware
load recognized by the system. If this is the first time a KIDAQ
on your Windows
detailed information.
Configuration
Configuration is done on a board-by-board basis for all PCI boards on your system. Configuration
is controlled by the system and software. There is no jumper setting required (or available) for
base address, DMA, and interrupt IRQ.
®
KPXI series cards. KIDAQ® KPXI series
cards contain electro-static sensitive components that can be easily damaged
by static electricity.
®
®
system, a hardware driver needs to be installed. Refer to Installation for
KPXI series card will be installed
The configuration is not static, but is subject to change with every boot of the system as new
boards are added or removed.
Troubleshooting
If your system doesn't boot or if you experience erratic operation with your PCI board in place, it's
likely caused by an interrupt conflict (perhaps the BIOS Setup is incorrectly configured). In
general, the solution, is to consult the BIOS documentation that came with your system.
2-2Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
KPXI 48-Channel General Purpose Card User’s ManualSection 2: Installation
Installation
Step 1. Install driver software
Windows® will find the new module automatically. If this is the first time a KPXI series digital I/O
card has been installed, a hardware driver needs to be installed. Use the following installation
procedure as a guide.
NOTEKeithley Instruments controllers are pre-loaded with the necessary drivers.
For Windows XP/2000:
1.Insert the CD shipped with the module. The CD should auto load. From the base menu
install the KDIO-DRVR. This is the hardware driver that recognizes the KPXI series
modules. If the CD does not auto load run, then under x:\KDIO-DRVR\DISK1\, you will find
SETUP.EXE (x is the drive letter of your CDROM). This will run the CD menu. On the CD
menu, click the driver for your model to install.
2.When you complete driver installation, turn off the system.
Step 2. Inspect module
Keeping the “Handling precautions” information in mind, inspect the module for damage. With the
module placed on a firm flat surface, press down on all socketed IC's to make sure that they are
properly seated.
If the module does not pass the inspection, do not proceed with the installation.
CAUTIONDo not apply power to the card if it has been damaged.
The card is now ready for installation.
Step 3. Install module
Remove power from the system and install the KPXI card in an available slot.
The PXI connectors are rigid and require careful handling when inserted and removed. Improper
handling of modules can easily damage the backplane.
To insert the module into a PXI chassis, use the following procedure as a guide:
1.Read through this manual and setup required jumpers (as needed). Refer to Jumper
description for additional information.
2.Turn off the system.
3.Align the module's edge with the card guide in the PXI chassis.
4.Slide the module into the chassis until resistance is felt from the PXI connector.
5.Push the ejector upwards and fully insert the module into the chassis. Once inserted, a
"click" can be heard from the ejector latch.
6.Tighten the screw on the front panel.
7.Turn on the system.
To remove a module from a PXI chassis, use the following procedure as a guide:
1.Turn off the system.
2.Loosen the screw on the front panel.
3.Push the ejector downwards and carefully remove the module from the chassis.
KPXI-DIO-900-01 Rev. A / January 2007Return to Section Topics2-3
Section 2: InstallationKPXI 48-Channel General Purpose Card User’s Manual
Figure 2-1
Typical PXI module installation
Typical PXI
chassis
Card guide
Front panel
screw
Modules edge
Ejector latch
Step 4. Verify installation
When the system is turned on for the first time with a new module present (or a module in a new
slot), Windows Add New Hardware Wizard attempts to locate the correct driver. If it cannot find
the correct driver, even after you have loaded the driver above in Step 1, then force the Add New Hardware Wizard to look in Windows system32 directory. The driver files should be in this
location. If they are not, shutdown the system, remove the module, and restart the installation
process.
When the Add New Hardware Wizard finishes, the window will verify whether or not installation
was successful. To confirm if the module is installed correctly at a later time, use Windows Device Manager. In the Device Manager under KIDAQ Boards, look for a device name matching the
model number of the newly installed board (see
installation is complete. If the board appears with a exclamation point or warning in Device
Manager, the installation was unsuccessful. If unsuccessful, use Device Manager to update the
2-4Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
Figure 2-2 for an example). If it is found,
KPXI 48-Channel General Purpose Card User’s ManualSection 2: Installation
driver or un-install the module, power down the system, remove the module, and attempt
installation again from Step 1.
Figure 2-2
Device manager (successful installation)
Jumper description
Model KPXI-DIO-48 DIO cards are plug-and-play, which makes it unnecessary to setup the card
configurations to fit the computer system. However, to fit users’ versatile operation environment,
there are still a few jumpers to set the power-on status of ports and the usage of the +12V output
pin.
Power on Status of Ports
For every port on a Model KPXI-DIO-48 card, the power-on status is set as input, therefore, the
voltage could be pulled high, pulled low, or floating. It is dependent on the jumper setting.
Table 2-1 lists jumper reference numbers and corresponding port names.
Table 2-1
Jumpers and Port names list
JumperPort Name
JA1P1A (Port A of PPI1)
JB1P1B (Port B of PPI1)
JC1P1C (Port C of PPI1)
JA2P2A (Port A of PPI2)
JB2P2B (Port B of PPI2)
JC2P2C (Port C of PPI2)
KPXI-DIO-900-01 Rev. A / January 2007Return to Section Topics2-5
Section 2: InstallationKPXI 48-Channel General Purpose Card User’s Manual
The physical meaning of all the jumpers are identical. The power on status of each port can be set
independently. The default is to pull all signals high. The following diagram use JA1 as an
example to show the possible configurations.
Table 2-2
JA1 jumper setting
Port A (PPI1 connector)JA1
Power-on pulled high12
Power-on pulled low12
Power-on floating*12
*Jumper is removed
12V Power Supply Configuration
Pin 50 on connector CN1 can be configured as a 12V power supply or ground (refer to Connector
pin assignment contained in Section 3 for detalied connector information). Refer to Table 2-3 for
the 12 volts power supply position. JP1 sets the pin to be 12V or ground. Connections with ground
are set as default. The following diagram shows the setting of JP1, connecting pin 50 to 12 volts.
Table 2-3
JP1 12V Power Supply Configuration
JP1 through JP2
(12V)12 (Ground)
Termination boards connection
There are two termination boards that can connect with Model KPXI-DIO-48 for I/O expansion:
Model KPXI-32-DIO-TB
Model KPXI-32-DIO-TB is equipped with a 50-pin ribbon connector. They are used for
general-purpose applications. Two of these can be used together along with a KPXI-DIO-CAB2 to
connect with the KPXI-DIO-48.
Model KPXI-DIO-TB
Model KPXI-DIO-TB is equipped with 100-pin SCSI-type connector. It can connect with the
Model KPXI-DIO-48 via the KPXI-DIO-CAB cable.
2-6Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
KPXI 48-Channel General Purpose Card User’s ManualSection 2: Installation
PCB layout
Model KPXI-DIO-48 PCB layout
Figure 2-3
Model KPXI-DIO-48 PCB Layout
PPI2
JC2 JB2
JA2
PCI
Controller
Chip
JA1 JB1 JC1
PPI1
KPXI-DIO-900-01 Rev. A / January 2007Return to Section Topics2-7
Section 2: InstallationKPXI 48-Channel General Purpose Card User’s Manual
This page left blank intentionally.
2-8Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
In this section:
Top icPa ge
Digital I/O ports................................................................................... 3-2
Pin assignment of Model KPXI-DIO-48 ............................................ 3-7
Section 3: Operation and ConnectionKPXI 48-Channel General Purpose Card User’s Manual
Digital I/O ports
Introduction
Model KPXI-DIO-48 can emulate one/two/four mode 0 configuration of 8255 programmable
peripheral interface (PPI) chips. There are 24 DIO signals for every PPI.
8255 Mode 0
The basic functions of 8255 mode 0 are:
•Two 8-bit I/O ports−−port A (PA) and port B (PB)
•Two nibble-wide (4-bit) ports C−−PC upper and PC lower
•Each port can be used as either input or output
•Outputs are latched whereas inputs are buffered
•16 different input/output configurations are available
Special function of the DIO signals
Two I/O signals (PC0 and PC3) of PPI1 and PPI2 can be used to generate hardware interrupt.
Refer to
can be used as an input signal of an event counter.
Interrupt multiplexing for details about the interrupt control. In addition, the P1C4 signals
Digital I/O port programming
Users can write the digital output value to or read back the digital signal level from the PPI ports by
using the software library. Here we define the port name in Table 4.1. These port names are used
both in software library and all through this manual.
Table 3-1
I/O Port Names
Connector
NumberPPI1PPI2
P1AP2A
Port
Name
There are four ports on every 8255 PPI, including port A,B,C and the control port. PA, PB and PC
could be written or read but the control port is write only.
P1BP2B
P1CP2C
P1CTRLP2CTRL
Control word
The control word written in the control port is used to setup PA, PB and PC as input or output port.
Figure 3-1 shows the format of the control word. Table 3-2 shows the 16 possible control words
and the respective I/O configurations .
3-2Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
KPXI 48-Channel General Purpose Card User’s ManualSection 3: Operation and Connection
The default configuration after power on, hardware reset or software reset sets all ports as input
ports, therefore the users don’t have to worry about damaging the external devices when system
is power on. In addition, the default signal level can be pulled high or pulled low by setting the
jumpers. Refer to
KPXI-DIO-900-01 Rev. A / January 2007Return to Section Topics3-3
Jumper description for setting the power on status of the DIO ports.
Section 3: Operation and ConnectionKPXI 48-Channel General Purpose Card User’s Manual
Output data concern
CAUTIONBe careful of the initial condition of digital output signals. If users set the con-
trol word as output port after power on, the previous uncertain output value
will be put on the output pins immediately. Therefore, BE SURE TO WRITE A
SAFE VALUE TO THE PORTS BEFORE CONFIGURING THEM AS OUTPUT
PORTS.
Timer/counter operation
Introduction
One 8254 programmable timer/counter chip is installed Model KPXI-DIO-48. There are three
counters in one 8254 chip and 6 possible operation modes for each counter. The block diagram of
the timer /counter system is shown in
Figure 3-2
Timer/counter system of Model KPXI-DIO-48
Figure 3-2.
P1C4
Trigger
Edge
Control
2 MHz Clock
The timer #1 and timer #2 of the 8254 chip are cascaded as a 32-bit programmable timer. In
software library, the timer #1 and #2 are always set as mode 2 (rate generator).
In software library, the counter #0 is used as an event counter, that is, interrupt on terminal count of
8254 mode 0.
General purpose timer/counter
The counter 0 is a general purpose timer/counter for users applications. It can be used as an event
counter, or used for measuring frequency, or other functions. The following modes are provided by
the 82C54 chip.
'H'
'H'
'H'
8254 Chip
C
Counter #0
G
C
Timer #1
G
C
Timer #2
G
Event IRQ
O
O
Timer IRQ
O
•Mode 0: Interrupt on Terminal Count
•Mode 1: Programmable One-Shot.
•Mode 2: Rate Generator.
•Mode 3: Square Wave Rate Generator.
•Mode 4: Software Triggered Strobe.
•Mode 5: Hardware Triggered Strobe.
3-4Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
KPXI 48-Channel General Purpose Card User’s ManualSection 3: Operation and Connection
The 8254 timer/ counter IC occupies 4 I/O address.
Cascaded 32 Bits Timer
The input clock frequency of the cascaded timers is 2MHz. The output of the timer is send to the
interrupt circuit (refer to
timer interrupt frequency is (2MHz)/(2*2)=500KHz and (2MHz)/(65535*65535)= 0.000466Hz
respectively.
Interrupt multiplexing). Therefore, the maximum and minimum watchdog
Event counter and edge control
The counter #0 of the 8254 chip can be used as an event counter. The input of counter #0 is PC4
of PPI1 (P1C4). The counter clock trigger direction (H to L or L to H) is programmable. The gate
control is always enabled. The output is sent to the interrupt system which is named as event IRQ.
If counter #0 is set as 8254 mode 0, the event counter IRQ will trigger when the counter value is
counting down to zero.
Interrupt multiplexing
Architecture
Model KPXI-DIO-48 has a powerful and flexible interrupt multiplexing circuit which is suitable for
many applications. The board can accept
generate two interrupt request signals at the same time and the software can service these two
request signals by ISR. Note that the dual interrupts do not mean that the card occupies two IRQ
levels.
The two interrupt request signals (INT1 and INT2) comes from digital input signals or the timer/
counter output. An interrupt source multiplexer (MUX) is used to select the IRQ sources.
Figure 3-3 shows the interrupt system.
IRQ level setting
There is only one IRQ level requested by this card, although it is a dual interrupt system. The
mother board circuits will transfer INTA# to one of the PC IRQ levels. The IRQ level is set by the
PCI plug and play BIOS and saved in the PCI controller. Users can get the IRQ level setting by
software library.
Figure 3-3
Dual Interrupt System Model KPXI-DIO-48
Dual Interrupts, which means the hardware can
KPXI-DIO-900-01 Rev. A / January 2007Return to Section Topics3-5
Section 3: Operation and ConnectionKPXI 48-Channel General Purpose Card User’s Manual
Dual interrupts concerns
The PCI controller of Model KPXI-DIO-48 can receive two hardware IRQ sources. However, a PCI
controller can generate only one IRQ to PCI bus, the two IRQ sources must be distinguished by
ISR of the application software if the two IRQs are both used.
The application software can use a function to distinguish which interrupt is inserted. After an ISR
is completed, users must check if another IRQ is also asserted, then clear the current IRQ to allow
the next IRQ coming in.
The two IRQs are named as INT1 and INT2. In Model KPXI-DIO-48, INT1 comes from P1C0,
P1C3 or the event counter interrupt. INT2 comes from P2C0, P2C3 or the timer interrupt. The
sources of INT1 and INT2 is selectable by the Interrupt Source Control (ISC) Register.
Interrupt source control
In the ISC register (offset 0x20), there are four bits to control the IRQ sources of INT1 and INT2.
If the application needs only one IRQ, you can disable one of the IRQ sources by software. If your
application does not need any IRQ source, you can disable both interrupts. However, the PCI
BIOS will still assign an IRQ level to the PCI card and occupy the PC resource if you only disable
the IRQ sources without changing the initial condition of the PCI controller.
It is not recommended to change the initial condition of the PCI card by users‘ own application
software.
Table 3-3 shows the register format of the ISC (address offset 0x20). This register is write only.
The 4 LSBs are used to control the source of INT1 and INT2.
Mode 1XX01~P1C0falling edge of P1C0
Mode 2XX10P1C0 OR ~P1C3 (see following)
Mode 3XX11Event CounterCounter count down to 0
2Disable00XXINT2 disable--
Mode 101XX~P2C0falling edge of P2C0
Mode 210XXP2C0 OR ~P2C3 (see following)
Mode 311XXTimer OutputTimer count down to 0
Then the IRQ sources is set as “P1C0 OR ~P1C3”, the IRQ trigger conditions are summarized in
Table 3-4.
Table 3-4
IRQ Trigger conditions
P1/2C0P1/2C3 IRQ Trigger Condition
HighXPC0=‘H’ disable all IRQ
XLowPC3=‘L’ disable all IRQ
Low 1->0PC3 falling edge trigger when PC0=L
0->1HighPC0 rising edge trigger when PC3=H
Because the P1/P2C0 and P1/P2C3 are external signals, the users can utilize the combination of
the four signals to generate a proper IRQ.
3-6Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
KPXI 48-Channel General Purpose Card User’s ManualSection 3: Operation and Connection
12V and 5V power supply
The maximum current for 5 volts on every connector is 0.5 A. If the load current is larger than 0.5
A, the resistance of re-settable fuses will increase because of rising temperature. The rising
resistance will cause the power supply drop and reduce current. If the overload or short condition
is removed, the fuse will get to normal condition. It is not necessary to repair or re-install the fuse.
The maximum current of 12 volts for all the four connectors is also 0.5 A. The action of the fuse is
the same as which used for +5V power. The limitation is more restrictive than 5V power supply
because the PXI bus can not provide large current.
Connector pin assignment
Pin assignment of Model KPXI-DIO-48
The Model KPXI-DIO-48 is equipped a SCSI-type 100-pin connector. The pin assignment is
described in
Section 4: RegistersKPXI 48-Channel General Purpose Card User’s Manual
Introduction
This section describes the details of the registers and its structure. This information is important
for programmers who want to control the hardware with low-level programming
However, we suggest users become familiar with the PCI interface before starting low-level
programming. In addition, the contents of this section can help users understand how to use
software driver to manipulate this card.
NOTEDirect register access can be difficult to program. All users are encouraged to use the
KDIO-DRVR driver interface instead of direct access to the registers. This section is
included only as a reference for customers who absolutely require the efficiency of
register access.
PCI PnP registers
This PCI card functions as a 32-bit PCI target device to any master on the PCI bus. There are
three types of registers: PCI Configuration Registers (PCR), Local Configuration Registers (LCR)
and registers.
The PCR, which is PCI-bus specifications compliant, is initialized and controlled by the plug & play
(PnP) PCI BIOS. Users may obtain more information on the PCI BIOS specification to better
understand the operation of the PCR. Please contact PCISIG to acquire the specifications of the
PCI interface.
The PCI bus controller PCI-9050 is provided by PLX technology Inc. (www.plxtech.com). For
more information about the LCR, please visit PLX technology’s web site to download relative
information. It is not necessary for users to fully understand the details of the LCR if the software
library provided is used. The PCI PnP BIOS assigns the base address of the LCR. The assigned
address is located at an offset of 14h from the PCR.
Please do not try to modify the base address and interrupt which assigned by the PCI PnP BIOS,
it may cause resource confliction in your system.
I/O address map
All Model KPXI-DIO-48 registers are 8 bits. The users can access these registers only by 8 bits I/
O instructions.
addresses relative to the base address. Please refer to the Section 3 for detailed register
operation.
Table 4-1
Model KPXI-DIO-48 I/O Address Map
OffsetWriteRead
0x00P1AP1A
0x01P1BP1B
0x02P1CP1C
0x03P1CtrlNot used
0x04P2AP2A
0x05P2BP2B
0x06P2CP2C
0x07P2CtrlNot used
0x10Timer/Counter #0Timer/Counter #0
0x11Timer/Counter #1Timer/Counter #1
0x12Timer/Counter #2Timer/Counter #2
Table 4-1 shows the registers map, including descriptions and their offset
4-2Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
KPXI 48-Channel General Purpose Card User’s ManualSection 4: Registers
Table 4-1 (continued)
Model KPXI-DIO-48 I/O Address Map
OffsetWriteRead
0x13Timer/Counter
Mode Control
0x20ISC: Interrupt
Source Control
0x30Clear InterruptNot used
Timer/Counter
Mode Status
Not used
KPXI-DIO-900-01 Rev. A / January 2007Return to Section Topics4-3
Section 4: RegistersKPXI 48-Channel General Purpose Card User’s Manual
This page left blank intentionally.
4-4Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
In this appendix:
Top icPage
Introduction to KDIO-DRVR ............................................................ A-2
About the KDIO-DRVR software.......................................................A-2
KDIO-DRVR is a software development kit for Keithley Instruments PXI digital I/O modules. It
contains a high performance data acquisition driver for developing custom applications under
Windows XP or Windows 2000
The memory and data buffer management capabilities free developers from dealing with complex
low-level command issues. That is, KDIO-DRVR is constructed to provide a simple programming
interface in communication with the Keithley PXI digital I/O modules. The easy-to-use functions
provided by KDIO-DRVR allow a programmer to use the features of the module in a high level
way.
1
environments.
Using KDIO-DRVR also allows you to take advantage of the power and features of Microsoft
Win32s
extended memory. Also, using KDIO-DRVR under in the Microsoft Visual Basic
makes it easy to create custom user interfaces and graphics.
In addition to the software drivers, some sample programs are provided for your reference to
demonstrate use of the driver and decrease development time.
®
for your data acquisition applications, including running multiple applications and using
KDIO-DRVR hardware support
Keithley will periodically upgrade KDIO-DRVR for new Keithley PXI digital I/O modules. Please
refer to Release Notes for the modules that the current KDIO-DRVR actually supports. The
following modules are currently supported by the KDIO-DRVR driver:
•KPXI-DIO-16-16: 16-channel isolated digital I/O module
•KPXI-DIO-48: 48-bit digital I/O module
•KPXI-RDI-8-16: 8 relay output and 16 isolated input module
•KPXI-DIO-32-80M: 80 Mbytes/second Ultra-high speed 32 channels digital I/O module with
bus mastering DMA transfer supporting scatter gather technology
•KPXI-DIO-32-32: 32 isolated channels DI & 32 isolated channels DO module
•KPXI-DIO-64-0: 64 isolated channels DI module
•KPXI-DIO-0-64: 64 isolated channels DO module
KDIO-DRVR language support
®
environment
KDIO-DRVR is a DLL (Dynamic-Link Library) version for using under Windows XP/2000. It can
work with any Windows programming language that allows calls to a DLL, such as Microsoft
Visual C/Visual C++
above), etc.
1. Windows XP, Windows 2000, Microsoft Win32s, Visual C/Visual C++, and Visual Basic are trademarks of
Microsoft Corporation.
the
2. Borland is a trademark of the Borland Software Corporation.
A-2Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
®
(5.0 or above), Borland® C++ (5.0 or above)2, or Visual Basic® (4.0 or
NOTEBased on the configuration of an individual module, some of the function groups will not
apply to a particular module.
This section describes the classes of functions in KDIO-DRVR and briefly describes each function.
KDIO-DRVR functions are grouped to the following classes:
•General Configuration Function Group
•Actual Sampling Rate Function Group
•Analog Output Function Group
•Digital Input Function Group
– Digital Input Configuration functions
– One-Shot Digital Input functions
– Continuous Digital Input functions
– Asynchronous Digital Input Monitoring functions
•Digital Output Function Group
– Digital Output Configuration functions
– One-Shot Digital Output functions
– Continuous Digital Output functions
– Asynchronous Digital Output Monitoring functions
•Timer/Counter Function Group
•DIO Function Group
– Digital Input/Output Configuration function
– Dual-Interrupt System Setting function
General configuration function group
Use these functions to initialize and configure the data acquisition card.
KDIO_Register_Card
Initializes the hardware and software states of a KIDAQ PCI-bus data acquisition card.
Register_Card must be called before any other KDIO-DRVR library functions can be called for that
card.
KDIO_Release_Card
Tells KDIO-DRVR library that this registered card is not used currently and can be released. This
would make room for a new card to be registered.
KDIO_GetCardType
Gets the card type of the device with a specified card index.
KDIO_GetCardIndexFromID
Gets the card type and the sequence number of the device with a specified card id.
KDIO_GetBaseAddr
Gets the I/O base addresses of the device with a specified card index.
KPXI-DIO-900-01 Rev. A / January 2007Return to Section TopicsA-3
Gets the LCR base address (defined by the PCI controller on board) of the device with a specified
card index.
Actual sampling rate function group
KDIO_GetActualRate
Returns the actual sampling rate the device will perform for the defined sampling rate value.
Analog output function group
One-shot analog output functions
KDIO_AO_WriteChannel
Writes a binary value to the specified analog output channel.
KDIO_AO_VWriteChannel
Accepts a voltage value, scales it to the proper binary value and writes a binary value to the
specified analog output channel.
KDIO_AO_VoltScale
Scales a voltage to a binary value.
Digital input function group
Digital input configuration functions
KDIO_DI_DIO32M80_Config
Informs KDIO-DRVR library of the trigger source and trigger properties selected for the digital input
operation of the KPXI-DIO-32-80M. You must call this function before calling the function to
perform continuous digital input operation of the KPXI-DIO-32-80M. This function is used only with
Model KPXI-DIO-32-80M.
KDIO_DI_InitialMemoryAllocated
Gets the actual size of digital input DMA memory that is available in the device driver.
One-Shot Digital Input Functions
KDIO_DI_ReadLine
Reads the digital logic state of the specified digital line in the specified port.
KDIO_DI_ReadPort
Reads digital data from the specified digital input port.
A-4Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
Performs continuous digital input on the specified digital input port at a rate as close as possible to
the rate you specified.
KDIO_DI_ContReadPortToFile
Performs continuous digital input on the specified digital input port at a rate as close as possible to
the rate you specified and saves the acquired data in a disk file.
KDIO_DI_ContStatus
Checks the current status of the continuous digital input operation.
KDIO_DI_EventCallBack
Controls and notifies the user’s application when a specified DAQ event occurs. The notification is
performed through a user-specified callback function.
KDIO_DI_ContMultiBufferSetup
Set up the buffer for multi-buffered continuous digital input.
KDIO_DI_ContMultiBufferStart
Starts the multi-buffered continuous digital input on the specified digital input port at a rate as close
as possible to the rate you specified.
Asynchronous digital input monitoring functions
KDIO_DI_AsyncCheck
Checks the current status of the asynchronous digital input operation.
KDIO_DI_AsyncClear
Stops the asynchronous digital input operation.
KDIO_DI_AsyncDblBufferTransfer
Copies half of the data of circular buffer to user buffer. You can execute this function repeatedly to
return sequential half buffers of the data.
KDIO_DI_AsyncMultiBufferNextReady
Checks whether the next buffer of data in circular buffer is ready for transfer during an
asynchronous multi-buffered digital input operation.
KDIO_DI_AsyncDblBufferOverrun
Checks or clears overrun status of the double-buffered digital input operation.
KPXI-DIO-900-01 Rev. A / January 2007Return to Section TopicsA-5
Informs KDIO-DRVR library of the trigger source and trigger properties selected for the digital
output operation of the KPXI-DIO-32-80M. You must call this function before calling the function to
perform continuous digital output operation of the KPXI-DIO-32-80M. This function is used only
with Model KPXI-DIO-32-80M.
KDIO_DO_InitialMemoryAllocated
Gets the actual size of digital output DMA memory that is available in the device driver.
One-Shot Digital Output Functions
KDIO_DO_WriteLine
Sets the specified digital output line in the specified digital output port to the specified state. This
function is only available for those cards that support digital output read-back functionality.
KDIO_DO_WritePort
Writes digital data to the specified digital output port.
KDIO_DO_ReadLine
Reads the specified digital output line in the specified digital output port.
KDIO_DO_ReadPort
Reads digital data from the specified digital output port.
Continuous digital output functions
KDIO_DO_ContWritePort
Performs continuous digital output on the specified digital output port at a rate as close as possible
to the rate you specified.
KDIO_DO_ContStatus
Checks the current status of the continuous digital output operation.
KDIO_DO_EventCallBack
Controls and notifies the user’s application when a specified DAQ event occurs. The notification is
performed through a user-specified callback function.
KDIO_DO_PGStart
Performs pattern generation operation.
KDIO_DO_PGStop
Stops pattern generation operation.
A-6Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
This function is only used by the Digital I/O cards whose I/O port can be set as input port or output
port. This function informs KDIO-DRVR library of the port direction selected for the digital input/
output operation. You must call this function before calling functions to perform digital input/output
operation.
Dual-interrupt system setting functions
KDIO_SetDualInterrupt
Controls two interrupt sources of Dual Interrupt system.
KDIO_INT_EventMessage
Controls and notifies the user’s application when an interrupt event occurs. The notification is
performed through a user-specified callback function or the Windows PostMessage API.
KDIO_INT1_EventMessage
Controls the interrupt sources of INT1 of Dual Interrupt system and notifies the user’s application
when an interrupt event occurs. The notification is performed through a user-specified callback
function or the Windows PostMessage API.
KDIO_INT2_EventMessage
Controls the interrupt sources of INT2 of Dual Interrupt system and notifies the user’s application
when an interrupt event occurs. The notification is performed through a user-specified callback
function or the Windows PostMessage API.
Local interrupt setting functions
KDIO_DIO32M80_SetInterrupt
Controls the interrupt sources (AUXDI and Timer2) of local Interrupt system of KPXI-DIO-32-80M.
This function is used only with Model KPXI-DIO-32-80M.
KDIO_AUXDI_EventMessage
Controls AUXDI Interrupt and notifies the user’s application when an interrupt event occurs. The
notification is performed through a user-specified callback function or the Windows PostMessage
API.
KDIO_T2_EventMessage
Controls Timer2 Interrupt and notifies the user’s application when an interrupt event occurs. The
notification is performed through a user-specified callback function or the Windows PostMessage
API.
A-8Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
Contiguous memory allocation in driver for continuous operation
The continuous data transfer functions in KDIO-DRVR input or output blocks of data to or from a
Keithley Instruments PXI digital I/O device. To avoid the data transfer performance reduction
caused by memory fragmentation, KDIO-DRVR allocates physically contiguous buffers in device
driver when the system boots.
KDIO-DRVR provides a utility, configdrv to set/modify the sizes of contiguous memory allocated
in driver for continuous analog input, analog output, digital input, digital output. Device driver will
try to allocate these sizes of memory. The size of initially allocated memory is the maximum
memory size that continuous data transfer can be performed. Please refer to the section,
KDIO-DRVR configuration utility (configdrv), for the description of this utility.
KDIO-DRVR inputs or outputs blocks of data stored in the driver buffer to or from a Keithley PXI
device. For input operations, the specified count of data are transferred to the driver buffer and
KDIO-DRVR copies the data from the driver buffer (kernel level) to a user buffer (user level). For
output operations, KDIO-DRVR copies the data from a user buffer (driver level) to the driver buffer
(kernel level) and transfers outgoing data from the driver buffer to the Keithley PXI device.
However, if only polling I/O is performed, the initially allocated memory is not needed and you can
use the utility,
KDIO-DRVR configuration utility (configdrv) to set the buffer size to be 0.
Fundamentals of building Windows XP/2000 Application
The following paragraphs outline how to create Windows1 XP/2000 KDAQ-DRVR projects using
Microsoft Visual Basic® (Version 6.0), Microsoft Visual Basic.NET, and Microsoft Visual C/C++®.
Microsoft® Visual Basic (Version 6.0)
To create a Windows XP/2000® Keithley KDIO-DRVR application using the API and Microsoft
Visual Basic, follow these steps:
Step 1: Enter Visual Basic and open or create a project to use KDIO-DRVR
To create a new project, select New Project from the File menu.
To use an existing project:
1.Open the file by selecting Open Project from the File menu. The Open Project dialog box
appears (Figure A-1).
1. Windows XP, Windows 2000, Microsoft Visual Basic.NET, Microsoft Visual C/Visual C++, and Microsoft
Visual Basic
KPXI-DIO-900-01 Rev. A / January 2007Return to Section TopicsA-9
2.Load the project by finding and double-clicking the project file name in the applicable
directory.
Step 2: Include function declarations and constants file (kdiodrvr.bas)
If it is not already included in the project, add the kdiodrvr.bas file as a module to your project. All
function declarations and constants are contained in this file. These function declarations and
constants are used to develop data acquisition applications.
Step 3: Design the application interface
Add elements, such as a command button, list box, or text box, etc., on the Visual Basic form used
to design the interface. These elements are standard controls from the Visual Basic Toolbox. To
place a needed control on the form:
1.Select the needed control from the Toolbox.
2.Draw the control on the form. Alternatively, to place the default-sized control on the form,
click the form. Use the
Select Objects tool to reposition or resize controls.
Step 4: Set control properties
Set control properties from the properties list. To view the properties list, select the desired control
and do one of the following:
•Press F4
•Select the Properties command in the View menu
or
•Click the Properties button on the Toolbar.
Step 5: Write the event codes
The event codes define the action desired when an event occurs. To write the event codes:
1.Double-click the control or form needing event code (the code module will appear).
2.Add new code as needed. All functions that are declared in
perform data acquisition operations (refer to tables contained later in this manual).
A-10Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
The programming schemes for digital input/output are described individually in the following
sections.
Digital input programming hints
KDIO-DRVR provides two kinds of digital input operation ⎯ non-buffered single-point digital input
operation and buffered continuous digital input operation.
The non-buffered single-point DI uses software polling method to read data from the device.
The programming scheme for this kind of DI operation is described in
programming.
The buffered continuous DI uses DMA transfer method to transfer data from device to user’s
buffer. The maximum number of count in one transfer depends on the size of initially allocated
memory for digital input in the driver. We recommend the applications use the
KDIO_DI_InitialMemoryAllocated function to get the size of initially allocated memory before
performing continuous DI operation.
The buffered continuous analog input includes synchronous continuous DI, non-double-buffered
asynchronous continuous DI and double-buffered asynchronous continuous DI. They are
described in
asynchronous continuous digital input programming, and Multiple-buffered asynchronous
continuous digital input programming. About the special consideration and performance issues for
the buffered continuous digital input, refer to the section titled Continuous data transfer in KDIO-
DRVR for details.
Synchronous continuous digital input programming, Non-multiple-buffered
One-shot digital input
A-12Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
This section describes the function flow typical of non-buffered single-point digital input readings.
While performing one-shot DI operation, the devices whose I/O port can be set as input or out put
port need to include port configuration function at the beginning of your application.
NOTEThe following example uses a KPXI-DIO-48. Other DIO modules are similar (exceptions
This section describes the function flow typical of synchronous digital input operation. While
performing continuous DI operation, the DI configuration function has to be called at the beginning
of your application. In addition, for synchronous DI, the
functions has to be set as
SYNCH_OP.
NOTEThe following example uses a KPXI-DIO-32-80M. Other DIO modules are similar with the
exception being that some modules do not require the _Config function call (specifically,
if the module’s ports are dedicated as inputs or outputs only).
Non-multiple-buffered asynchronous continuous digital input programming
This section describes the function flow typical of non-double-buffered asynchronous digital input
operation. While performing continuous DI operation, the DI configuration function has to be called
at the beginning of your application. In addition, for asynchronous DI operation, the
argument in continuous DI functions has to be set as
ASYNCH_OP.
SyncMode
A-14Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
NOTEThe following example uses a KPXI-DIO-32-80M. Other DIO modules are similar with the
exception being that some modules do not require the _Config function call (specifically,
if the module’s ports are dedicated as inputs or outputs only).
Figure A-5
Non-multiple-buffered asynchronous continuous digital input
do {
KDIO_DI_AsyncCheck(card, &bStopped, &count);
} while (!bStopped);
KDIO_DI_AsyncClear(card, &count);
…
KDIO_Release_Card(card);
Multiple-buffered asynchronous continuous digital input programming
This section describes the function flow typical of multi-buffered asynchronous digital input
operation. While performing continuous DI operation, the DI configuration function has to be called
at the beginning of your application. For asynchronous DI, the SyncMode argument in continuous
DI functions has to be set as
ASYNCH_OP.
NOTEThe following example uses a KPXI-DIO-32-80M. Other DIO modules are similar with the
exception being that some modules do not require the _Config function call (specifically,
if the module’s ports are dedicated as inputs or outputs only).
KPXI-DIO-900-01 Rev. A / January 2007Return to Section TopicsA-15
do {
KDIO_DI_AsyncMultiBufferNextReady(card, &HalfReady, &viewidx);
} while (!HalfReady);
//Handling the ready data
} while (!clear_op);
KDIO_DI_AsyncClear(card, &count);
…
KDIO_Release_Card(card);
A-16Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
KDIO-DRVR provides three kinds of digital output operation ⎯ non-buffered single-point digital
output operation, buffered continuous digital output operation and pattern generation.
The non-buffered single-point DO uses software polling method to write data to the device. The
programming scheme for this kind of DO operation is described in
programming scheme.
The buffered continuous DO uses DMA transfer method to transfer data from user’s buffer to
device. The maximum number of count in one transfer depends on the size of initially allocated
memory for digital output in the driver. We recommend the applications use
KDIO_DO_InitialMemoryAllocated function to get the size of initially allocated memory before
start performing continuous DO operation.
The buffered continuous digital output includes synchronous continuous DO and asynchronous
continuous DO. They are described in
Synchronous continuous digital output programming and
Asynchronous continuous digital output programming individually. About the special consideration
and performance issues for the buffered continuous digital output, refer to the section titled
Continuous data transfer in KDIO-DRVR for details.
The Pattern Generation DO outputs digital data patterns repeatedly at a predetermined rate. The
programming scheme for this kind of DO operation is described in
programming.
One-shot digital output
Pattern generation digital output
One-shot digital output programming scheme
This section describes the function flow typical of non-buffered single-point digital output
operation. While performing one-shot DO operation, the cards whose I/O port can be set as input
or output port need to include port configuration function at the beginning of your application.
NOTEThe following example uses a KPXI-DIO-48. Other DIO modules are similar with the
exception being that some modules do not require the _Config function call (specifically,
if the module’s ports are dedicated as inputs or outputs only).
This section describes the function flow typical of synchronous digital output operation. While
performing continuous DO operation, the DO configuration function has to be called at the
beginning of your application. In addition, for synchronous DO operation, the
in continuous DO functions for synchronous mode has to be set as
SYNCH_OP.
SyncMode argument
NOTEThe following example uses a KPXI-DIO-32-80M. Other DIO modules are similar with the
exception being that some modules do not require the _Config function call (specifically,
if the module’s ports are dedicated as inputs or outputs only).
KPXI-DIO-900-01 Rev. A / January 2007Return to Section TopicsA-17
Asynchronous continuous digital output programming
This section describes the function flow typical of asynchronous digital output operation. While
performing continuous DO operation, the DO configuration function has to be called at the
beginning of your application. In addition, for asynchronous DO operation, the
argument in continuous DO functions for asynchronous mode has to be set as
SyncMode
ASYNCH_OP.
NOTEThe following example uses a KPXI-DIO-32-80M. Other DIO modules are similar with the
exception being that some modules do not require the _Config function call (specifically,
if the module’s ports are dedicated as inputs or outputs only).
Figure A-8
Asynchronous continuous digital output programming
KDIO_DO_xxxx_Config
xxxx means the card type,
(
e.g. KDIO_DO_DIO32M80_Config
KDIO_DO_ContWritePort
KDIO_DO_AsyncCheck
No
Operation complete?
With SyncMode=ASYNCH_OP
)
Yes
KDIO_DO_AsyncClear
A-18Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
This section describes the function flow typical of pattern generation for digital output. While
performing pattern generation of DO, the DO configuration function has to be called at the
beginning of your application.
NOTEThe following example uses a KPXI-DIO-32-80M. Other DIO modules are similar with the
exception being that some modules do not require the _Config function call (specifically,
if the module’s ports are dedicated as inputs or outputs only).
Multiple-buffered asynchronous continuous digital output programming
This section describes the function flow typical of multi-buffered asynchronous digital output
operation. While performing continuous DO operation, the DO configuration function has to be
called at the beginning of your application. For asynchronous DO, the
continuous DO functions has to be set as
ASYNCH_OP.
NOTEThe following example uses a KPXI-DIO-32-80M. Other DIO modules are similar with the
exception being that some modules do not require the _Config function call (specifically,
if the module’s ports are dedicated as inputs or outputs only).
Figure A-10
Multiple-buffered asynchronous continuous digital output
do {
KDIO_DI_AsyncMultiBufferNextReady(card, &HalfReady, &viewidx);
} while (!HalfReady);
// Copy prepared data to the ready buffer
} while (!clear_op);
KDIO_DO_AsyncClear(card, &count);
…
KDIO_Release_Card(card);
DAQ event message programming hints
DAQ Event Message functions are an efficient way to monitor your background data acquisition
processes, without dedicating your foreground process for status checking. There are two kinds of
events, which are
event.
To receive notification from the KDIO-DRVR data acquisition process in case of special events,
you can call
which you are interested.
DI/DO operation completeness notification event and buffer ready notification
KDIO_DI_EventCallBack, or KDIO_DO_EventCallBack to specify an event in
Event notification is done through user-defined callbacks. When a user-specified DAQ event
occurs, KDIO-DRVR calls the user-defined callback. After receiving the message, the user’s
application can carry out the appropriate task.
The event message mechanism is easy and safe in Windows systems; however, the time delay
between the event and notification is highly variable and depends largely on how loaded your
system is. In addition, if a callback function is called, succeeding events will not be handled until
your callback has returned. If the time interval between events is smaller than the time taken for
callback function processing, the succeeding events will not be handled. Therefore this
mechanism is not suitable for the frequent events occurrence condition.
NOTEThe following example uses a KPXI-DIO-32-80M. Other DIO modules are similar with the
exception being that some modules do not require the _Config function call (specifically,
if the module’s ports are dedicated as inputs or outputs only).
//DI completeness call back function
void DI_CallBack ()
{
//DI is completed ]
KDIO_DO_AsyncClear (card, &count);
….
}
Interrupt event message programming hints
KDIO-DRVR provides two methods to perform interrupt occurrence notification for Keithley PXI
DIO cards that have dual interrupt system.
The Event Message method handles event notification through user-defined callbacks and/or the
Windows Message queue (for VB5, through user-defined callbacks only). When a user-specified
interrupt event occurs, KDIO-DRVR calls the user-defined callback (if defined) and/or puts a
message into the Windows Message queue, if you specified a window handle. After receiving the
message, the user’s application can carry out the appropriate task.
The event message mechanism is easy and safe in Windows systems; however, the time delay
between the event and notification is highly variable and depends largely on how loaded your
system is. In addition, if a callback function is called, succeeding events will not be handled until
your callback has returned. If the time interval between interrupt events is smaller than the time
taken for callback function processing, the succeeding interrupt events will not be handled.
Therefore this mechanism is not suitable for the frequent interrupt occurrence condition.
The Event Status checking and waiting method handles interrupt event status checking
through Win32 wait functions, such as WaitForSingleObject or WaitForMultipleObjects. This
method is useful for the situation that the interrupt event occurs very often, and the applications
written in the language that doesn’t support function pointers (e.g. VB4).
1. Through user-defined callbacks and the Windows Message queue
PostQuitMessage(0);
break;
….
}
}
….
//call back function
LRESULT CALLBACK cbfn()
{
….
}
2. Through a Win32 wait function
Example Code Fragment
card = KDIO_Register_Card(KPXI-DIO-16-16, card_number);
KDIO_SetDualInterrupt(card, INT1_EXT_SIGNAL, INT2_EXT_SIGNAL, hEvent);
….
//wait for INT1 event
if (WaitForSingleObject(hEvent[0], INFINITE) == WAIT_OBJECT_0) {
ResetEvent(hEvent[0]);
……
}
…..
//wait for INT2 event
if (WaitForSingleObject(hEvent[1], INFINITE) == WAIT_OBJECT_0) {
ResetEvent(hEvent[1]);
……
}
…..
if (card >= 0) KDIO_Release_Card(card);
Continuous data transfer in KDIO-DRVR
The continuous data transfer functions in KDIO-DRVR input or output blocks of data to or from a
plug-in Keithley PXI digital I/O device. For input operations, KDIO-DRVR must transfer the
incoming data to a buffer in the computer memory. For output operations, KDIO-DRVR must
transfer outgoing data from a buffer in the computer memory to the Keithley PXI digital I/O device.
This section describes the mechanism and techniques that KDIO-DRVR uses for continuous data
transfer and the considerations for selecting the continuous data transfer mode (sync. or async.,
double buffered or not, triggered or non-triggered mode).
Continuous data transfer mechanism
KDIO-DRVR uses two mechanisms to perform the continuous data transfer. The first one, interrupt
transfer, transfers data through the interrupt mechanism. The second one is to use the DMA
controller chip to perform a hardware transfer of the data. Whether KDIO-DRVR uses interrupt or
DMA depends on the device. If the device support both of these two mechanisms, KDIO-DRVR
decides on the data transfer method that typically takes maximum advantage of available
resources.
Double-buffered / multiple-buffered DI operation
KDIO-DRVR uses double-buffering / multiple buffering techniques in its driver software for
continuous input of large amounts of data.
KPXI-DIO-900-01 Rev. A / January 2007Return to Section TopicsA-23
The data buffer for double (multiple)-buffered continuous input operation is a circular buffer
logically. It is logically divided into two equal halves. The double-buffered input begins when device
starts writing data into the first half of the circular buffer (
to the second half of the circular buffer, you can copy the data from the first half into the transfer
buffer (user buffer) (
Figure A-11b). You now can process the data in the transfer buffer according
to application needs. After the board has filled the second half of the circular buffer, the board
returns to the first half buffer and overwrites the old data. You now can copy the second half of the
circular buffer to the transfer buffer (
Figure A-11c). The data in the transfer buffer is again available
for process. The process can be repeated endlessly to provide a continuous stream of data to your
application (
Figure A-11d).
Figure A-11
Double/multiple buffer mode principle
Figure A-11a). After device begins writing
a
Incoming DMA
input data
c
> >
Circular Buffer
Transfer Buffer
Empty BufferUntransferred DataTransferred Data
b
> > >
d
> > >> >
The KDIO-DRVR double buffer mode functions were designed according to the principle described
above. If you use
KDIO_DI_AsyncDblBufferMode to enable double buffer mode, the following
continuous AI/DI function will perform double-buffered continuous DI. You can call
KDIO_DI_AsyncDblBufferHalfReady to check if data in the circular buffer is half full and
ready for copying to the transfer buffer. Then you can call
KDIO_DI_AsyncDblBufferTransfer to copy data from the ready half buffer to the transfer
buffer.
Single-buffered versus double (multiple)-buffered data transfer
Single-buffered data transfer is the most common method for continuous data transfer. In singlebuffered input operations, a fixed number of samples are acquired at a specified rate and
transferred into user’s buffer. After the user’s buffer stores the data, the application can analyze,
display, or store the data to the hard disk for later processing. Single-buffered operations are
relatively simple to implement and can usually take advantage of the full hardware speed of the
device. However, the major disadvantage of single-buffered operation is that the maximum amount
of data that can be input at any one time is limited to the amount of initially allocated memory
allocated in driver and the amount of free memory available in the computer.
In double (multiple)-buffered operations, as mentioned above, the data buffer is configured as a
circular buffer. Therefore, unlike single-buffered operations, double-buffered operations reuse the
same buffer and are able to input or output an infinite number of data points without requiring an
infinite amount of memory. However, there exits the undesired result of data overwritten for
A-24Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
double-buffered data transfer. The device might overwrite data before KDIO-DRVR has copied it to
the transfer buffer. Another data overwritten problem occurs when an input device overwrites data
that KDIO-DRVR is simultaneously copying to the transfer buffer. Therefore, the data must be
processed by the application at least as fast as the rate at which the device is reading data. For
most of the applications, this requirement depends on the speed and efficiency of the computer
system and programming language.
Hence, double buffering might not be practical for high-speed input applications.
KDIO-DRVR utilities for Win32
This section introduces the tools that accompanied with the KDIO-DRVR package.
KDIO-DRVR configuration utility (configdrv)
configdrv is used for the users to set/modify the allocated buffer sizes of DI and DO. The default
location of this utility is <InstallDir>\Util directory.
[configdrv in Windows XP/2000]
This utility is used to set/modify the allocated buffer sizes of DI and DO. The allocated buffer sizes
of DI, DO represent the sizes of contiguous Initially Allocated memory for continuous analog input,
analog output, digital input, digital output respectively. Its unit is page
driver will try to allocate these sizes of memory at system startup time. The size of initially
allocated memory is the maximum memory size that DMA or Interrupt transfer can be performed. It
will induce an unexpected result in that DMA or Interrupt transfer performed exceeds the initially
allocated size.
KB, i.e. 1024 bytes. Device
The “Driver Configuration” window is shown as below.
Figure A-12
Driver configuration window
KPXI-DIO-32-80M
AI:
AO:
DI:
DO:
0
0
32768
1024
perform
Using configdrv to change the buffer allocated settings of one of the KDIO-DRVR drivers,
select the driver from the
KPXI-DIO-900-01 Rev. A / January 2007Return to Section TopicsA-25
Inside the allocated buffer size fields of AI, AO, DI and DO are the originally set values. Type the
value in the box corresponding to AI, AO, DI, or DO according to the requirement of your
applications, and then click “Apply” button.
KDIO-DRVR data file converter utility (KIDAQCvt)
The data files, generated by the KDAQ-DRVR functions performing continuous data acquisition
followed by storing the data to disk, is written in binary format. Since a binary file can’t be read by
the normal text editor and can’t be used to analyze the accessed data by Excel, KDAQ-DRVR
provides a convenient tool
default location of this utility is <InstallDir>\Util directory. The
following figure:
Figure A-13
DAQ File Conversion Utility
KIDAQCvt to convert the binary file to the file format read easily. The
KIDAQCvt main window is as the
The KIDAQCvt main window includes two frames. The upper frame, Input File frame is used for
the source data file and the lower frame is used for the destination file.
To load the source binary data file, type the binary data file name in File Path field or click
Browser button to select the source file from Input File frame, and then click Load button. As the
file is loaded, the information related to the data file, e.g.
…etc., are shown in the corresponding fields in “Input File” frame, and the default converted data
file path and format are also listed as the figure below.
A-26Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
The default destination file with a .cvt extension is located in the same directory as the source
one. To change the default setting, type the file path you wish or click the
Browse button from
Output File frame to select the destination file location.
KIDAQCvt provides three types of data format conversions:
Text file with scaled data:
The data in hexadecimal format is scaled to engineering unit (voltage, amp, …etc) according to the
card type, data width and data range and then written to disk in text file format. This type is
available for the data accessed from continuous AI operation only.
Binary file with scaled data:
The data in hexadecimal is scaled to engineering unit (voltage, amp, …etc) according to the card
type, data width and data range and then written to disk in binary file format. This type is available
for the data accessed from continuous AI operation only.
Text file with binary codes:
The data in hexadecimal format or converted to a decimal value is written to disk in text file format.
If the original data includes channel information, the raw value will be handled to get the real data
value. This type is available for the data accessed form continuous AI and DI operations.
The data separator in converted text file is selectable among space, comma and Tab.
If you want to add title/head which includes the card type information at the beginning of file, check
the “Title/Head” box.
After setting the properties (File Path, Format, …etc) related to the converted file, you can push
Start Convert button from the Output File frame to perform the file conversion.
KPXI-DIO-900-01 Rev. A / January 2007Return to Section TopicsA-27
Data Block........................................................................... B-42
Function Support ....................................................................... B-43
Appendix B
KDIO-DRVR Function Reference
Appendix B: KDIO-DRVR Function ReferenceKPXI 48-Channel General Purpose Card User’s Manual
Function description
This section is provided as a function reference. It contains a detailed description of KDIO-DRVR
functions and includes information on KDIO-DRVR
reference (functions are arranged alphabetically in the reference). Syntax is provided for Microsoft
C/C++, and Borland C++, as well as Visual Basic.
Data types
Tab l e B - 1 contains data types defined in kdiodrvr.h. These data types are used by the
KDIO-DRVR library. It is recommended these data types are used in your application programs.
Tab l e B - 1 contains data type names, ranges, and the corresponding data types for C/C++ and
Visual Basic.
NOTEThe data types in Tabl e B - 1 are defined in kdiodrvr.h, but are not defined in
kdiodrvr.bas (for .bas definition files, the table is provided only as a reference).
Tab l e B - 1
Suggested data types
Data types as well as a KDIO-DRVR Function
Type
Type
NameDescriptionRange
U88-bit ASCII character0 to 255unsigned
I1616-bit signed integer-32768 to 32767shortInteger
U1616-bit unsigned integer0 to 65535unsigned
I3232-bit signed integer-2147483648 to
U3232-bit unsigned integer0 to 4294967295unsigned
F3232-bit single-precision
floating
-point
F6464-bit double-precision
floating
-point
Function reference
KDIO-DRVR is a software driver for Keithley Instruments PXI DIO cards. It is a high performance
data acquisition driver for developing custom applications.
Using KDIO-DRVR also lets you take advantage of the power and features of Microsoft Windows
for your data acquisition applications. These include running multiple applications and using
extended memory. Also, using KDIO-DRVR under environment makes it easy to create custom
user interfaces and graphics.
2147483647
-3.402823E38 to
3.402823E38
-1.797683134862315E308
to
1.797683134862315E309
C/C++
(for 32-bit
compiler)Visual Basic
Byte
char
Not supported by this type,
short
longLong
long
floatSingle
doubleDouble
use the signed integer (I16)
instead
Not supported by this type,
use the signed long integer
(I32) instead
KDIO_CTR_Clear
DescriptionTurns off the specified counter operation and sets the output of the selected
counter to the specified state. This function is supported by the following models:
KPXI-DIO-48
B-2Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
KPXI 48-Channel General Purpose Card User’s ManualAppendix B: KDIO-DRVR Function Reference
TOGGLE_OUTPUT: Toggle output from low to high on terminal count. In this
mode, the output goes low after the mode set operation, and the counter begins to
count down while the gate input is high. When terminal count is reached, the
output goes high and remains high until the selected counter is set to a different
mode. The following diagram shows the TOGGLE_OUTPUT mode timing
diagram.
Figure B-1
TOGGLE_OUTPUT mode timing
Clock
WR
Gate
Output
(n = 6)
6 5 4
PROG_ONE_SHOT: Programmable one-shot. In this mode, the output goes low
on the following rising edge of the gate input and goes high on terminal count.
The following diagram shows the PROG_ONE_SHOT mode timing diagram.
Figure B-2
PROG_ONE_SHOT mode timing
Clock
Gate
Output
(n = 4)
RATE_GENERATOR: Rate generator. In this mode, the output goes low for one
period of the clock input.
next. The following diagram shows the RATE_GENERATOR mode timing
diagram.
A
A + B = n
4 3 2 1 0
count indicates the period from one output pulse to the
3 2 1 0
B
B-4Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
KPXI 48-Channel General Purpose Card User’s ManualAppendix B: KDIO-DRVR Function Reference
Figure B-3
RATE_GENERATOR mode timing
Clock
Gate
Output
4 3 2 1 0 (4) 3 2 1 0 (4)
(n = 4)
SQ_WAVE_RATE_GENERATOR: Square wave rate generator. In this mode, the
output stays high for one half of the
count clock pulses and stays low for the other
half. The following diagram shows the SQ_WAVE_RATE_GENERATOR mode
timing diagram.
Figure B-4
SQ_WAVE_RATE_GENERATOR mode timing
Clock
Gate
Output (n = 4)
Output (n = 5)
4 2 4 2 4 2 4 2 4 2 4 2
5 4 2 5 2 5 4 2 5 2 5 4
SOFT_TRIG: Software-triggered strobe. In this mode, the output is initially high,
and the counter begins to count down while the gate input is high. On terminal
count, the output goes low for one clock pulse, then goes high again. The
following diagram shows the SOFT_TRIG mode timing diagram.
Figure B-5
SOFT_TRIG mode timing
Clock
WR
Gate
Output
HARD_TRIG: Hardware-triggered strobe. This mode is similar to SOFT_TRIG
mode except that the gate input is used as a trigger to start counting. The
following diagram shows the HARD_TRIG mode timing diagram.
Figure B-6
HARD_TRIG mode timing
Clock
Gate
Output
n = 4
n = 4
4 3 2 1 0
4 3 2 1 0
Count: The period from one output pulse to the next.
BinBcd: Whether the counter operates as a 16-bit binary counter or as a 4-
DescriptionInforms KDIO-DRVR library of the trigger source, port width, etc. selected for
KPXI-DIO-32-80M card with card ID
before calling function to perform continuous digital input operation. This function
is supported by the following models: KPXI-DIO-32-80M
KDIO_DI_DIO32M80_Config (ByVal CardNumber As Integer,
ByVal PortWidth As Integer, ByVal TrigSource As Integer,
ByVal WaitStatus As Integer, ByVal Terminator As Integer,
ByVal I_Cntrl_Pol As Integer, ByVal ClearFifo As Byte,
ByVal DisableDI As Byte) As Integer
CardNumber. You must call this function
ParametersCardNumber: The card id number.
PortWidth: The width of digital input port (PORT A). The valid value is 0, 8, 16, or
32.
TrigSource: The trigger mode for continuous digital input.
KDIO_DI_AsyncCheck (ByVal CardNumber As Integer,
Stopped As Byte, AccessCnt As Long) As Integer
KPXI-DIO-900-01 Rev. A / January 2007Return to Section TopicsB-7
Appendix B: KDIO-DRVR Function ReferenceKPXI 48-Channel General Purpose Card User’s Manual
ParametersCardNumber: The card id of the card that performs the asynchronous operation.
Stopped: Whether the asynchronous analog input operation has completed. If
Stopped = TRUE, the digital input operation has stopped. Either the number of
digital input indicated in the call that initiated the asynchronous digital input
operation has completed or an error has occurred. If
operation is not yet complete. (constants TRUE and FALSE are defined in
kdiodrvr.h)
AccessCnt: The number of digital input data that has been transferred at the time
the call to
in KDIO_DI_AsyncCheck() and KDIO_ DI_AsyncClear() with
board because on-board chip (PLX9080) of
register to get the current amount of DMA transfer.
KDIO_DI_AsyncClear (ByVal CardNumber As Integer,
AccessCnt As Long) As Integer
ParametersCardNumber: The card id of the card that performs the asynchronous operation.
AccessCnt: The number of digital input data that has been transferred at the time
the call to
If double-buffered mode is enabled, AccessCnt returns the next position after the
position the last data is stored in the circular buffer. If the AccessCnt exceeds the
half size of circular buffer, call "KIO_DI_AsyncDblBufferTransfer " twice to get the
data.
AccessCnt is of no use (always returns 0) in KDIO_DI_AsyncCheck() and
KDIO_DI_AsyncClear() with
(PLX9080) of
amount of DMA transfer.
B-10Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
KPXI 48-Channel General Purpose Card User’s ManualAppendix B: KDIO-DRVR Function Reference
Visual Basic
KDIO_DI_ContMultiBufferStart (ByVal CardNumber As Integer,
ByVal Port As Integer, ByVal SampleRate As Double)
As Integer
ParametersCardNumber: The card id number.
Port: Digital input port number. For KPXI-DIO-32-80M, this argument must
be set to 0.
SampleRate: The sampling rate you want for digital input in hertz (samples per
second). Your maximum rate depends on the card type and your computer
system. This argument is only useful if the DI trigger mode was set as internal
programmable pacer (TRIG_INT_PACER) by calling
KDIO_DI_ContReadPort (ByVal CardNumber As Integer,
ByVal Port As Integer, Buffer As Any,
ByVal ReadCount As Long, ByVal SampleRate As Double,
ByVal SyncMode As Integer) As Integer
ParametersCardNumber: The card id number.
Port: Digital input port number. For KPXI-DIO-32-80M, this argument must be set
to 0.
Buffer: The starting address of the memory to contain the input data. This
memory must have been allocated for enough space to store input data. If doublebuffered mode is enabled, this buffer is of no use, you can ignore this argument.
ReadCount: If double-buffered mode is disabled, ReadCount is the number of
input operations to be performed. For double-buffered acquisition,
the size (in samples) of the circular buffer and its value must be even.
SampleRate: The sampling rate you want for digital input in hertz (samples per
second). Your maximum rate depends on the card type and your computer
system. This argument is only useful if the DI trigger mode was set as internal
programmable pacer (TRIG_INT_PACER) by calling
KDIO_DI_DIO32M80_Config()
. For the other settings, you have to set this
argument as CLKSRC_EXT_SampRate.
ReadCount is
SyncMode: Whether this operation is performed synchronously or
asynchronously.
KPXI-DIO-900-01 Rev. A / January 2007Return to Section TopicsB-11
Appendix B: KDIO-DRVR Function ReferenceKPXI 48-Channel General Purpose Card User’s Manual
Valid values:
SYNCH_OP: synchronous digital input, that is, the function does not return until
the digital input operation complete.
DescriptionThis function performs continuous digital input on the specified digital input port at
a rate as close to the rate you specified and saves the acquired data in a disk file.
The data is written to disk in binary format, with the lower byte first (little endian).
See “Data file format” on page B-40 for more information. This function is
supported by the following models: KPXI-DIO-32-80M
KDIO_DI_ContReadPortToFile (ByVal CardNumber As Integer,
ByVal Port As Integer, ByVal FileName As String,
ByVal ReadCount As Long, ByVal SampleRate As Double,
ByVal SyncMode As Integer) As Integer
ParametersCardNumber: The card id number.
Port: Digital input port number. For KPXI-DIO-32-80M, this argument must
be set to 0.
FileName: Name of data file which stores the acquired data
ReadCount: If double-buffered mode is disabled, ReadCount is the number of
input operations to be performed. For double-buffered acquisition,
the size (in samples) of the circular buffer and its value must be even.
SampleRate: The sampling rate you want for digital input in hertz (samples per
second). Your maximum rate depends on the card type and your computer
system. This argument is only useful if the DI trigger mode was set as internal
programmable pacer (TRIG_INT_PACER) by calling
KDIO_DI_DIO32M80_Config(). For the other settings, you have to set this
argument as CLKSRC_EXT_SampRate.
SyncMode: Whether this operation is performed synchronously or
asynchronously.
ReadCount is
Valid values:
SYNCH_OP: synchronous digital input, that is, the function does not return until
the digital input operation complete.
ASYNCH_OP: asynchronous digital input operation
B-12Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
KPXI 48-Channel General Purpose Card User’s ManualAppendix B: KDIO-DRVR Function Reference
DescriptionWhile performing continuous DI conversions, this function is called to get the DI
status. Please refer to the manual for your device for the DI status the device
might meet. This function is supported by the following models: KPXI-DIO-32-80M
DescriptionControls and notifies the user’s application when a specified DAQ event occurs.
The notification is performed through a user-specified callback function. The event
message will be removed automatically after calling
The event message can also be manually removed by set the parameter “
to 0. This function is supported by the following models: KPXI-DIO-32-80M
DescriptionThis function returns the mapped buffer address of the memory allocated in the
driver for continuous DI operation at system startup time. The size of the allocated
memory can be got by using the function
This function is supported by the following models: KPXI-DIO-32-80M
KPXI-DIO-16-16: 0 through 15
KPXI-DIO-48: 0 through 7
KPXI-RDI-8-16: 0 through 15
KPXI-DIO-32-80M: 0 through 3
KPXI-DIO-32-32: 0 through 31
KPXI-DIO-64-0: 0 through 31
State: Returns the digital logic state, 0 or 1, of the specified line.
DescriptionThis function controls the interrupt sources (AuxDI0 and Timer 2) of local interrupt
system of KPXI-DIO-32-80M and returns the two interrupt events. If an interrupt is
generated, the corresponding interrupt event will be signaled. The application can
use Win32 wait functions, such as WaitForSingleObject or WaitForMultipleObjects
B-16Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
KPXI 48-Channel General Purpose Card User’s ManualAppendix B: KDIO-DRVR Function Reference
to check the interrupt event status. This function is supported by the following
models: KPXI-DIO-32-80M
DescriptionControls the AUXDI interrupt and notifies the user’s application when an interrupt
event occurs. The notification is performed through a user-specified callback
function or the Windows PostMessage API. This function is supported by the
following models: KPXI-DIO-32-80M
KDIO_ AUXDI _EventMessage (ByVal CardNumber As Integer,
ByVal AuxDIEn As Integer, ByVal windowHandle As Long,
ByVal message As Long, ByVal callbackAddr As Long)
As Integer
KPXI-DIO-900-01 Rev. A / January 2007Return to Section TopicsB-17
Appendix B: KDIO-DRVR Function ReferenceKPXI 48-Channel General Purpose Card User’s Manual
ParametersCardNumber: The card id of the card that want to be performed this operation.
AuxDIEn: The control value for AUXDI interrupt. Valid values:
0: disabled
1: enabled
windowHandle: The handle to the window you want to receive a Windows
message in when the specified AUXDI event
happens. If windowHandleis 0, no
Windows messages are sent.
message: a message you define. When the specified AUXDI eventhappens,
KDIO-DRVR passes
message back to you. message can be any value.
In Windows, you can set message to a value including any Windows predefined
messages (such as WM_PAINT). However, to define your own message, you can
use any value ranging from WM_USER (0x400) to 0x7fff. This range is reserved
by Microsoft for messages you define.
callbackAddr: address of the user callback function. KDIO-DRVR calls this
function when the specified AUXDI event
callback function, set
DescriptionControl and notifies the user’s application when a specified interrupt event occurs.
The notification is performed through a user-specified callback function or the
Windows PostMessage API.
When a new event message is added, it will keep active until you call this function
by setting 0 to the argument “mode” to remove the specified interrupt event
message. To remove a specified message, make sure to provide the event handle
to be notified for the message.
This function is supported by the following models:
KPXI-DIO-16-16, KPXI-DIO-48, KPXI-DIO-32-32, KPXI-DIO-64-0
KDIO_INT_EventMessage (ByVal CardNumber As Integer,
ByVal mode As Integer, ByVal evt As Long,
ByVal windowHandle As Long, ByVal message As Long,
ByVal callbackAddr As Long) As Integer
B-18Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
KPXI 48-Channel General Purpose Card User’s ManualAppendix B: KDIO-DRVR Function Reference
ParametersCardNumber: The card id of the card that want to be performed this operation.
mode: The operation mode of adding or removing message:
0: remove an existing message interrupt event defined argument evt.
1: add a new message for a interrupt event defined argument evt
evt: The handle of the INT event wishing to handle.
windowHandle: The handle to the window you want to receive a Windows
message in when the specified INT event
happens. If windowHandleis 0, no
Windows messages are sent.
message: a message you define. When the specified INT eventhappens,
KDIO-DRVR passes
message back to you. message can be any value.
In Windows, you can set message to a value including any Windows predefined
messages (such as WM_PAINT). However, to define your own message, you can
use any value ranging from WM_USER (0x400) to 0x7fff. This range is reserved
by Microsoft for messages you define.
callbackAddr: address of the user callback function. KDIO-DRVR calls this
function when the specified INT event
function, set
DescriptionControls the interrupt sources of INT1 of Dual Interrupt system and notifies the
user’s application when an interrupt event occurs. The notification is performed
through a user-specified callback function or the Windows PostMessage API. This
function is supported by the following models:
KPXI-DIO-16-16, KPXI-DIO-48, KPXI-DIO-32-32, KPXI-DIO-64-0
KDIO_INT1_EventMessage (ByVal CardNumber As Integer,
ByVal Int1Mode As Integer, ByVal windowHandle As Long,
ByVal message As Long, ByVal callbackAddr As Long)
As Integer
ParametersCardNumber: The card id of the card that want to be performed this operation.
Int1Mode: The interrupt mode of INT1. The valid values:
KPXI-DIO-48:
INT1_DISABLE: INT1 Disabled
INT1_FP1C0: INT1 by Falling edge of P1C0
KPXI-DIO-900-01 Rev. A / January 2007Return to Section TopicsB-19
Appendix B: KDIO-DRVR Function ReferenceKPXI 48-Channel General Purpose Card User’s Manual
INT1_RP1C0_FP1C3: INT1 by P1C0 Rising or P1C3 Falling
INT1_EVENT_COUNTER: INT1 by Event Counter down to zero
KPXI-DIO-16-16/KPXI-DIO-32-32/KPXI-DIO-64-0:
INT1_DISABLE: INT1 Disabled
INT1_EXT_SIGNAL: INT1 by External Signal
windowHandle: The handle to the window you want to receive a Windows
message in when the specified INT1 event
Windows messages are sent.
message: a message you define. When the specified INT1 eventhappens,
KDIO-DRVR passes
In Windows, you can set message to a value including any Windows predefined
messages (such as WM_PAINT). However, to define your own message, you can
use any value ranging from WM_USER (0x400) to 0x7fff. This range is reserved
by Microsoft for messages you define.
callbackAddr: address of the user callback function. KDIO-DRVR calls this
function when the specified INT1 event
callback function, set
DescriptionControls the interrupt sources of INT2 of Dual Interrupt system and notifies the
user’s application when an interrupt event occurs. The notification is performed
through a user-specified callback function or the Windows PostMessage API. This
function is supported by the following models: KPXI-DIO-16-16, KPXI-DIO-48,
KPXI-DIO-32-32, KPXI-DIO-64-0
KDIO_INT2_EventMessage (ByVal CardNumber As Integer,
ByVal Int2Mode As Integer, ByVal windowHandle As Long,
ByVal message As Long, ByVal callbackAddr As Long)
As Integer
ParametersCardNumber: The card id of the card that want to be performed this operation.
Int2Mode: The interrupt mode of INT2. Valid values:
KPXI-DIO-48:
INT2_DISABLE: INT2 Disabled
INT2_FP2C0: INT2 by Falling edge of P2C0
B-20Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
KPXI 48-Channel General Purpose Card User’s ManualAppendix B: KDIO-DRVR Function Reference
INT2_RP2C0_FP2C3: INT2 by P2C0 Rising or P2C3 Falling
INT2_TIMER_COUNTER: INT2 by Timer Counter down to zero
KPXI-DIO-16-16/KPXI-DIO-32-32/KPXI-DIO-64-0:
INT2_DISABLE: INT2 Disabled
INT2_EXT_SIGNAL: INT2 by External Signal
windowHandle: The handle to the window you want to receive a Windows
message in when the specified INT2 event
happens. If windowHandleis 0, no
Windows messages are sent.
message: a message you define. When the specified INT2 eventhappens,
KDIO-DRVR passes
message back to you. message can be any value.
In Windows, you can set message to a value including any Windows predefined
messages (such as WM_PAINT). However, to define your own message, you can
use any value ranging from WM_USER (0x400) to 0x7fff. This range is reserved
by Microsoft for messages you define.
callbackAddr: address of the user callback function. KDIO-DRVR calls this
function when the specified INT2 event
callback function, set
DescriptionThis function informs KDIO-DRVR library of the interrupt mode of two interrupt
sources of dual-interrupt system and returns dual interrupt events. If an interrupt is
generated, the corresponding interrupt event will be signaled. The application can
use Win32 wait functions, such as WaitForSingleObject or WaitForMultipleObjects
to check the interrupt event status. This function is supported by the following
models: KPXI-DIO-16-16, KPXI-DIO-48, KPXI-DIO-32-32, KPXI-DIO-64-0
KDIO_SetDualInterrupt (ByVal CardNumber As Integer,
ByVal Int1Mode As Integer, ByVal Int2Mode As Integer,
hEvent As Long) As Integer
ParametersCardNumber: The card id of the card that want to be performed this operation.
Int1Mode: The interrupt mode of INT1. Valid values:
KPXI-DIO-48:
INT1_DISABLE: INT1 Disabled
INT1_FP1C0: INT1 by Falling edge of P1C0
INT1_RP1C0_FP1C3: INT1 by P1C0 Rising or P1C3 Falling
INT1_EVENT_COUNTER: INT1 by Event Counter down to zero
KPXI-DIO-16-16/KPXI-DIO-32-32/KPXI-DIO-64-0:
INT1_DISABLE: INT1 Disabled
INT1_EXT_SIGNAL: INT1 by External Signal
Int2Mode: The interrupt mode of INT2.Valid values:
KPXI-DIO-48:
INT2_DISABLE: INT2 Disabled
INT2_FP2C0: INT2 by Falling edge of P2C0
INT2_RP2C0_FP2C3: INT2 by P2C0 Rising or P2C3 Falling
INT2_TIMER_COUNTER: INT2 by Timer Counter down to zero
KPXI-DIO-16-16/KPXI-DIO-32-32/KPXI-DIO-64-0:
INT2_DISABLE: INT2 Disabled
INT2_EXT_SIGNAL: INT2 by External Signal
hEvent (Win32 only): dual interrupt event handles returned. The status of a dual
interrupt event indicates that an interrupt is generated or not for the cards
B-22Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
KPXI 48-Channel General Purpose Card User’s ManualAppendix B: KDIO-DRVR Function Reference
comprising dual interrupts system (KPXI-DIO-16-16, KPXI-DIO-48, KPXI-DIO-3232, and KPXI-DIO-64-0).
DescriptionControls the Timer2 interrupt and notifies the user’s application when an interrupt
event occurs. The notification is performed through a user-specified callback
function or the Windows PostMessage API. This function is supported by the
following models: KPXI-DIO-32-80M
KDIO_T2_EventMessage (ByVal CardNumber As Integer,
ByVal T2En As Integer, ByVal windowHandle As Long,
ByVal message As Long, ByVal callbackAddr As Long)
As Integer
ParametersCardNumber: The card id of the card that want to be performed this operation.
T2En: The control value for Timer2 interrupt.
Valid values:
0: disabled
1: enabled
windowHandle: The handle to the window you want to receive a Windows
message in when the specified Timer2 event
Windows messages are sent.
message: A user definable message. When the specified Timer2 event
happens, KDIO-DRVR passes message back to you. message can be any value.
In Windows, you can set message to a value including any Windows predefined
messages (such as WM_PAINT). However, to define your own message, you can
use any value ranging from WM_USER (0x400) to 0x7fff. This range is reserved
by Microsoft for messages you define.
callbackAddr: address of the user callback function. KDIO-DRVR calls this
function when the specified Timer2 event
callback function, set
DescriptionInforms KDIO-DRVR library of the trigger source, port width, etc. selected for
KPXI-DIO-32-80M card with card ID
before calling function to perform continuous digital output operation. This function
is supported by the following models: KPXI-DIO-32-80M
KPXI-DIO-900-01 Rev. A / January 2007Return to Section TopicsB-23
CardNumber. You must call this function
Appendix B: KDIO-DRVR Function ReferenceKPXI 48-Channel General Purpose Card User’s Manual
KDIO_DO_DIO32M80_Config (ByVal CardNumber As Integer,
ByVal PortWidth As Integer, ByVal TrigSource As Integer,
ByVal WaitStatus As Integer, ByVal Terminator As Integer,
ByVal O_Cntrl_Pol As Integer, ByVal FifoThreshold As Long)
As Integer
ParametersCardNumber: The card id number.
PortWidth: The width of digital output port (PORT B). The valid value is 0, 8, 16,
or 32.
TrigSource: The trigger mode for continuous digital output.
Valid values:
TRIG_INT_PACER: on-board programmable pacer timer1
TRIG_CLK_10MHz: 10MHz clock
TRIG_CLK_20MHz: 20MHz clock
TRIG_HANDSHAKE: handshaking mode
TRIG_DO_CLK_TIMER_ACK: burst handshaking mode by using timer1 output as
output clock
B-24Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
KPXI 48-Channel General Purpose Card User’s ManualAppendix B: KDIO-DRVR Function Reference
TRIG_DO_CLK_10M_ACK: burst handshaking mode by using 10MHz clock as
output clock
TRIG_DO_CLK_20M_ACK: burst handshaking mode by using 20MHz clock as
output clock
KDIO_DO_AsyncCheck (ByVal CardNumber As Integer,
Stopped As Byte, AccessCnt As Long) As Integer
ParametersCardNumber: The card id of the card that performs the asynchronous operation.
Stopped: Whether the asynchronous digital output operation has completed. If
Stopped = TRUE, the digital output operation has stopped. Either the number of
digital output indicated in the call that initiated the asynchronous digital output
operation has completed or an error has occurred. If
operation is not yet complete. (constants TRUE and FALSE are defined in
kdiodrvr.h)
Stopped = FALSE, the
AccessCnt: The number of digital output data that has been written at the time
DescriptionChecks whether the next buffer is ready for new data during an asynchronous
multi-buffered digital output operation. The returned
most recently available (newest available) buffer. This function is supported by the
following models: KPXI-DIO-32-80M
B-26Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
BufferId is the index of the
KPXI 48-Channel General Purpose Card User’s ManualAppendix B: KDIO-DRVR Function Reference
KPXI-DIO-900-01 Rev. A / January 2007Return to Section TopicsB-27
Appendix B: KDIO-DRVR Function ReferenceKPXI 48-Channel General Purpose Card User’s Manual
Visual Basic
KDIO_DO_ContMultiBufferStart (ByVal CardNumber As Integer,
ByVal Port As Integer, ByVal SampleRate As Double)
As Integer
ParametersCardNumber: The card id number.
Port: Digital output port number. For KPXI-DIO-32-80M, this argument
must be set to 0.
SampleRate: The sampling rate you want for digital output in hertz (samples per
second). Your maximum rate depends on the card type and your computer
system. This argument is only useful if the DO trigger mode was set as internal
programmable pacer (TRIG_INT_PACER) by calling
DescriptionWhile performing continuous DO conversions, this function is called to get the DO
status. Please refer to the manual for your device for the DO status the device
might meet. This function is supported by the following models: KPXI-DIO-32-80M
KDIO_DO_ContWritePort (ByVal CardNumber As Integer,
ByVal Port As Integer, Buffer As Any,
ByVal WriteCount As Long, ByVal Iterations As Integer,
ByVal SampleRate As Single, ByVal SyncMode As Integer)
As Integer
ParametersCardNumber: The card id number.
Port: Digital output port number. For KPXI-DIO-32-80M, this argument
must be set to 0.
Buffer: The starting address of the memory containing the output data. This
memory must have been allocated for enough space to store output data.
WriteCount: The number of output operations to be performed.
Iterations: The number of times the data in Buffer to output to the Port. A value
of 0 means that digital output operation proceeds indefinitely. If the digital output
operation is performed
SampleRate: The sampling rate you want for digital output in hertz (samples per
synchronously, this argument must be set as 1.
second). Your maximum rate depends on the card type and your computer
system. This argument is only useful if the DO trigger mode was set as internal
programmable pacer (TRIG_INT_PACER and TRIG_DO_CLK_TIMER_ACK) by
calling
KDIO_DO_DIO32M80_Config(). For the other settings, you have to set
this argument as CLKSRC_EXT_SampRate.
SyncMode: Whether this operation is performed synchronously or
asynchronously.
Valid values:
SYNCH_OP: synchronous digital input, that is, the function does not return until
the digital input operation complete.
DescriptionControls and notifies the user’s application when a specified DAQ event occurs.
The notification is performed through a user-specified callback function. The event
message will be removed automatically after calling
The event message can also be manually removed by set the parameter “
to be 0. This function is supported by the following models: KPXI-DIO-32-80M
KPXI-DIO-900-01 Rev. A / January 2007Return to Section TopicsB-29
KDIO_DO_Async_Clear.
mode”
Appendix B: KDIO-DRVR Function ReferenceKPXI 48-Channel General Purpose Card User’s Manual
DescriptionThis function returns the available memory size for continuous digital output in the
device driver of this card. The continuous digital output transfer size can not
exceed this size. This function is supported by the following models:
KPXI-DIO-32-80M
KDIO_DO_PGStart (ByVal CardNumber As Integer, Buffer As Any,
ByVal WriteCount As Long, ByVal SampleRate As Double)
As Integer
ParametersCardNumber: The card id number.
Buffer: The starting address of the memory containing the output data of
pattern generation. This memory must have been allocated for enough space to
store output data.
WriteCount: the number of pattern generation output samples.
SampleRate: The sampling rate you want for digital output in hertz (samples per
second). Your maximum rate depends on the card type and your computer
system. This argument is only useful if the DO trigger mode was set as internal
programmable pacer (TRIG_INT_PACER) by calling
DescriptionRead back the digital logic state of the specified digital output line in the specified
port. This function is supported by the following models: KPXI-DIO-16-16,
KPXI-DIO-48, KPXI-RDI-8-16, KPXI-DIO-32-80M, KPXI-DIO-32-32, KPXI-DIO64-0, KPXI-DIO-0-64
KPXI-DIO-900-01 Rev. A / January 2007Return to Section TopicsB-31
Appendix B: KDIO-DRVR Function ReferenceKPXI 48-Channel General Purpose Card User’s Manual
KDIO_DO_ReadLine (ByVal CardNumber As Integer,
ByVal Port As Integer, ByVal Line As Integer,
State As Integer) As Integer
ParametersCardNumber: The card id number.
Port: Digital output port number.
Valid values:
KPXI-DIO-16-16: 0
KPXI-RDI-8-16: 0
KPXI-DIO-32-80M: 1 (auxiliary digital output port)
KPXI-DIO-32-32: 0, DIO32I32O_DO_LED
KPXI-DIO-64-0: DIO64I_DO_LED
KPXI-DIO-0-64: PORT_DO_LOW, PORT_DO_HIGH, DIO64O_DO_LED
KPXI-DIO-48: refer to the function KDIO_DI_ReadLine section.
Line: The digital line to be accessed.
Valid values:
KPXI-DIO-16-16: 0 through 15
KPXI-RDI-8-16: 0 through 7
KPXI-DIO-32-80M: 0 through 3
KPXI-DIO-32-32/KPXI-DIO-64-0/KPXI-DIO-0-64: 0 through 31
KPXI-DIO-48: refer to the function KDIO_DI_ReadLine section.
State: Returns the digital logic state, 0 or 1, of the specified line.
DescriptionRead back the output digital data from the specified digital output port. This
function is supported by the following models: KPXI-DIO-16-16, KPXI-DIO-48,
KPXI-RDI-8-16, KPXI-DIO-32-80M, KPXI-DIO-32-32, KPXI-DIO-64-0,
KPXI-DIO-0-64
KDIO_DO_ReadPort (ByVal CardNumber As Integer,
ByVal Port As Integer, Value As Long) As Integer
B-32Return to Section TopicsKPXI-DIO-900-01 Rev. A / January 2007
KPXI 48-Channel General Purpose Card User’s ManualAppendix B: KDIO-DRVR Function Reference
ParametersCardNumber: The card id number.
Port: Digital output port number.
Valid values:
KPXI-DIO-16-16: 0
KPXI-RDI-8-16: 0
KPXI-DIO-32-80M: 1 (auxiliary digital output port)
KPXI-DIO-32-32: 0, DIO32I32O_DO_LED
KPXI-DIO-64-0: DIO64I_DO_LED
KPXI-DIO-0-64: PORT_DO_LOW, PORT_DO_HIGH, DIO64O_DO_LED
KPXI-DIO-48: refer to the function KDIO_DI_ReadPort section.
Value: Returns the digital data read from the specified output port.
Valid values:
KPXI-DIO-16-16: 16-bit data
KPXI-DIO-48: 8-bit data
KPXI-RDI-8-16: 8-bit data
KPXI-DIO-32-80M: 4-bit data
KPXI-DIO-32-32: 32-bit data
KPXI-DIO-64-0: 32-bit data
KPXI-DIO-0-64: 32-bit data
DescriptionSets the specified digital output line in the specified digital port to the specified
state. This function is only available for these cards that support digital output
read-back functionality. This function is supported by the following models:
KPXI-DIO-16-16, KPXI-DIO-48, KPXI-RDI-8-16, KPXI-DIO-32-80M,
KPXI-DIO-32-32, KPXI-DIO-64-0, KPXI-DIO-0-64
KPXI-DIO-900-01 Rev. A / January 2007Return to Section TopicsB-33
Appendix B: KDIO-DRVR Function ReferenceKPXI 48-Channel General Purpose Card User’s Manual
KPXI-DIO-0-64: PORT_DO_LOW, PORT_DO_HIGH, DIO64O_DO_LED
KPXI-DIO-48: refer to the function KDIO_DI_ReadLine section.
Line: The digital line to write to.
Valid values:
KPXI-DIO-16-16: 0 through 15
KPXI-RDI-8-16: 0 through 7
KPXI-DIO-32-80M: 0 through 3
KPXI-DIO-32-32/KPXI-DIO-64-0/KPXI-DIO-0-64: 0 through 31
KPXI-DIO-48: refer to the function KDIO_DI_ReadLine section.