beautypg.com

Chapter 5 programming – National Instruments AT-MIO-16X User Manual

Page 8

background image

Table of Contents

© National Instruments Corporation

ix

AT-MIO-16X User Manual

Chapter 5
Programming

Register Programming Considerations........................................................... 5-1
Resource Allocation Considerations .............................................................. 5-1
Initializing the AT-MIO-16X ......................................................................... 5-2

Initializing the Am9513A ................................................................ 5-3

Programming the Analog Input Circuitry....................................................... 5-5

Single Conversions Using the SCONVERT or

EXTCONV* Signal ...................................................................... 5-5

Generating a Single Conversion ..................................................................... 5-6
Reading a Single Conversion Result .............................................................. 5-7
Programming Single-Channel Data Acquisition Sequence............................ 5-7
Programming Data Acquisition Sequences with Channel Scanning.............. 5-10

Continuous Channel Scanning Data Acquisition............................. 5-10

Interval-Channel Scanning Data Acquisition ................................................. 5-12

Data Acquisition Programming Functions ................................................................... 5-14

Clearing the Analog Input Circuitry............................................................... 5-14
Programming Single-Analog Input Channel Configurations ......................... 5-15
Programming Multiple-Analog Input Channel Configurations ..................... 5-15
Programming the Sample-Interval Counter.................................................... 5-16
Programming the Sample Counter(s) ............................................................. 5-17

Sample Counts 2 through 65,536 ..................................................... 5-18
Sample Counts Greater than 65,536 ................................................ 5-18

Programming the Scan-Interval Counter........................................................ 5-20
Applying a Trigger ......................................................................................... 5-21
Servicing the Data Acquisition Operation...................................................... 5-22
Resetting the Hardware after a Data Acquisition Operation .......................... 5-22

Resetting a Single Am9513A Counter/Timer.................................. 5-23

Programming the Analog Output Circuitry .................................................... 5-25
Cyclic Waveform Generation......................................................................... 5-26
Programmed Cycle Waveform Generation .................................................... 5-28
Pulsed Cyclic Waveform Generation ............................................................. 5-30
Waveform Generation Programming Functions ............................................ 5-32

Clearing the Analog Output Circuitry.............................................. 5-32
Selecting the Internal Update Counter ............................................. 5-32

Programming the Update-Interval Counter .................................................... 5-32
Programming the Waveform Cycle Counter.................................................. 5-34
Programming the Waveform Cycle Interval Counter .................................... 5-34

Servicing Update Requests .............................................................. 5-35

Programming the Digital I/O Circuitry......................................................................... 5-36
Programming the Am9513A Counter/Timer ................................................................ 5-37
RTSI Bus Trigger Line Programming Considerations ................................................. 5-37