Using the Direct I/O COM API of DriverLINX for the KPCI-PIO24 or KPCI- PIO96 with LabWindows/CVI

Similar documents
Using the Direct I/O COM API of DriverLINX for the KPCI-PDISO8A or KPCI- PIO32IOA with LabWindows/CVI

Using Device Manager to determine available resources for ISA cards

Keithley KPCI-3160 Series

Keithley KPCI-ISO Series. Using DriverLINX with Your Hardware

Whitepaper VCI - Virtual CAN Interface How to use in LabWindows/CVI

User Guide. 980 DisplayPort Link Layer Sink Compliance Tests

SAS/ACCESS Interface to R/3

Temperature Measurements using the KPCI-3108 with the EXP-1800

Maintenance Coordinator RECURRING TASK INSTRUCTIONS

Learning the Pro/ENGINEER Interface

ENVI 5.0 Tutorial: A Quick Start to ENVI 5.0

2 The Stata user interface

Introduction to Windows

PUB. DIE A. Canon XF Utility. Instruction Manual. Macintosh. Version 1.2

Pre, Post and About Triggering

SWR Director. (Version 1.11)

TABLE OF CONTENTS. TECHNICAL SUPPORT APPENDIX Appendix A Formulas And Cell Links Appendix B Version 1.1 Formula Revisions...

2 TUTORIAL. Overview. VisualDSP Getting Started Guide 2-1 for SHARC DSPs

Service Minder Plus Features/Helpful Hints

Electrical System Functional Definition

TESTSTAND. Contents RELEASE NOTES. Version 2.0.1

PCMARS 2.5 ADDED FEATURES

GraphWorX64 Productivity Tips

980 HDMI 2.0 Protocol Analyzer UHDA Source Compliance Test

How to do a Property Search

Marthon User Guide. Page 1 Copyright The Marathon developers. All rights reserved.

Welcome Application. Introducing the Visual Studio.NET IDE. Objectives. Outline

3. IMPORTANT: When prompted, accept the default Installation directory.

Podium Plus Data Analysis Software. User Manual. SWIS10 Version

ME Week 4 Project 2 Assembly Interaction

3 TUTORIAL. In This Chapter. Figure 1-0. Table 1-0. Listing 1-0.

NEC Versa 4200 Windows 98 Upgrade Information

Boise State University Digital Systems Laboratory

Assignment 1. Application Development

FIREFOX MENU REFERENCE This menu reference is available in a prettier format at

Connecting to GroupWise using Mozilla Thunderbird

How to use CVI drivers for the Rohde & Schwarz CMU 200 Universal Radio Communication Tester

Simulator. Chapter 4 Tutorial: The SDL

InfoRecall in 20 Minutes Phantech Software

Sitecore Content Editing Guide. with any questions

Overview. CHAPTER 2 Using the SAS System and SAS/ ASSIST Software

User Guide 980 HDMI Protocol Analyzer Module HDMI & MHL Source Compliance Tests NEED TO UPDATE FOR MHL TEST RESULTS

Java Program Structure and Eclipse. Overview. Eclipse Projects and Project Structure. COMP 210: Object-Oriented Programming Lecture Notes 1

Getting Started with the LabWindows /CVI Real-Time Module

Introduction to Proteus

Microsoft Word - Templates

In the fourth unit you will learn how to upload and add images and PDF files.

Document Management System GUI. v6.0 User Guide

Actel Libero TM Integrated Design Environment v2.3 Structural Schematic Flow Design Tutorial

ACT-R Environment Manual

Client Based Duplicate Logic

Developer s Tip Print to Scale Feature in Slide

AVAYA ONE-X COMMUNICATOR SOFTPHONE (WINDOWS) USER GUIDE

State Diagram Tutorial. written by Pasquale A. Catalano 10/29/02

Guide to SiS RAID Utility for Windows XP / 2000

Electrical System Functional Definition

Developing Intelligent Apps

March 29, Display Information for a Selected Period and Teacher Change Class Data. 9. Scheduling Master Schedule (SMS) Builder

NI TestStand ATML Toolkit

TTWin 4 Quick Start Guide

Just Enough Eclipse What is Eclipse(TM)? Why is it important? What is this tutorial about?

Customizing Administration Tools in ClearCase 4.0 for Windows NT

Personal Radiation Detectors Data Collection and Processing Software User Guide

Keithley Instruments ExceLINX-3A ExceLINX software for the Model 2000 Release Note for Version C02 3/26/2015

The Galileo Desktop-Focalpoint 4.0. Table of Contents

Technical Note: Integrating a C-sense pco 2 Sensor to a Sea-Bird Electronics SBE 19 CTD

Working with Spectrum Tabs, Plots, and Charts

AGENT VIEW Taking calls

Sample Sessions. Portfolio Companies: Selecting a portfolio company founding date range and primary industry. Sample Session.

Virtual Memory Validator. by Software Verification

BaanERP 5.0c. User's Guide for Worktop 2.1

File Manager Trainer

How to set up a Default Printer

Enterprise Architect. User Guide Series. Tutorial. Author: Sparx Systems. Date: 26/07/2018. Version: 1.0 CREATED WITH

Introduction to the M16C Development Environment

EE261 Computer Project 1: Using Mentor Graphics for Digital Simulation

LabWindows /CVI Release Notes Version 9.0

Enterprise Architect. User Guide Series. Tutorial

ME009 Engineering Graphics and Design CAD 1. 1 Create a new part. Click. New Bar. 2 Click the Tutorial tab. 3 Select the Part icon. 4 Click OK.

Creating PLC Ladder Diagrams

Equipment Support Structures

GETTING STARTED 5 WORKING WITH CUTTING DEVICE SETUPS 11 TABLE OF CONTENTS. Basic elements of your software 5. Setup area 6 Job area 6

User's Guide. Alpha Five Accounting. Accounting Made Easy. Version 3.0. Copyright BetaSoft LLC - All Rights Reserved

RIVA / Athena Pro-Series ECU

3 Getting Started with Objects

2 Getting Started. Getting Started (v1.8.6) 3/5/2007

FRONTLINE TEST SYSTEM

Getting Started (1.8.7) 9/2/2009

NSCC SUMMER LEARNING SESSIONS MICROSOFT OFFICE SESSION

Operation Manual Aqua M300. Version and higher

Café Soylent Green Chapter 12

Equipment Support Structures

Customizing DAZ Studio

Getting Started with IVI Drivers

DeskCNC setup and operation manual

BrainMaster tm System Type 2E Module & Software for Windows tm. Session Librarian. futils.exe

SYS-ED/COMPUTER EDUCATION TECHNIQUES, INC. (File-AID ) IDX: Page 1

IGC Loader Configuration Tool USER S GUIDE

3 AXIS STANDARD CAD. BobCAD-CAM Version 28 Training Workbook 3 Axis Standard CAD

Chromatography Software Training Materials. Contents

Transcription:

Using the Direct I/O COM API of DriverLINX for the KPCI-PIO24 or KPCI- PIO96 with LabWindows/CVI DriverLINX drivers for digital I/O boards provides two programming interfaces: 1. Service Request API for hardware independence with other KPCI or PIO boards 2. Direct I/O COM API for simple, fast interaction with the registers of the digital I/O hardware COM objects are easily used from Visual Basic or from C++. Use of a COM object from a purely C language such as CVI requires a bit more work to build a proper interface layer into the object. Luckily, LabWindows/CVI provides an automated tool to greatly simplify creation of the interface layer. The resulting function panel file, *.fp, can then be used in conventional ways by CVI to make use of the function calls of the exposed object. Below is a step-by-step guide. The completed project is also available as an example program in the download center. Step 1: In the Tools menu, select 'Create ActiveX Automation Controller...'

Step 2: Scroll down the list until you see the Keithley Digital I/O Library. Select it and then click Next.

Step 3: Fill in a name for the target.fp file. Any name is fine; I used KPCIDIO (be sure to include the path to the location). Then click the Next button.

Step 4: the object will be analyzed by CVI and several output files will be built and placed into the directory location you specified. If any other dialogs present, accept the default values and click Next. When complete, the screen below will appear.

Step 5: Now to use the object. From this same session of CVI, the function panel will already be loaded in the Instrument Driver menu drop down. If starting a new session of CVI, first load the fp file.

Step 6: Notice the object has two classes: IKPCIPIO and IHardware. IKPCIPIO provides an 8255 interface: a control register and one register for each of three 8-bit digital ports. The IHardware class provides 32-bit register access to the KPCI-PIOxx card. The balance of this application note will refer to the IKPCIPIO class only. Highlight that class as shown below and then click the Select button.

Once the IKPCIPIO class has been selected, the member functions are visible. The important ones are New, OpenDevice, CloseDevice, Read and Write. This was just a preview of where we will be going, so hit the Cancel button for now.

Step 7: Create a project called testdirectio. Add the KPCIDIO.fp file to the project. Add also a uir file to the project. Place several buttons onto the user interface as shown below and create all the callback code stubs (a *.c file is created). In the call back for the Open Driver button, the Direct IO API will be initialized and a session opened for the installed board (the device number used in the DriverLINX Configuration Panel will be used). In the Read Port A button, the register corresponding to Port A will be read to obtain the logic 0 or 1 state of the 8-line channel. A value between 0 and 255 will result. In the Exit button, the driver will be closed.

Step 8: Here is what the project will look like with it's three files. Step 9: Let's use the fp file to add code to our.c file. Select the NewIKPCIPIO function of the IKPCIPIO class (not the IHardware class) and then click the Select button on the right.

Step 10: the screen below is presented to aid in the use of the function. Notice the variable Object Handle is not filled in with a value. This indicates it needs to be declared by you. Select this object with the mouse, and then ask CVI to declare the variable (Ctrl+D, or menu structure of Code or the short cut buttons). (The Status variable could also be declared for a more robust implementation that includes error checking, but for brevity, this is skipped in this application note.)

Step 11: The following dialog is presented for declaring our object handle variable. Fill in a variable name; I used mypio. Also check the box indicating the declaration should be added to the top of the target.c file for our project. Then click the OK button. Step 12: Notice the field is now filled in with the proper calling syntax (address of operator). In the.c file, verify the curser is within the callback function for the Open button, and then back on the screen below ask CVI to "insert function call" using the Code menu structure.

Step 13: Below is a screen shot of the callback for the open button in the.c file after two functions of the Direct IO COM object have been used. All subsequent methods of the Direct I/O object require the Object Handle obtained from the NewIKPCIPIO method. Notice the syntax used with the OpenDevice method (no & operator). Once the object has been created and the driver opened for the installed device, the Read and Write functions can be used to get data into and out of the KPCI card. You will need to know something of the 8255 architecture to know at what offsets (address) and what values to write. Below is a brief summary: Port A is at an offset of 0 Port B is at an offset of 1 Port C is at an offset of 2 The control register is at an offset of 3. Individual bits of this register control the input or output direction of the individual ports. Write a 0 to the bit to make the corresponding Port an output; write a 1 to make it an input. All ports are inputs by default at PC power-up or reset. If using only digital inputs, then the control register is not important for your application. bit 0...4 lower bits of Port C bit 1...Port B bit 2...not used, always zero bit 3...4 upper bits of Port C bit 4...Port A bit 5...not used, always zero bit 6...not used, always zero bit 7...not used, always 1 To make all ports outputs, write a hex value of 80 to the control register and then write to the registers for the individual ports to control their logic 0 or 1 state. Consult chapter 7 of the DriverLINX Tutorial Manual or the Using DriverLINX with your KPCI-PIO Series manual for more information. A complete CVI project is available in the download center of the www.keithley.com web site.