National Instruments 6601, 6602 User Manual

DAQ

6601/6602 User Manual

High-Speed Counter/Timer for PCI or PXI Bus Systems
6601/6602 User Manual
January 1999 Edition
Part Number 322137B-01
http://www.natinst.com
National Instruments Corporate Headquarters
11500 North Mopac Expressway Austin, Texas 78759-3504 USA Tel: 512 794 0100

Worldwide Offices

Australia 03 9879 5166, Austria 0662 45 79 90 0, Belgium 02 757 00 20, Brazil 011 284 5011, Canada (Ontario) 905 694 0085, Canada (Québec) 514 694 8521, Denmark 45 76 26 00, Finland 09 725 725 11, France 0 1 48 14 24 24, Germany 089 741 31 30, Hong Kong 2645 3186, India 91805275406, Israel 03 6120092, Italy 02 413091, Japan 03 5472 2970, Korea 02 596 7456, Mexico (D.F.) 5 280 7625, Mexico (Monterrey) 8 357 7695, Netherlands 0348 433466, Norway 32 84 84 00, Singapore 2265886, Spain (Madrid) 91 640 0085, Spain (Barcelona) 93 582 0251, Sweden 08 587 895 00, Switzerland 056 200 51 51, Taiwan 02 2377 1200, United Kingdom 01635 523545
For further support information, see the Technical Support Resources appendix of this manual.
© Copyright 1999 National Instruments Corporation. All rights reserved.

Important Information

Warranty
The PCI-6601, PCI-6602, and PXI-6602 are warranted against defects in materials and workmanship for a period of one year from the date of shipment, as evidenced by receipts or other documentation. National Instruments will, at its option, repair or replace equipment that proves to be defective during the warranty period. This warranty includes parts and labor.
The media on which you receive National Instruments software are warranted not to fail to execute programming instructions, due to defects in materials and work man ship, for a peri od of 90 d ays from da te o f sh ipm ent, as evi denced by receipts or other documentation. National Instruments will, at its option, repair or replace software media that do not execute programming instructions if National Instruments receives noti ce of su ch defect s d uring th e warranty perio d. National Instruments does not warrant that the op eration of t he soft ware shall b e uni nterrup ted or erro r free.
A Return Material Authorization (RMA) number must b e ob tain ed fro m th e facto ry an d clearl y mark ed on t he outsi de of the package before any equipment wil l be accepted for warranty work. National Instruments will pay the shippi ng costs of returning to the owner parts which are covered by warran ty.
National Instruments believes that the information in this document is accurate. The document has been carefully reviewed for technical accuracy. In the event that technical or typographical errors exist, National Instruments reserves the right to make changes to subsequent editions of this document without prior notice to holders of this edition. The reader should consult National Instruments if errors are suspected. In no event shall National Instruments be liable for any damages arising out of or related to th is d ocum ent o r th e in form ation con tained in i t.
XCEPT AS SPECIFIED HEREIN
E
ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE BY FAULT OR NEGLIGENCE ON THE PART OF NATIONAL INSTRUMENTS SHALL BE LIMITED TO THE AMOUNT THERETOFORE PAID BY THE CUSTOMER OR INCIDENTAL OR CONSEQUENTIAL DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY THEREOF
National Instruments will apply regardless of the form of action, wh ether in con tract or tort , incl udin g n egli gen ce. Any action against National Instruments must be brought within one year after the cause of action accrues. National Instruments shall not be liable for any delay in performance due to causes beyond its reasonable control. The warranty provided herein does not cover damages, defects, malfuncti ons, or s ervice failur es caused by own er’s fai lure to fol low the National Instruments installation, operation, or maintenance instructions; owner’s modification of the product; owner’s abuse, misuse, or negligent acts; and power failure or surges, fire, flood, accident, actions of third parties, or other events outside reasonable control.
ATIONAL INSTRUMENTS WILL NOT BE LIABLE FOR DAMAGES RESULTING FROM LOSS OF DATA, PROFITS, USE OF PRODUCTS
. N
ATIONAL INSTRUMENTS MAKES NO WARRANTIES, EXPRESS OR IMPLIED, AND SPECIFICALLY DISCLAIMS
, N
USTOMER’S RIGHT TO RECOVER DAMAGES CAUSED
. C
. This limitation of the liability of
,
Copyright
Under the copyright laws, this publication may not be reproduced or transmitted in any form, electronic or mechanical, including photocopying, recording, storing in an information retrieval system, or translating, in whole or in part, without the prior written consent of National Instruments Corporation.
Trademarks
ComponentWorks™, CVI™, DAQCard™, DAQPad™, LabVIEW™, MITE™, natinst.com™, NI-DAQ™, PXI™, RTSI™,
SCXI
, and VirtualBench™ are trademarks of National Instruments Corporation.
Product and company names mentioned herein are trademarks or trade names of their respective companies.
WARNING REGARDING MEDICAL AND CLINICAL USE OF NATIONAL INSTRUMENTS PRODUCTS
National Instruments products are not designed with com ponent s and tes ting for a level o f reli ability suit abl e for use in or in connection with surgical implants o r as cri tical co m ponent s i n any li fe su pp ort sy stem s wh ose fail ure t o pe rform can reasonably be expected to cause s ignifi cant in ju ry to a hu m an. A ppli cations of Nation al In st rument s prod ucts involving medical or clinical treatment can create a pot enti al for d eath or bod ily i njury caused b y p rodu ct fail ure, o r by errors on the part of the user or application designer. Because each end-user system is customized and differs from National Instruments testing platforms and because a user or application designer may use National Instruments products in combination with other products in a m ann er no t ev alu ated or co ntem p lated b y N ati onal Ins trum ents , the user or application designer is ultimately responsible for verifying and validating the suitability of National Instruments products whenever National Instruments products are incorporated in a system or application, including, without limitation, the appropriate design , pr ocess and safet y level of such syst em or ap plicat io n.

Contents

About This Manual
How to Use the Manual Set...........................................................................................xi
Conventions Used in This Manual.................................................................................xii
Related Documentation........................................... .......................................................xii
Chapter 1 Introduction
About the 660x Devices.................................................................................................1-1
Using PXI with CompactPCI.........................................................................................1-1
What You Need to Get Started......................................................................................1-2
Unpacking...................................................................................................................... 1-3
Software Programming Choices....................................................................................1-3
National Instruments Application Software....................................................1-4
NI-DAQ Driver Software................................................................................1-4
Optional Equipment................................................ .......................................................1-6
Chapter 2 Installation and Configuration
Software Installation......................................................................................................2-1
Hardware Installation.....................................................................................................2-1
Device Configuration...................................................... ...............................................2-3
Chapter 3 Device Overview
Device Description ........................................................................................................3-1
Functionality..................................................................................................................3-3
Counter Applications.......................................................................................3-3
Simple Counting and Time Measurement.......................................................3-4
Event Counting .................................................................................3-4
Simple Event Counting.......................................................3-4
Gated-Event Counting........................................................3-5
Time Measurement ...........................................................................3-5
Single-Period Measurement ...............................................3-6
Single Pulse-Width Measurement......................................3-6
Two-Signal Edge-Separation Measurement.......................3-7
©
National Instruments Corporation v 6601/6602 User Manual
Contents
Simple Pulse and Pulse-Train Generation ......................................................3-8
Simple Pulse Generation ..................................................................3-8
Single Pulse Generation.....................................................3-8
Single-Triggered Pulse Generation.................................... 3-9
Retriggerable Single Pulse Generation ..............................3-9
Pulse-Train Generation.....................................................................3-10
Continuous Pulse-Train Generation...................................3-10
Frequency Shift Keying (FSK) ..........................................3-11
Buffered Counting and Time Measurements.................................................. 3-11
Buffered Event Counting..................................................................3-11
Buffered Period Measurement..........................................................3-12
Buffered Semiperiod Measurement..................................................3-13
Buffered Pulse-Width Measurement ................................................3-13
Buffered Two-Signal Edge-Separation Measurement...................... 3-14
Other Counter Applications............................................................................3-15
Pulse Generation for ETS.................................................................3-15
Buffered Periodic Event Counting ...................................................3-16
Frequency Measurement...................................................................3-16
Buffered Frequency Measurement ...................................................3-17
Finite Pulse-Train Generation ..........................................................3-17
Frequency Division...........................................................................3-18
Reciprocal Frequency Measurement ................................................ 3-18
Position Measurement..................................................................................... 3-18
Quadrature Encoders ........................................................................3-18
Two-Pulse Encoders........................... .................................. ............3-21
Miscellaneous Functions.................................................................................3-21
Filters................................................................................................3-21
Flexible Period and Frequency Measurements.................................3-23
Digital I/O..................................................................... ....................3-26
Prescaling.......................................... ................................................3-26
Simultaneous Arming of Counters...................................................3-27
Pad Synchronization.........................................................................3-27
Synchronous Counting Mode ........................................................... 3-29
When Synchronous Counting Mode Should Be Used ....... 3-30
When Synchronous Counting Should Not Be Used........... 3-31
Transfer Rates................................................................................................................3-32
6601/6602 User Manual vi
©
National Instruments Corporation
Chapter 4 Signal Connections
I/O Connector ................................................................................................................4-1
Output on Counter Pins ...................................................................................4-10
Counter Input Selections .................................................................................4-12
Signal Characteristics............................... .................................. .....................4-17
RTSI Bus Interface..........................................................................................4-17
Pull-Up and Pull-Down Connections ............................................................................4-19
Power Connections ........................................................................................................4-19
Field Wiring and Termination .......................................................................................4-19
Transmission Line Effects .................................................... .................................. .......4-20
Noise..............................................................................................................................4-21
Crosstalk ........................................................................................................................4-21
Inductive Effects............................................................................................................4-22
Appendix A Specifications
Contents
Board and RTSI Clocks ....................................................................4-18
RTSI Triggers .................................... ...............................................4-18
Appendix B Timing Specifications
Appendix C Block Diagram
Appendix D Technical Support Resources
Glossary
Index
©
National Instruments Corporation vii 6601/6602 User Manual
Contents

Figures

Figure 1-1. The Relationship between the Programming Environment,
NI-DAQ, and Your Hardware......................................................... ... ...1-5
Figure 3-1. Simple Event Counting.........................................................................3-5
Figure 3-2. Gated-Event Counting .......................................................................... 3-5
Figure 3-3. Single-Period Measurement..................................................................3-6
Figure 3-4. Single Pulse-Width Measurement.........................................................3-7
Figure 3-5. Two-Signal Edge-Separation Measurement .........................................3-7
Figure 3-6. Output Modes.......................................... ... ...........................................3-8
Figure 3-7. Single Pulse Generation........................................................................3-9
Figure 3-8. Single-Triggered Pulse Generation.......................................................3-9
Figure 3-9. Retriggerable Single Pulse Generation.................................................3-10
Figure 3-10. Continuous Pulse-Train Generation......................................................3-10
Figure 3-11. Frequency Shift Keying........................................................................3-11
Figure 3-12. Buffered Event Counting......................................................................3-12
Figure 3-13. Buffered Period Measurement..............................................................3-12
Figure 3-14. Buffered Semiperiod Measurement......................................................3-13
Figure 3-15. Buffered Pulse-Width Measurement.....................................................3-14
Figure 3-16. Buffered Two-Signal Edge-Separation Measurement.......................... 3-14
Figure 3-17. Pulse Generation for ETS .....................................................................3-15
Figure 3-18. Buffered Periodic Event Counting........................................................3-16
Figure 3-19. Frequency Measurement.......................................................................3-16
Figure 3-20. Buffered Frequency Measurement........................................................3-17
Figure 3-21. Finite Pulse-Train Generation................................ .. .............................3-17
Figure 3-22. Frequency Division...............................................................................3-18
Figure 3-23. Reciprocal Frequency Measurement..................................................... 3-18
Figure 3-24. Position Measurement for X1 Encoders ...............................................3-19
Figure 3-25. Position Measurement for X2 Encoders ...............................................3-19
Figure 3-26. Position Measurement for X4 Encoders ...............................................3-19
Figure 3-27. Channel Z Reload .................................................................................3-20
Figure 3-28. Two-Pulse Encoders .............................................................................3-21
Figure 3-29. Filters .......................... .................................................................... ......3-22
Figure 3-30. Counter 1 Used for Frequency and Period Measurements ................... 3-25
Figure 3-31. Counters 0 and 1 Used for Frequency and Period
Measurements Simultaneously .............................................................3-26
Figure 3-32. Prescaling.............................................. ................................................3-27
Figure 3-33. Counters 0 and 1 Using PFI_38 as Gate without
Pad Synchronization .............................................................................3-28
Figure 3-34. Counters 0 and 1 Using PFI_38 as Gate with
Pad Synchronization .............................................................................3-29
Figure 3-35. Without Synchronous Counting Mode .................................................3-30
Figure 3-36. With Synchronous Counting Mode ...................................................... 3-30
6601/6602 User Manual viii
©
National Instruments Corporation
Contents
Figure 4-1. Comprehensive Description of PFI Line Functionality
for 6601 Devices ...................................................................................4-2
Figure 4-2. Description of PFI Lines for Counter Applications
for 6601 Devices ...................................................................................4-3
Figure 4-3. Description of PFI Lines for Motion Encoder Applications
for 6601 Devices ...................................................................................4-4
Figure 4-4. Description of PFI Lines for DIO Applications
for 6601 Devices ...................................................................................4-5
Figure 4-5. Comprehensive Description of PFI Line Functionality
for 6602 Devices ...................................................................................4-6
Figure 4-6. Description of PFI Lines for Counter Applications
for 6602 Devices ...................................................................................4-7
Figure 4-7. Description of PFI Lines for Motion Encoder Applications
for 6602 Devices ...................................................................................4-8
Figure 4-8. Description of PFI Lines for DIO Applications
for 6602 Devices ...................................................................................4-9
Figure 4-9. Counter Input.........................................................................................4-12
Figure 4-10. Parallel and Series Termination ............................................................4-20
Figure 4-11. Crosstalk......................................... .................................. .....................4-21
Figure 4-12. Wiring to Minimize Inductive Effects...................................................4-22
Figure B-1. Counter SOURCE Minimum Period and Minimum Pulse Width ........B-1
Figure B-2. Counter GATE Minimum Pulse Width.................................................B-2
Figure B-3. Counter Source to Counter Out Timing................................................B-3
Figure C-1. 660x Block Diagram..............................................................................C-1

Tables

Table 1-1. Pins Used by the PXI-6602 Device.......................................................1-2
Table 3-1. Counter-Based Applications .................................................................3-3
Table 3-2. Properties of the Different Filter Settings .............................................3-23
Table 3-3. Period Measurements............................................................................3-23
Table 4-1. Signals That Can Be Driven onto the PFI Lines ..................................4-10
Table 4-2. Possible Selections for Counter Input ..................................................4-13
Table 4-3. Signals That Can Be Driven onto the RTSI Bus...................................4-18
Table 4-4. Pin Number of Associated GND on 68-Pin Connector Block .............4-23
Table B-1. Counter SOURCE Minimum Period and Minimum Pulse Width ........B-1
Table B-2. Counter GATE Minimum Pulse Width.................................................B-2
Table B-3. Counter Source to Counter Out Timing................................................B-3
©
National Instruments Corporation ix 6601/6602 User Manual

About This Manual

This manual describes the electrical and mechanical aspects of 660x devices, and contains information concerning their operation and programming. Unless otherwise noted, text applies to each 660x device, the PCI-6601, PCI-6602, and PXI-6602. The PCI and PXI implementations are the same in functionality; their primary difference is the bus interface.

How to Use the Manual Set

The 6601/6602 User Manual is one piece of the documentation set for your data acquisition (DAQ) system. You could have any of several types of documentation, depending on the hardware and software in your system. Use the different types of documentation you have as follows:
Your DAQ hardware user manuals—These manuals have detailed information about the DA Q hardware that plugs into or is connected to your computer. Use these manuals for hardware installation and configuration instructions, specification information about your DAQ hardware, and application hints.
Software documentation—Examples of software documentation you may have are the LabVIEW, LabWindows/CVI, and NI-DAQ documentation. After you set up your hardware system, use either the application software or the NI-DAQ documentatio n to help you write your application. If you have a large, complicated system, it is worthwhile to look through the software documentation before you configure your hardware.
Accessory installation guides or manuals—If you are using accessory products, read the terminal block and cable assembly installation guides or accessory board user manuals. They explain how to physically connect the relevant pieces of the system. Consult these guides when you are making your connections.
©
National Instruments Corporation xi 6601/6602 User Manual
About This Manual

Conventions

The following conventions are used in this manual:
<> Angle brackets containing numbers separated by an ellipsis represent a
range of values associated with a bit or signal name (for example,
DIO<0..7>). 6601 device Refers to the PCI-6601. 6602 device Refers to the PCI-6602 and PXI-6602, unless otherwise noted. 660x device Refers to the PCI-6601, PCI-6602 , and PXI-6602, unless otherwise noted. PCI-660x device Refers to the PCI-6601 and PCI-6602, unless otherwise noted. The symbol indicates that the text following it applies only to a specific
660x device.
This icon to the left of bold italicized text denotes a note, which alerts you
to important information.
!
bold Bold text denotes the names of menus, menu items, parameters, dialog
bold italic Bold italic text denotes a note, caution, or warning.
italic Italic text denotes emphasis, a cross reference, or an introduction to a key
This icon to the left of bold italicized text denotes a caution, which advises
you of precautions to take to avoid injury, data loss, or a system crash.
boxes, dialog box buttons or options, icons, windows, W indo ws 95/98/NT
tabs, or LEDs.
concept.
The Glossary lists abbreviations, acronyms, definitions, metric prefixes,
mnemonics, symbols, and terms.

Related Documentation

The following documents contain information that you may find helpful as
you read this manual:
Your computer’s technical reference manual
National Instruments PXI Specification, rev. 1.0
PICMG CompactPCI 2.0 R2.1 core specification
6601/6602 User Manual xii
©
National Instruments Corporation
Introduction
This chapter describes the 660x devices, lists what you need to get started, describes optional equipment, and explains how to unpack your device.

About the 660x Devices

Thank you for buying a National Instruments 660x device. The 660x devices are timing and digital I/O boards for use with the PCI bus in PC-compatible computers, or PXI or compactPCI chassis. The 6601 devices offer four 32-bit counter channels and up to 32 lines of individually configurable, TTL/CMOS-compatible digital I/O. The 6602 devices offer this capability plus four additional 32-bit counter channels.
The counter/timer channels have many measurement and generation modes such as event counting, time measurement, frequency measurement, encoder position measurement, pulse generation, and square-wave generation.
The 660x devices contain the National Instruments MITE PCI interface. The MITE offers bus-master operation, PCI burst transfers, and high-speed DMA controller(s) for continuous, scatter-gather DMA without requiring DMA resources from your computer. See the Using PXI with CompactPCI section in this chapter for more information on your PXI-6602 device.
1
For information on device functionality, see Chapter 3, Device Overview. For detailed 660x device specifications, see Appendix A, Specifications.

Using PXI with CompactPCI

Using PXI-compatible products with standard CompactPCI products is an important feature provided by the PXI Specification, rev. 1.0. If you use a PXI-compatible plug-in device in a standard CompactPCI chassis, you will be unable to use PXI-specific functions, but you can still use the basic plug-in device functions. For example, the RTSI bus on your PXI-6602 device is available in a PXI chassis, but not in a CompactPCI chassis.
©
National Instruments Corporation 1-1 6601/6602 User Manual
Chapter 1 Introduction
The CompactPCI specification permits vendors to develop sub-buses that
coexist with the basic PCI interface on the CompactPCI bus. Compatible
operation is not guaranteed between CompactPCI devices with different
sub-buses nor between CompactPCI devices with sub-buses and PXI. The
standard implementation for CompactPCI does not include these
sub-buses. Your PXI-6602 device will work in any standard CompactPCI
chassis adhering to the PICMG CompactPCI 2.0 R2.1 specification.
PXI specific features are implemented on the J2 connector of the
CompactPCI bus. T able 1-1 lists the J2 pins used by your PXI-6602 device.
Your PXI device is compatible with any CompactPCI chassis with a
sub-bus that does not drive these lines. Even if the sub-bus is capable of
driving these lines, the PXI device is still compatible as long as those pins
on the sub-bus are disabled by default and not ever enabled. Damage may
result if these lines are driven by the sub-bus.
Table 1-1.
PXI-6602 Signal PXI Pin Name PXI J2 Pin Number
RTSI Trigger (0..5)
RTSI Trigger (6) PXI Star D17 RTSI Cloc k PXI Trigger (7) E16 Reserved LBR (7, 8, 10, 11,
PXI Trigger (0..5) B16, A16, A17, A18, B18,
12)

What You Need to Get Started

To set up and use your 660x device, you will need the following:
One of the following devices:
PCI-6601
PCI-6602
PXI-6602
6601/6602 User Manual
Pins Used by the PXI-6602 Device
C18
A3, C3, E3, A2, B2
6601/6602 User Manual 1-2
©
National Instruments Corporation

Unpacking

Chapter 1 Introduction
One of the following software packages and documentation:
NI-DAQ for PC compatibles
LabVIEW for Windows
LabWindows/CVI
Shielded (SH68-68-D1) or ribbon (R6868) cableSCB-68, TBX-68, or CB-68LP connector blockYour computer, or a PXI or CompactPCI chassis and controller
Your 660x device is shipped in an antistatic package to prevent electrostatic damage to the device. Electrostatic discharge can damage several components on the device. To avoid such damage in handling the device, take the following precautions:
Ground yourself via a grounding strap or by holding a grounded object.
Touch the antistatic package to a metal part of your computer chassis before removing the device from the package.
Remove the device from the package and inspect the device for loose components or any sign of damage. Notify National Instruments if the device appears damaged in any way. Do not install a damaged device in your computer.
Never touch the exposed pins of connectors.
Store your 660x device in the antistatic envelope when not in use.

Software Programming Choices

There are several options to choose from when programming your National Instruments DAQ hardware. You can use LabVIEW, LabWindows/CVI, or NI-DAQ.
©
National Instruments Corporation 1-3 6601/6602 User Manual
Chapter 1 Introduction

National Instruments Application Software

LabVIEW features interactive graphics, a state-of-the art user interface, and a powerful graphical programming language. The LabVIEW Data Acquisition VI Library, a series of virtual instruments (VIs) for using LabVIEW with National Instruments DAQ hardware, is included with LabVIEW. The LabVIEW Data Acquisition VI Library is functionally equivalent to the NI-DAQ software.
LabWindo ws/CVI features interactive graphics and a state-of-the-art user interface, and uses the ANSI standard C programming language. The LabWindows/CVI Data Acquisition Library , a series of functions for using National Instruments DAQ hardware, is included with LabWindows/CVI. The LabWindows/CVI Data Acquisition Library is functionally equivalent to the NI-DAQ software.
Using LabVIEW or LabWindows/CVI software will greatly reduce the development time for your data acquisition and control application.

NI-DAQ Driver Software

The NI-DAQ driver software is included at no charge with all National Instruments DAQ hardware. NI-DAQ has an extensive library of functions that you can call from your application programming environment. These functions include routines for digital I/O, counter/timer operations, RTSI, and acquiring data to extended memory.
NI-DAQ has both high-level DAQ I/O functions for maximum ease of use and low-level DAQ I/O functions for maximum flexibility and performance. Examples for high-level functions are streaming data to disk or acquiring a certain number of data points. An example of a low-level function is writing directly to registers on the DAQ device. NI-DAQ does not sacrifice performance of National Instruments D AQ devices because it lets multiple devices operate at their peak performance, even simultaneously.
6601/6602 User Manual 1-4
©
National Instruments Corporation
Chapter 1 Introduction
NI-DA Q also internally addresses man y of the comple x issues between the computer and the DAQ hardware such as programming interrupts and DMA controllers. NI-DA Q maintains a consistent software interface so that you can change platforms with minimal modifications to your code. Whether you are using conventional programming languages or NI-DAQ software, your application uses the NI-DAQ driver software, as illustrated in Figure 1-1.
Conventional Programming
Environment
NI-DAQ
Driver Software
DAQ or
SCXI Hardware
ComponentWorks,
LabVIEW,
LabWindows/CVI,
or VirtualBench
Personal
Computer or
Workstation
Figure 1-1. The Relationship between the Programming Environment, NI-DAQ,
and Your Hardware
You can use your 660x device, together with other AT (16-bit ISA), PCI, PC, EISA, DAQCard, and DAQPad Series DAQ hardware, with NI-DAQ software for PC compatibles. The PCI-6602 and PXI-6602 require version 6.5 or later. The PCI-6601 requires version 6.6 or later.
©
National Instruments Corporation 1-5 6601/6602 User Manual
Chapter 1 Introduction

Optional Equipment

National Instruments offers the following accessories to use with your 660x device:
Shielded and unshielded 68-pin cables and screw terminals
Real Time System Integration (RTSI) bus cables For more specific information about these products, refer to the National
Instruments catalogue or web site, or call the office nearest you.
6601/6602 User Manual 1-6
©
National Instruments Corporation
Installation and Configuration
This chapter explains how to install and configure your 660x device.

Software Installation

Install your software before you install your 660x device. Refer to the appropriate release notes indicated below for specific instructions on the software installation sequence.
If you are using NI-DAQ, refer to your NI-DAQ release notes. Find the installation section for your operating system and follow the instructions given there.
If you are using LabVIEW, LabWindows/CVI, or other National Instruments software, refer to the appropriate release notes. After you have installed your application software, refer to your NI-DA Q release notes and follow the instructions given there for your operating system and application software package.
2

Hardware Installation

Note
©
National Instruments Corporation 2-1 6601/6602 User Manual
Install the software before you install your 660x device.
Following are general installation instructions for each device. Consult your computer or chassis user manual or technical reference manual for specific instructions and warnings about installing new devices in your computer or chassis.
PCI-6601, PCI-6602
You can install a PCI-660x in any available 5 V PCI expansion slot in your computer.
1. Turn off and unplug your computer.
2. Remove the top cover or access port to the expansion slots.
3. Remove the expansion slot cover on the back panel of the computer.
Chapter 2 Installation and Configuration
4. T ouch an y metal part of your computer chassis to discharge any static electricity that might be on your clothes or body.
5. Insert the PCI-660x into a 5 V PCI slot. It may be a tight fit, but do not force the device into place.
6. Screw the mounting bracket of the PCI-660x to the back panel rail of the computer.
7. Visually verify the installation.
8. Replace the top cover of your computer.
9. Plug in and turn on your computer.
Your PCI-660x is now installed. The device is now ready for software configuration.
PXI-6602
You can install a PXI-6602 in any available 5 V peripheral slot in your PXI or CompactPCI chassis.
Note The PXI-6602 has connections to several reserved lines on the CompactPCI
J2 connector. Before installing a PXI-6602 in a CompactPCI system that uses J2 connector lines for purposes other than PXI, see the Using PXI with
CompactPCI section in Chapter 1, Introduction.
1. Turn off and unplug your PXI or CompactPCI chassis.
2. Choose an unused PXI or CompactPCI 5 V peripheral slot. For maximum performance when using a non-PXI chassis, install the PXI-6602 in a slot that supports bus arbitration or bus-master cards. The PXI-6602 contains onboard bus-master DMA logic that can operate only in such a slot. If you choose a slot that does not support bus masters, you will have to disable the onboard DMA controller using your software. PXI-compliant chassis must have bus arbitration for all slots.
3. Remove the filler panel for the peripheral slot you have chosen.
4. Touch a metal part on your chassis to discharge any static electricity that might be on your clothes or body.
5. Insert the PXI-6602 in the selected 5 V slot. Use the injector/ejector handle to fully inject the device into place.
6. Screw the front panel of the PXI-6602 to the front panel mounting rails of the PXI or CompactPCI chassis.
7. Visually verify the installation.
8. Plug in and turn on the PXI or CompactPCI chassis.
Your PXI-6602 is now installed. You are now ready to configure your hardware and software.
6601/6602 User Manual 2-2
©
National Instruments Corporation

Device Configuration

Each 660x device is completely software configurable. The system software automatically allocates all device resources, including base memory address and interrupt level. These devices do not require DMA controller resources from your computer. You must assign a device number to your 660x device. Double-click on the Measurement & Automation icon—placed on your Windows desktop by NI-DAQ—to assign a device number to your device. The Measurement & Automation Explorer has online help if you need more information on how to assign a device number. Refer to device configuration instructions in your NI-DAQ documents and online help.
Chapter 2 Installation and Configuration
©
National Instruments Corporation 2-3 6601/6602 User Manual
Device Overview
This chapter provides an overview of the hardware functions of your 660x device.

Device Description

Each 660x device is a completely switchless, jumperless device and requires only software configuration. The 660x devices derive most of their functionality from the NI-TIO, a sophisticated, state-of-the-art counter and digital I/O ASIC developed by National Instruments. A 6601 device has one NI-TIO and offers four 32-bit up/down counters with prescalers. Each 6602 device has two NI-TIOs and offers eight such counters (see Appendix C, Block Diagram, for the architecture of a 660x device). The counters on 660x devices are a superset of the general-purpose counters on the DAQ-STC. The DAQ-STC counters are used on all National Instruments E Series devices.
The 660x counters offer backward compatibility with the DAQ-STC with regard to functionality and software programming. The same software API and functions are used to program the DA Q-STC general-purpose counters and the counters on the 660x devices. Because of greater resources and added functionality, new constants, parameters, and functions have been created for 660x counters. However, new functions exist to provide new functionality only—they will not affect code written for the DAQ-STC counters. In most cases, code written for the DAQ-STC general-purpose counters will work for the 660x counters.
3
The few changes needed within the National Instruments API are mostly due to different constants for I/O connector signals (PFI lines). For example, E Series devices can select any of PFI <0..9> as a source for the general-purpose counters. For 660x devices, the corresponding choices include PFI_39, PFI_35, and so on.
©
National Instruments Corporation 3-1 6601/6602 User Manual
Chapter 3 Device Overview
The counters on the 6601 device have two internal timebases: 100 kHz and 20 MHz. The counters on the 6602 devices have three internal timebases: 100 kHz, 20 MHz, and 80 MHz. Each counter has a gate, up/down, and source input. Each of these inputs can be an internal signal or an external signal that connects to the I/O connector. Each counter has an output signal that can provide output in two different modes: toggled output mode and pulsed output mode. For more information about these modes, refer to the
Simple Pulse Generation section later in this chapter.
In addition, the NI-TIO provides the 660x device with a 32-bit digital I/O (DIO) port. You can individually configure each line on this port for input or output and perform a read or a write upon a software command. Eight of these 32 lines are always available for DIO. The remaining 24 lines are shared with counters. You can configure these 24 lines for counter output or DIO output on an individual basis. You do not need to specify whether you are using the line for a counter application or for DIO if you are using it as an input.
Equipped with the NI-TIO, 660x devices also have other useful functions such as the ability to decode signals from motion encoders, and digital filtering on each line from the I/O connector.
With 660x devices, you can use your computer or chassis as a counter/timer that acts as a system timing controller or measurement instrument for laboratory testing, production testing, and industrial process monitoring and control.
6601/6602 User Manual 3-2
©
National Instruments Corporation

Functionality

This section describes the 660x counter applications and other miscellaneous functions offered by these devices.

Counter Applications

You can use the 660x device in the counter-based applications listed in Table 3-1. Following the table are detailed descriptions of each application.
Chapter 3 Device Overview
Table 3-1.
Application Class Application
Simple Counting and Time Measurement
Simple Pulse and Pulse-Train Generation
Buffered Counting and Time Measurement
Other Counter Applications
Simple event counting Gated-event counting Single-period measurement Single pulse-width measurement Two-signal edge-separation measurement
Single pulse generation Single-triggered pulse generation Retriggerable single pulse generation Continuous pulse-train generation Frequency shift keying (FSK)
Buffered event counting (continuous) Buffered period measurement (continuous) Buffered semiperiod measurement (continuous) Buffered pulse-width measurement (continuous) Buffered two-signal edge-separation measurement (continuous)
Pulse generation for Equivalent Time Sampling (ETS) Buffered periodic event counting (continuous) Frequency measurement Buffered frequency measurement (continuous) Finite pulse-train generation Frequency division Reciprocal frequency measurement
Counter-Based Applications
©
National Instruments Corporation 3-3 6601/6602 User Manual
Chapter 3 Device Overview
Table 3-1.
Application Class Application
Position Measurement Quadrature encoders
Two-pulse encoders
Miscellaneous Functions Filters
Flexible period and frequency measurements Digital I/O Prescaling Simultaneous arming of counters Pad synchronization Synchronous counting mode
Counter-Based Applications (Continued)

Simple Counting and Time Measurement

Event Counting
In the event-counting functions, the counter counts events on the SOURCE input after the counter has been armed. The counter can be armed via a software command or upon receiving a start trigger. The start trigger can be an internal or external signal. The following actions are available in event counting:
SOURCE increments or decrements the counter.
GATE may be used to indicate when to start and stop counting intervals or when to save the counter contents in the save register.
UP_DOWN controls the direction of the counting. When configured for hardware control of counting direction, the counter counts up when UP_DOWN is high and it counts down when UP_DOWN is low.
Simple Event Counting
In simple event counting, the counter counts the number of pulses that occur on the SOURCE signal after the counter has been armed. Software can read the counter contents at any time without disturbing the counting process. Figure 3-1 shows an example of simple event counting where the counter counts five events on SOURCE.
6601/6602 User Manual 3-4
©
National Instruments Corporation
SOURCE
Chapter 3 Device Overview
Counter Armed
Counter Value
1
0

Figure 3-1. Simple Event Counting

5432
Gated-Event Counting
Gated-event counting is similar to simple event counting except that the counting process is gated; counting is halted and resumed via the GATE signal. When GATE is active, the counter counts pulses that occur on the SOURCE signal after the counter has been armed. When GATE is inactive, the counter retains the current count value. Figure 3-2 shows an example of gated-event counting where the gate action allows the counter to count only five of the pulses on SOURCE.
Counter Armed
GATE
SOURCE
Counter Value

Figure 3-2. Gated-Event Counting

100 5432
Time Measurement
In the time-measurement functions, the counter uses SOURCE as a timebase to measure the time interval between events on the GATE signal. The following actions are available in time measurement:
Rising edges on SOURCE can increment or decrement the counter during the measurement interval. Typically, SOURCE is chosen to be an internal timebase and causes the counter to increment.
Counting can begin and end on any two of the GATE edges—active, inactive, or either.
The HW Sa ve re gister can sav e the counter value upon the completion of the measurement.
©
National Instruments Corporation 3-5 6601/6602 User Manual
Chapter 3 Device Overview
Single-Period Measurement
In single-period measurement, the counter uses SOURCE to measure the period of the signal present on the GATE input. The counter counts the number of rising edges that occur on SOURCE between two active edges of GATE. At the completion of the period interval for GATE, the HW Save register latches the counter value for the software read. Figure 3-3 shows a single-period measurement where the period of GATE is five SOURCE rising edges.
GATE
SOURCE
Note
Counter Value
HW Save Register
Figure 3-3.
103
2
Single-Period Measurement
4
5
5
Single Pulse-Width Measurement
In single pulse-width measurement, the counter uses SOURCE to measure the pulse width of the signal present on the GATE input. The counter counts the number of rising edges that occur on SOURCE while the GATE signal remains in an active state. At the completion of the pulse-width interval for GATE, the HW Save register latches the counter value for software read. Figure 3-4 shows a single pulse-width measurement where the pulse width of GATE is five SOURCE rising edges.
A pulse width measurement will be accurate even if the counter is armed while a pulse train is in progress. If a counter is armed while the pulse is in the active state, it will wait for the next transition to the active state for the measurement.
6601/6602 User Manual 3-6
©
National Instruments Corporation
GATE
SOURCE
Chapter 3 Device Overview
Counter Value
HW Save Register
0
1
354
2
5

Figure 3-4. Single Pulse-Width Measurement

Two-Signal Edge-Separation Measurement
Two-signal edge-separation measurement is similar to pulse-width measurement, except that there are two measurement signals: AUX_LINE and GATE. An active edge on AUX_LINE starts the counting and an active edge on GATE stops the counting. After the counter has been armed and an active edge has occurred on AUX_LINE, the counter counts pulses that occur on the SOURCE. Additional edges on the AUX_LINE are ignored. The counter stops counting upon receiving an active edge on the GATE and latches the value into the HW Save register. Figure 3-5 shows an example of two-signal edge-separation measurement.
You can use this type of measurement to count events or measure the time that occurs between edges on two signals. Outside of this manual, this type of measurement is sometimes referred to as start/stop trigger measurement, second gate measurement, or A-to-B measurement. The AUX_LINE and GATE can be internal or external signals. For external signals, the UP_DOWN pin associated with the counter is used for the AUX_LINE.
Counter
AUX_LINE
GATE
SOURCE
Counter Value
HW Save Register
Armed
000012345678888
Measured Interval

Figure 3-5. Two-Signal Edge-Separation Measurement

©
National Instruments Corporation 3-7 6601/6602 User Manual
Chapter 3 Device Overview

Simple Pulse and Pulse-Train Generation

Simple Pulse Generation
In the pulse generation functions, the counter generates a single pulse of a specified duration after the counter is armed. The following actions are available in pulse generation:
The counter uses SOURCE as a timebase to generate the pulse.
The user specifies the pulse parameters in terms of periods of the SOURCE input.
GATE can serve as a trigger signal to generate a pulse after the first active gate edge, or after each active gate edge.
The hardware provides an alternate output mode so that G_OUT outputs two counter TC pulses, instead of a single long pulse.
T wo output modes are a vailable on the 660x counters: toggled output mode and pulsed output mode. Each time a counter rolls over from either direction, it generates a pulse known as the terminal count (TC) pulse. In pulsed mode, this TC pulse is driven onto the output pin.
In toggled mode, the counter output changes state on the SOURCE edge that follows the assertion of the TC pulse. Figure 3-6 illustrates the two output modes for a pulse generation with a delay of two and a pulse width of four.
SOURCE
Pulsed Output
Mode
Toggled
Output
Mode
Single Pulse Generation
The single pulse generation function generates a single pulse with programmable delay and programmable pulse width after the counter is armed. The counter uses SOURCE as a timebase to generate the pulse—you specify the pulse delay and the pulse width in terms of periods of the SOURCE input. Figure 3-7 shows the generation of a single pulse with a pulse delay of four and a pulse width of three.
6601/6602 User Manual 3-8
Figure 3-6.
Output Modes
©
National Instruments Corporation
Chapter 3 Device Overview
Counter Armed
SOURCE
OUT

Figure 3-7. Single Pulse Generation

Single-Triggered Pulse Generation
Single-triggered pulse generation is similar to single pulse generation except that GATE provides a trigger function. An active GATE edge after the counter has been armed causes the counter to generate a single pulse with programmable delay and programmable pulse width. The counter ignores subsequent triggers. You specify the programmable parameters in terms of periods of the SOURCE input. Figure 3-8 shows the generation of a single pulse with a pulse delay of four and a pulse width of three.
GATE
SOURCE
OUT

Figure 3-8. Single-Triggered Pulse Generation

Retriggerable Single Pulse Generation
This function is similar to single-triggered pulse generation except that the counter generates a pulse on every active GATE edge after the counter has been armed. The counter ignores active gate edges that are received while the pulse generation is in progress. Each pulse, generated upon receiving a GATE edge, has the same programmable delay and pulse width. You specify these parameters in terms of periods of the SOURCE input. Figure 3-9 shows the generation of two pulses with a pulse delay of five and a pulse width of three.
©
National Instruments Corporation 3-9 6601/6602 User Manual
Chapter 3 Device Overview
GATE
SOURCE
OUT

Figure 3-9. Retriggerable Single Pulse Generation

Pulse-Train Generation
In the pulse-train generation functions, the counter generates a continuous stream of pulses of specified interval and duration after the counter has been armed. The following actions are available in pulse-train generation:
You can specify the pulse parameters in terms of periods of the SOURCE input.
The hardware has an alternate output mode as explained in the Simple
Pulse Generation section.
Note With a 50% duty cycle pulse train, you double the frequency if you use the pulsed
output mode.
Continuous Pulse-Train Generation
This function generates a train of pulses with programmable frequency and duty cycle. The counter uses SOURCE as a timebase to generate the pulses. You specify the programmable parameters in terms of periods of the SOURCE input. Figure 3-10 shows a pulse train. You can seamlessly change the frequency and/or duty cycle of the pulse train while the pulse train is in progress. The rate at which you can change these parameters depends on your system.
SOURCE
OUT

Figure 3-10. Continuous Pulse-Train Generation

6601/6602 User Manual 3-10
©
National Instruments Corporation
GATE
OUT
Chapter 3 Device Overview
Frequency Shift Keying (FSK)
FSK is similar to pulse-train generation in that the counter generates a train of pulses. However, in FSK mode, the GATE signal modulates the frequency and duty cycle of the output train. The counter implements this modulation by allowing the GATE signal to select from two different sets of pulse-train parameters. Figure 3-11 shows an example of FSK. When GATE is low, the counter generates a low-frequency signal with a long pulse width. When GATE is high, the counter generates a high-frequency signal with a short pulse width.
START
Figure 3-11.

Buffered Counting and Time Measurements

Buffered measurements are similar to their single measurement counterparts. However, multiple successive measurements are made. The result of each measurement is saved in the Hardware Sav e Register on each active edge of GATE. A buffered measurement generates a data stream. This data stream is transferred to your computer via DMA or interrupts. Y ou can make multiple b uffered measurements simultaneously . Up to three of the data streams thus generated can be transferred via DMA. Interrupts are used to transfer any additional data streams. These buffered measurements can be continuous. The maximum transfer rates for these buffered measurements are system dependent. See the Transfer Rates section later in this chapter for additional information.
Buffered Event Counting
Buffered event counting is similar to simple event counting except that the GATE signal indicates when to save the counter value to the HW Save register. The active GATE edge latches the count value into the HW Save register. Counting continues uninterrupted regardless of the GATE activity. Figure 3-12 shows buffered event counting where the GATE action causes the HW Save register to save the counter contents twice.
Frequency Shift Keying
©
National Instruments Corporation 3-11 6601/6602 User Manual
Loading...
+ 70 hidden pages