Summary of Contents for National Instruments PXI-6238
Page 1
(217) 352-9330 | Click HERE Find the National Instruments PXI-6238 at our website:...
Page 2
DAQ M Series NI 6238/6239 User Manual Isolated Current Input/Current Output Devices NI 6238/6239 User Manual July 2006 371913A-01 Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
Page 4
Instruments Corporation. National Instruments respects the intellectual property of others, and we ask our users to do the same. NI software is protected by copyright and other intellectual property laws. Where NI software may be used to reproduce software or other materials belonging to others, you may use NI software only to reproduce materials that you may reproduce in accordance with the terms of any applicable license or other legal restriction.
Page 5
NATIONAL INSTRUMENTS PRODUCTS ARE INCORPORATED IN A SYSTEM OR APPLICATION, INCLUDING, WITHOUT LIMITATION, THE APPROPRIATE DESIGN, PROCESS AND SAFETY LEVEL OF SUCH SYSTEM OR APPLICATION. Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
The NI 6238/6239 User Manual contains information about using the NI 6238 and NI 6239 M Series data acquisition (DAQ) devices with NI-DAQmx 8.1 and later. National Instruments 6238/6239 devices feature up to eight differential analog input (AI) channels, two analog output (AO) channels, two counters, six lines of digital input (DI), and four lines of digital output (DO).
Programs»National Instruments»NI-DAQ»DAQ Getting Started Guide. The NI-DAQ Readme lists which devices are supported by this version of NI-DAQ. Select Start»All Programs»National Instruments»NI-DAQ» NI-DAQ Readme. The NI-DAQmx Help contains general information about measurement concepts, key NI-DAQmx concepts, and common applications that are applicable to all programming environments.
NI-DAQmx Base VI Reference Help. The NI-DAQmx Base C Reference Help contains C reference and general information about measurement concepts. Select Start»All Programs» National Instruments»NI-DAQmx Base»Documentation»C Function Reference Manual. LabVIEW If you are a new user, use the Getting Started with LabVIEW manual to...
About This Manual tools. Refer to the following locations on the Contents tab of the LabVIEW Help for information about NI-DAQmx: • Getting Started»Getting Started with DAQ—Includes overview information and a tutorial to learn how to take an NI-DAQmx measurement in LabVIEW using the DAQ Assistant. •...
Chapter 1 Getting Started Device Specifications Refer to the NI 6238/6239 Specifications, available on the NI-DAQ Device Document Browser or , for more detailed information ni.com/manuals on NI 6238/6239 devices. Device Accessories and Cables NI offers a variety of accessories and cables to use with your DAQ device. Refer to Appendix A, Device-Specific Information, or...
Chapter 2 DAQ System Overview Isolation Barrier Analog Input AI GND Analog Output Digital Routing and Clock Interface AO GND Generation Digital Counters Isolators RTSI PFI/Static DI P0.GND PFI/Static DO P1.GND Figure 2-2. General NI 6238/6239 Block Diagram DAQ-STC2 The DAQ-STC2 implements a high-performance digital engine for NI 6238/6239 data acquisition hardware.
Chapter 2 DAQ System Overview Cables and Accessories NI offers a variety of products to use with NI 6238/6239 devices, including cables, connector blocks, and other accessories, as follows: • Cables and cable assemblies – Shielded – Unshielded ribbon • Screw terminal connector blocks, shielded and unshielded •...
Chapter 2 DAQ System Overview Programming Devices in Software National Instruments measurement devices are packaged with NI-DAQ driver software, an extensive library of functions and VIs you can call from your application software, such as LabVIEW or LabWindows/CVI, to program all the features of your NI measurement devices. Driver software...
Page 26
Chapter 3 Connector Information Table 3-1. I/O Connector Signals (Continued) Signal Name Reference Direction Description AO GND — — Analog Output Ground—AO GND is the reference for AO <0..1>. AI GND and AO GND are connected on the device. Note: AI GND and AO GND are isolated from earth ground, chassis ground, P0.GND, and P1.GND.
Chapter 4 Analog Input for all input ranges. The NI-PGIA can amplify or attenuate an AI signal to ensure that you use the maximum resolution of the ADC. M Series devices use the NI-PGIA to deliver high accuracy even when sampling multiple channels with small input ranges at fast rates.
Chapter 4 Analog Input Isolation Barrier AI + AI – – – AI GND AI GND Figure 4-2. Analog Current Input Connection Method 1 Method 2 Method 2, shown in Figure 4-3, ties the AI – input to AI GND. When measuring current up to 20 mA, this type of connection ensures that the voltage level on both the positive and negative side are within the common-mode input range for NI 6238/6239 devices.
Page 33
Chapter 4 Analog Input Instrumentation Amplifier Current Sense PGIA Resistor Measured in– Voltage AI GND – R × Gain • Figure 4-5. NI 6238/6239 PGIA Analog input ground-reference setting refers to the reference that the PGIA measures against. Differential is the only ground-reference setting for NI 6238/6239 analog input signals, which means that the PGIA always measures the voltages between AI + and AI –...
The capacitance of the cable also can increase the settling time. National Instruments recommends using individually shielded, twisted-pair wires that are 2 m or less to connect AI signals to the device.
Chapter 4 Analog Input Analog Input Data Acquisition Methods When performing analog input measurements, you either can perform software-timed or hardware-timed acquisitions. Hardware-timed acquisitions can be buffered or non-buffered. Software-Timed Acquisitions With a software-timed acquisition, software controls the rate of the acquisition.
Chapter 4 Analog Input mainly to AI signal routing to the device, although they also apply to signal routing in general. Minimize noise pickup and maximize measurement accuracy by using individually shielded, twisted-pair wires to connect AI signals to the device.
Page 41
Chapter 4 Analog Input When this calculation results in the sampling rate exceeding 35 kHz, there is not enough time between samples to acquire both channels and still add a 10 μs delay per channel, so the Convert Clock rate becomes the sampling rate multiplied by the number of channels being acquired.
Chapter 4 Analog Input You can specify an internal or external source for ai/SampleClock. You also can specify whether the measurement sample begins on the rising edge or falling edge of ai/SampleClock. Using an Internal Source One of the following internal signals can drive ai/SampleClock. •...
Chapter 4 Analog Input • RTSI <0..7> • Input PFI <0..5> • PXI_STAR ai/SampleClockTimebase is not available as an output on the I/O connector. ai/SampleClockTimebase is divided down to provide one of the possible sources for ai/SampleClock. You can configure the polarity selection for ai/SampleClockTimebase as either rising or falling edge.
Chapter 4 Analog Input ai/ConvertClockTimebase ai/SampleClock ai/ConvertClock Delay Convert From Period Sample Clock Figure 4-12. ai/SampleClock and ai/ConvertClock Other Timing Requirements The sample and conversion level timing of M Series devices work such that clock signals are gated off unless the proper timing requirements are met. For example, the device ignores both ai/SampleClock and ai/ConvertClock until it receives a valid ai/StartTrigger signal.
Chapter 4 Analog Input AI Start Trigger Signal Use the AI Start Trigger (ai/StartTrigger) signal to begin a measurement acquisition. A measurement acquisition consists of one or more samples. If you do not use triggers, begin a measurement with a software command. After the acquisition begins, configure the acquisition to stop under the following conditions: •...
Chapter 4 Analog Input Using a Digital Source To use ai/ReferenceTrigger with a digital source, specify a source and an edge. The source can be any of the following signals: • Input PFI <0..5> • RTSI <0..7> • PXI_STAR The source also can be one of several internal signals on your DAQ device. Refer to Device Routing in MAX in the NI-DAQmx Help or the LabVIEW 8.x Help for more information.
Chapter 5 Analog Output DACs. It allows you to download the points of a waveform to your M Series device without host computer interaction. AO Sample Clock The AO Sample Clock signal reads a sample from the DAC FIFO and generates the AO voltage.
Chapter 5 Analog Output the buffer at a fast enough rate to keep up with the generation, the buffer will underflow and cause an error. Analog Output Triggering Analog output supports two different triggering actions: • Start trigger • Pause trigger A digital trigger can initiate these actions.
Chapter 5 Analog Output Using a Digital Source To use ao/StartTrigger, specify a source and an edge. The source can be one of the following signals: • A pulse initiated by host software • Input PFI <0..5> • RTSI <0..7> •...
Chapter 5 Analog Output You also can specify whether the samples are paused when ao/PauseTrigger is at a logic high or low level. Routing AO Pause Trigger Signal to an Output Terminal You can route ao/PauseTrigger out to RTSI <0..7>. AO Sample Clock Signal Use the AO Sample Clock (ao/SampleClock) signal to initiate AO samples.
Chapter 5 Analog Output ao/SampleClockTimebase is not available as an output on the I/O connector. You might use ao/SampleClockTimebase if you want to use an external sample clock signal, but need to divide the signal down. If you want to use an external sample clock signal but do not need to divide the signal, then you should use ao/SampleClock rather than ao/SampleClockTimebase.
Chapter 6 Digital Input and Output Connecting Digital I/O Signals The DI signals P0.<0..5> are referenced to P0.GND and DO signals P1.<0..3> are referenced to P1.GND. Figures 6-1 and 6-2 show P0.<0..5> and P1.<0..3> on the NI 6238 and the NI 6239 device, respectively.
Chapter 6 Digital Input and Output Table 6-1. NI 6238/6239 Logic Conventions Logic Device NI 6238 (Source) P1.GND P1.VCC NI 6239 (Sink) P1.VCC P1.GND Getting Started with DIO Applications in Software You can use NI 6238/6239 devices in the following digital I/O applications: •...
Chapter 7 Counters Counter Armed Pause Trigger (Pause When Low) SOURCE Counter Value Figure 7-3. Single Point (On-Demand) Edge Counting with Pause Trigger Buffered (Sample Clock) Edge Counting With buffered edge counting (edge counting using a sample clock), the counter counts the number of edges on the Source input after the counter is armed.
Chapter 7 Counters Pulse-Width Measurement In pulse-width measurements, the counter measures the width of a pulse on its Gate input signal. You can configure the counter to measure the width of high pulses or low pulses on the Gate signal. You can route an internal or external periodic clock signal (with a known period) to the Source input of the counter.
Chapter 7 Counters Single Period Measurement With single period measurement, the counter counts the number of rising (or falling) edges on the Source input occurring between two active edges of the Gate input. On the second active edge of the Gate input, the counter stores the count in a hardware save register and ignores other edges on the Gate and Source inputs.
Chapter 7 Counters Buffered Semi-Period Measurement In buffered semi-period measurement, on each edge of the Gate signal, the counter stores the count in a hardware save register. A DMA controller transfers the stored values to host memory. The counter begins counting when it is armed. The arm usually occurs between edges on the Gate input.
Chapter 7 Counters Intervals Measured … Gate 1 2 ... N 1..N … 1..N Source Buffered Period Measurement + … N × Average Period of F1 = K × Ft Frequency of F1 = + … N Figure 7-12.
Chapter 7 Counters Signal to SOURCE Measure (F1) COUNTER 0 Signal of Known SOURCE Frequency (F2) COUNTER 1 GATE 3 … N CTR_0_SOURCE (Signal to Measure) CTR_0_OUT Interval (CTR_1_GATE) to Measure CTR_1_SOURCE Figure 7-14. Method 3 Then route the Counter 0 Internal Output signal to the Gate input of Counter 1.
Chapter 7 Counters Table 7-2. Frequency Measurement Method Comparison Measures High Measures Low Number of Frequency Frequency Number of Measurements Signals Signals Method Counters Used Returned Accurately Accurately Poor Good Many Fair Good 1 or 2 Good Poor Good Good For information on connecting counter signals, refer to the Default Counter Terminals...
Chapter 7 Counters Channel Z behavior—when it goes high and how long it stays high—differs with quadrature encoder designs. You must refer to the documentation for your quadrature encoder to obtain timing of channel Z with respect to channels A and B. You must then ensure that channel Z is high during at least a portion of the phase you specify for reload.
Chapter 7 Counters Counter Armed Measured Interval GATE SOURCE Counter Value HW Save Register Figure 7-20. Single Two-Signal Edge-Separation Measurement Buffered Two-Signal Edge-Separation Measurement Buffered and single two-signal edge-separation measurements are similar, but buffered measurement measures multiple intervals. The counter counts the number of rising (or falling) edges on the Source input occurring between an active edge of the Gate signal and an active edge of the Aux signal.
Chapter 7 Counters GATE (Start Trigger) SOURCE Figure 7-23. Single Pulse Generation with Start Trigger Retriggerable Single Pulse Generation The counter can output a single pulse in response to each pulse on a hardware Start Trigger signal. The pulses appear on the Counter n Internal Output signal of the counter.
Chapter 7 Counters Frequency Generation You can generate a frequency by using a counter in pulse train generation mode or by using the frequency generator circuit. Using the Frequency Generator The frequency generator can output a square wave at many different frequencies.
Chapter 7 Counters frequency of the system. Figure 7-28 shows an example of pulse generation for ETS; the delay from the trigger to the pulse increases after each subsequent Gate active edge. GATE D2 = D1 + ΔD D3 = D1 + 2ΔD Figure 7-28.
Chapter 7 Counters Counter n Gate Signal The Counter n Gate signal can perform many different operations depending on the application including starting and stopping the counter, and saving the counter contents. Routing a Signal to Counter n Gate Each counter has independent input selectors for the Counter n Gate signal. Any of the following signals can be routed to the Counter n Gate input.
Chapter 7 Counters waiting for the Gate signal when it is armed. Counter output operations can use the arm signal in addition to a start trigger. Software can arm a counter or configure counters to be armed on a hardware signal. Software calls this hardware signal the Arm Start Trigger. Internally, software routes the Arm Start Trigger to the Counter n HW Arm input of the counter.
Chapter 7 Counters Counter Triggering Counters support three different triggering actions—arm start, start, and pause. Arm Start Trigger To begin any counter input or output function, you must first enable, or arm, the counter. Software can arm a counter or configure counters to be armed on a hardware signal.
Chapter 7 Counters The filter setting for each input can be configured independently. On power up, the filters are disabled. Figure 7-29 shows an example of a low-to-high transition on an input that has its filter set to 125 ns (N = 5). RTSI, PFI, or PXI_STAR Terminal Filtered input goes high...
Chapter 7 Counters Rising Edge of Gate Counter detects rising edge of Gate on the next rising edge of Source. Gate Source Counter Value Buffer Figure 7-31. Duplicate Count Prevention Example On the first rising edge of the Gate, the current count of 7 is stored. On the next rising edge of the Gate, the counter stores a 2 since two Source pulses occurred after the previous rising edge of Gate.
Chapter 7 Counters counter value and Counter n Internal Output signals change synchronously to the 80 MHz Timebase. Note that duplicate count prevention should only be used if the frequency of the Source signal is 20 MHz or less. When To Use Duplicate Count Prevention You should use duplicate count prevention if the following conditions are true.
Chapter 7 Counters Source Synchronize Count Figure 7-35. Other Internal Source Mode External Source Mode In external source mode, the device generates a delayed Source signal by delaying the Source signal by several nanoseconds. The device synchronizes signals on the rising edge of the delayed Source signal, and counts on the following rising edge of the source, as shown in Figure 7-36.
Chapter 8 Isolation Barrier Timing Signals Digital PFI <6..9>/P1.<0..3> Isolators Static DO Buffer Figure 8-2. NI 6238/6239 PFI Output Circuitry When a terminal is used as a timing input or output signal, it is called PFI x (where x is an integer from 0 to 9). When a terminal is used as a static digital input or output, it is called P0.x or P1.x.
Chapter 8 I/O Connector PFI 0 PFI 2 PFI 0 PFI 2 Source Source P0.GND M Series Device Figure 8-3. PFI Input Signals Connections PFI Filters You can enable a programmable debouncing filter on each PFI, RTSI, or PXI_STAR signal. When the filters are enabled, your device samples the input on each rising edge of a filter clock.
Chapter 8 Consult the device specifications for details. However, you should avoid these fault conditions by following these guidelines. • Do not connect any digital output line to any external signal source, ground signal, or power supply. • Understand the current requirements of the load connected to the digital output lines.
Page 114
Chapter 8 P1.VCC Buffer P1.0 P1.GND P1.<0..3> Digital Isolators P1.1 P1.GND P1.GND P0.0 P0.GND P0.GND Figure 8-6. NI 6239 Digital I/O Connections (DO Sink) Caution Exceeding the maximum input voltage or maximum working voltage ratings, which are listed in the NI 6238/6239 Specifications, can damage the DAQ device and the computer.
Chapter 9 Isolation and Digital Isolators The non-isolated ground is connected to the chassis ground of the PC or chassis where the device is installed. Each isolated ground is not connected to the chassis ground of the PC or chassis. The isolated ground can be at a higher or lower voltage relative to the non-isolated ground.
Chapter 10 Digital Routing and Clock Generation Caution RTSI signals are not isolated from the chassis. 80 MHz Timebase The 80 MHz Timebase can be used as the Source input to the 32-bit general-purpose counter/timers. The 80 MHz Timebase can be generated from either of the following. •...
Digital Routing and Clock Generation • Share trigger signals between devices Many National Instruments DAQ, motion, vision, and CAN devices support RTSI. In a PCI system, the RTSI bus consists of the RTSI bus interface and a ribbon cable. The bus can route timing and trigger signals between several functions on as many as five DAQ, vision, motion, or CAN devices in the computer.
Chapter 10 Digital Routing and Clock Generation Using RTSI Terminals as Timing Input Signals You can use RTSI terminals to route external timing signals to many different M Series functions. Each RTSI terminal can be routed to any of the following signals. •...
Chapter 10 Digital Routing and Clock Generation PXI_CLK10 PXI_CLK10 is a common low-skew 10 MHz clock reference clock for synchronization of multiple modules in a PXI measurement or control system. The PXI backplane is responsible for generating PXI_CLK10 independently to each peripheral slot in a PXI chassis. PXI Triggers A PXI chassis provides eight bused trigger lines to each module in a system.
Page 127
Chapter 10 Digital Routing and Clock Generation When a PFI input is routed directly to RTSI, or a RTSI input is routed directly to PFI, the M Series device does not use the filtered version of the input signal. Refer to the KnowledgeBase document, Digital Filtering with M Series and CompactDAQ, for more information about digital filters and counters.
Generation, for more information on PXI clock and trigger signals. PXI and PXI Express NI PXI-6238/6239 modules can be installed in any PXI chassis and most slots of PXI Express chassis. PXI specifications are developed by the PXI System Alliance ).
DMA is a method to transfer data between the device and computer memory without the involvement of the CPU. This method makes DMA the fastest available data transfer method. National Instruments uses DMA hardware and software technology to achieve high throughput rates and to increase system utilization.
Chapter 11 Bus Interface Interrupt Request (IRQ) IRQ transfers rely on the CPU to service data transfer requests. The device notifies the CPU when it is ready to transfer data. The data transfer speed is tightly coupled to the rate at which the CPU can service the interrupt requests.
Page 133
Chapter 12 Triggering You also can program your DAQ device to perform an action in response to a trigger from a digital source. The action can affect the following. • Analog input acquisition • Analog output generation • Counter behavior NI 6238/6239 User Manual 12-2 ni.com...
Appendix A Device-Specific Information AI 0+/CAL+ AI 0– AI 1– AI 1+ AI GND AI 2+ AI 2– AI 3– AI 3+ AI GND AI 4+ AI 4– AI 5– AI 5+ CAL– AI 6+ AI 6– AI 7+ AI 7– AO POWER SUPPLY AO 0 AO 1...
Page 136
Refer to for other accessory options including new devices. ni.com Screw Terminal National Instruments offers several styles of screw terminal connector blocks. Use an SH37F-37M cable to connect an NI 6238 device to a connector block, such as the following: •...
Page 137
Appendix A Device-Specific Information vision, and motion devices. Since PXI devices use PXI backplane signals for timing and synchronization, no cables are required. Cables In most applications, you can use the following cables: • SH37F-37M-x—37-pin female-to-male shielded I/O cable, UL Listed derated to 30 Vrms, 42.4 V , or 60 VDC •...
Page 139
Refer to for other accessory options including new devices. ni.com Screw Terminal National Instruments offers several styles of screw terminal connector blocks. Use an SH37F-37M cable to connect an NI 6239 device to a connector block, such as the following: •...
Page 141
Troubleshooting This section contains some common questions about M Series devices. If your questions are not answered here, refer to the National Instruments KnowledgeBase at . It contains thousands of documents that ni.com/kb answer frequently asked questions about NI products.
Appendix B Troubleshooting In an isolated device, leaving the AI GND terminal unconnected will cause the signal to drift and eventually rail. How can I use the AI Sample Clock and AI Convert Clock signals on an M Series device to sample the AI channel(s)? M Series devices use ai/SampleClock and ai/ConvertClock to perform interval sampling.
Technical Support and Professional Services Visit the following sections of the National Instruments Web site at for technical support and professional services: ni.com • Support—Online technical support resources at ni.com/support include the following: – Self-Help Resources—For answers and solutions, visit the...
Page 145
Appendix C Technical Support and Professional Services • Calibration Certificate—If your product supports calibration, you can obtain the calibration certificate for your product at ni.com/calibration If you searched and could not find the answers you need, contact ni.com your local office or NI corporate headquarters. Phone numbers for our worldwide offices are listed at the front of this manual.
Page 147
Glossary 1. Analog input. 2. Analog input channel signal. AI GND Analog input ground signal. AI SENSE Analog input sense signal. analog A signal whose amplitude can have a continuous range of values. analog input signal An input signal that varies smoothly over a continuous range of values, rather than in discrete steps.
Page 149
Glossary cascading Process of extending the counting range of a counter chip by connecting to the next higher counter. European emissions control standard. channel Pin or wire lead to which you apply or from which you read the analog or digital signal.
Page 151
Glossary data transfer A technique for moving digital data from one system to another. Options for data transfer are DMA, interrupt, and programmed I/O. For programmed I/O transfers, the CPU in the PC reads data from the DAQ device whenever the CPU receives a software signal to acquire a single data point.
Page 153
Glossary FIFO First-In-First-Out memory buffer—A data buffering technique that functions like a shift register where the oldest values (first in) come out first. Many DAQ products and instruments use FIFOs to buffer digital data from an A/D converter, or to buffer the data before or after bus transmission.
Page 155
Glossary impedance 1. The electrical characteristic of a circuit expressed in ohms and/or capacitance/inductance. 2. Resistance. Inch or inches. instrument driver A set of high-level software functions that controls a specific GPIB, VXI, or RS232 programmable instrument or a specific plug-in DAQ device. Instrument drivers are available in several forms, ranging from a function callable language to a virtual instrument (VI) in LabVIEW.
Page 157
National Instruments. NI-DAQ The driver software needed to use National Instruments DAQ devices and SCXI components. Some devices use Traditional NI-DAQ (Legacy); others use NI-DAQmx. NI-DAQmx The latest NI-DAQ driver with new VIs, functions, and development tools for controlling measurement devices.
Page 159
The time from the rising to the falling slope of a pulse (at 50% amplitude). A rugged, open system for modular instrumentation based on CompactPCI, with special mechanical, electrical, and software features. The PXIbus standard was originally developed by National Instruments in 1997, and is now managed by the PXIbus Systems Alliance. PXI Express PCI Express eXtensions for Instrumentation—The PXI implementation of...
Page 160
RTSI Real-Time System Integration. RTSI bus Real-Time System Integration bus—The National Instruments timing bus that connects DAQ devices directly, by means of connectors on top of the devices, for precise synchronization of functions. Seconds. Samples.
Page 161
Glossary SCXI Signal Conditioning eXtensions for Instrumentation—The National Instruments product line for conditioning low-level signals within an external chassis near sensors so that only high-level signals are sent to DAQ devices in the noisy PC environment. sensor A device that responds to a physical stimulus (heat, light, sound, pressure, motion, flow, and so on), and produces a corresponding electrical signal.
Page 163
Glossary trigger 1. Any event that causes or starts some form of data capture. 2. An external stimulus that initiates one or more instrument functions. Trigger stimuli include a front panel button, an external input voltage pulse, or a bus trigger command. The trigger may also be derived from attributes of the actual signal to be acquired, such as the level and slope of the signal.
Page 170
7-8 multiple device synchronization, 10-3 single, 7-8 PFI, 8-1 connecting input signals, 8-3 exporting timing output signals using PFI National Instruments support and terminals, 8-3 services, C-1 filters, 8-4 NI 6238 using terminals as static digital I/Os, 8-3 accessory options, A-3...