Instruction/ maintenance manual of the product NI 6239 National Instruments
Go to page of 172
DAQ M Series NI 6238/6239 User Manual Isolated Current Input/Current Output Devices NI 6238/6239 User Manual July 2006 371913A-01.
Support Worldwide Technical Support and Product Info rmation ni.com National Instruments Corporate Headquarters 11500 North Mopac Expressway Aust in, Texas 78759-3504 USA Tel: 512 683 0100 Worldwide O.
Important Information Warranty The NI 6238/6239 is warranted against defects in materi als a nd workmanship for a period of three years from the date o f ship ment, as evidenced by receipts or other documentati on. National Instruments wil l, at its option, repair or replace equipment that proves to be defect ive during the warranty period.
NATIONAL INSTRUMENTS PRODUCTS ARE IN CORPORATED IN A SYSTEM OR APPLICATION, INC LUDING, WITHOUT LIMITATION, THE APPROPRIATE DESIGN, PROC ESS AND SAFETY LEVEL OF SUCH SYSTEM OR APPLI CATION.
© Nationa l Instrum ents Cor poratio n v NI 6238/ 6239 Use r Manu al Contents About This M anual Conventions . ....................... ................. ...................... ................. ............................. ...... x iii Related Documentation.
Contents NI 6238/6 239 User M anual vi ni.com Chapter 4 Analog Inpu t Analog Input Circuitry ..... ............................ ....................... ................. ......................... 4-1 Analog Input Range ................ ...............
Contents © Nationa l Instrum ents Cor poratio n vii NI 6238/ 6239 Use r Manu al AI Pause Trigger Signal ........ ................. ...................... ................. .................. 4-24 Using a Digital Source .................. ............
Contents NI 6238/6 239 User M anual viii ni.com Chapter 7 Counters Counter Input Ap plicati ons .......... ................ ....................... ................. ......................... 7-3 Counting Edges .............. ................ ........
Contents © Nationa l Instrum ents Cor poratio n ix NI 6238/6239 Us er Ma nual Counter Timing Sig nals ............................ ....................... ................. ............................ . 7-26 Counter n Source Signal ........ ........
Contents NI 6238/6 239 User M anual x ni.com Chapter 8 PFI Using PFI Terminals as T iming Input Signals ......... ................. ...................... .............. 8-2 Exporting Timing Outp ut Signals Using PFI Terminals ...................... .
Contents © Nationa l Instrum ents Cor poratio n xi NI 6238/6239 Us er Ma nual Chapter 11 Bus Interface DMA Controllers ........................... ....................... ................. ...................... ................. . 11-1 PXI Considerations .
© National Instruments Corporation xiii NI 6238/6239 User Manual About This Manual The NI 6238/6239 User Manual co ntains informatio n about u sing the NI 6238 and NI 6239 M Series data acquisiti on (D A Q) devices with NI-D A Qm x 8.
About This Manual NI 6238/6239 User Manual xiv ni.com italic Italic text denotes variables, emphasis , a cross-reference, or an introduction to a key concept. Italic te xt also deno tes text that is a placeholder for a word or v alue that you must supply .
About This Manual © National Instruments Corporation xv NI 6238/6239 User Manual The C Function Reference Help describes functions and attributes. The NI-D AQmx for Linux Configuration Guide provi des conf iguration instructions, templates, and instructions for using test panels.
About This Manual NI 6238/6239 User Manual xvi ni.com tools. Refer to the following locations on the Contents tab of the LabVIEW Help for info rmation ab out NI-DA Qm x: • Getting St arted»Gett ing.
About This Manual © National Instruments Corporation xvii NI 6238/6239 User Manual .NET Languages without NI Application Software The NI Measurement Studio Help contains function reference and measurement concepts for using th e Measurement Studio NI-D A Qmx .
© National Instruments Corporatio n 1-1 NI 6238/6239 User Manual 1 Getting Started M Series NI 6238/6 239 devices feature ei ght dif ferential analog input (AI) channels, two analog output (A O) channels, two counters, six lines of digital input (DI), and four lines of digital ou tput (DO).
Chapter 1 Getting Started NI 6238/6239 User Manual 1-2 ni.com Device Specifications Refer to the NI 6238/6239 Specifications , av ailable on the NI-D A Q Device Document Br o wser or ni.com/manuals , fo r more detailed inf ormation on NI 6238/6239 devices.
© National Instruments Corporatio n 2-1 NI 6238/6239 User Manual 2 DAQ System Over view Figure 2-1 sho w s a typical D A Q sy st em, which includes sensors, transducers, cables that connect the various de vices to the accessories, the M Series de vice, programming softw are , and PC.
Chapter 2 DAQ System Over view NI 6238/6239 User Manual 2-2 ni.com Figure 2-2. General NI 6238/62 39 Block Diagram DAQ-STC2 The D A Q-STC 2 implements a high-performan ce digital engine for NI 6 238/6239 data acquisit ion hardware.
Chapter 2 DAQ System Overview © National Instruments Corporatio n 2-3 NI 6238/6239 User Manual Calibration Circuitr y The M Series analog inputs and output s can self calibrate to correct gain and offset errors . Y ou can calibrate the de vice to minimize AI and A O errors caused by time and temperatur e drift at run time.
Chapter 2 DAQ System Over view NI 6238/6239 User Manual 2-4 ni.com Cables and Accessories NI offers a v ariety of produ cts to use with NI 6238/6239 devices, including cables, connector blocks, and ot.
Chapter 2 DAQ System Overview © National Instruments Corporatio n 2-5 NI 6238/6239 User Manual Programming Devices in Software National Instruments measurement de vices are packaged with NI-D A Q dri.
© National Instruments Corporatio n 3-1 NI 6238/6239 User Manual 3 Connector Information The I/O Connector Si gnal Descriptions and RTSI Connector Pinou t sections contain information on M Series connectors. Refer to Appendix A, Device-Specific In formation , for device I/O connector pinouts.
Chapter 3 Connector Information NI 6238/6239 User Manual 3-2 ni.com A O GND — — Analog Output Ground —A O GND is t he refere nce for A O <0..1>. AI GND and A O GND are connected on the dev ice. Note: AI GND and AO GND are isolated from earth ground, chassis ground, P0.
Chapter 3 Connector Information © National Instruments Corporatio n 3-3 NI 6238/6239 User Manual R TSI Connector Pinout Refer to the RTSI Connector Pinout section of Chapter 10, Digital Routing and Clock Generation , for information on the R TSI connector .
© National Instruments Corporatio n 4-1 NI 6238/6239 User Manual 4 Analog Input Figure 4-1 shows the analog input circuitry of NI 6238 and NI 6239 devices. Figure 4-1. NI 6238/6239 Analog Input Cir cuitry Analog Input Circuitr y I/O Connector Y ou can connect analog input signals to the M Series device through the I/O connector .
Chapter 4 Analog Inpu t NI 6238/6239 User Manual 4-2 ni.com for all input ranges. The NI-PGIA can am plify or attenuate an AI signal to ensure that you use the maximum resolu tion of the ADC. M Series de vices use the NI-PGIA to deliver high accurac y ev en when sampling multiple channels with small input ranges at fast rates.
Chapter 4 Analog Input © National Instruments Corporatio n 4-3 NI 6238/6239 User Manual M Series de vices use a calibration me thod that requires som e codes (typically about 5% o f the codes) to lie outside of the speci fied range.
Chapter 4 Analog Inpu t NI 6238/6239 User Manual 4-4 ni.com 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.
Chapter 4 Analog Input © National Instruments Corporatio n 4-5 NI 6238/6239 User Manual Note that AI GND must always be connected to some voltage le vel. AI GND is the reference that NI 6238/6239 devices measure against. The NI 6238 and NI 6239 are isolated devices with isolation ratings up to 60 VDC/30 Vrms.
Chapter 4 Analog Inpu t NI 6238/6239 User Manual 4-6 ni.com Figure 4-5. NI 623 8/6239 PGIA Analog input gr oun d-r efer ence sett ing refers to the reference that the PGIA measures against.
Chapter 4 Analog Input © National Instruments Corporatio n 4-7 NI 6238/6239 User Manual Caution The maximum input voltages rating of AI signals with respect to AI GND (and for differential signals with respect to each other) and earth/chassis ground are listed in th e Maximum W orking V oltag e section of t he NI 6238/6239 S pecifications .
Chapter 4 Analog Inpu t NI 6238/6239 User Manual 4-8 ni.com Multichannel Scanning Considerations M Series de vices can scan multiple chan nels at high rate s and digitize the signals accurately . Ho wev er , you should consider sev e ral issues when designing your measurement system to ensure the high accuracy of your measurements.
Chapter 4 Analog Input © National Instruments Corporatio n 4-9 NI 6238/6239 User Manual For e xample, suppose all channels in a system use a –20 to 20 mA input range. The signals on channels 0, 2, and 4 vary between 18 and 19 mA. The signals on channels 1, 3, and 5 vary between –18 and 0 m A.
Chapter 4 Analog Inpu t NI 6238/6239 User Manual 4-10 ni.com Analog Input Data Acquisition Methods When performing analog input m easurements, you eit her can perform software-timed or hard ware-timed acquisitions. Hard ware-timed acquisitions can b e buf f ered or non-buf fered.
Chapter 4 Analog Input © National Instruments Corporation 4-11 NI 6238/6239 User Manual samples has been written out, the generation stops. If you use a reference trigger , you must use finite sample mode. Continuous acquisitio n refers to the acquisition of an unspeci fied number of samples.
Chapter 4 Analog Inpu t NI 6238/6239 User Manual 4-12 ni.com mainly to AI signal rou ting to the device, although they also apply to signal routing in general. Minimize noise pickup and maximi ze measurement accurac y by using individually shielded, twisted-pair wire s to connect AI signals to the device.
Chapter 4 Analog Input © National Instruments Corporation 4-13 NI 6238/6239 User Manual M Series de vices use ai/SampleClock and ai/Conv ertC lock to perform interval sampling. As Figure 4-8 sh ows, ai/SampleClock controls the sample period, which is determined by the following equation: 1/Sample Period = Samp le Rate Figure 4-8.
Chapter 4 Analog Inpu t NI 6238/6239 User Manual 4-14 ni.com When this calculation resu lts in the sampling rate e xceeding 35 kH z, there is not enough time betw een samples to acquire both chann els.
Chapter 4 Analog Input © National Instruments Corporation 4-15 NI 6238/6239 User Manual example, four . The value decrements with each pulse on ai/SampleClock, until the v alue reaches zero. The sample counter is then loaded with the number of posttriggered samples, in this example, three.
Chapter 4 Analog Inpu t NI 6238/6239 User Manual 4-16 ni.com Y ou can specify an internal or extern al source for ai/SampleClock. Y o u also can specify whether the measurement sa mple begins on the rising edge or falling edge of ai/SampleClock. Using an Inte rnal Source One of the follo wing internal signals can dri ve ai/SampleClock.
Chapter 4 Analog Input © National Instruments Corporation 4-17 NI 6238/6239 User Manual Other Timing Requirements Y our DA Q device only acquires data during an acquisition. The device ignores ai/SampleClock when a measurem ent acquisition is not in progress.
Chapter 4 Analog Inpu t NI 6238/6239 User Manual 4-18 ni.com •R T S I < 0 . . 7 > • Input PFI <0..5> •P X I _ S T A R ai/SampleClockT imebase is not availabl e as an output on the I/O connector . ai/SampleClockT imebase is divided do wn to provide one of the possible sources for ai/SampleClock.
Chapter 4 Analog Input © National Instruments Corporation 4-19 NI 6238/6239 User Manual finished. It then reloads itself in pr eparation for the next ai/SampleClock pulse. Using an External Source Use one of the f ollowing external sign als as the source of ai/Con vertClock: • Input PFI <0.
Chapter 4 Analog Inpu t NI 6238/6239 User Manual 4-20 ni.com Figure 4-12. ai/Sa mpleClock and ai/ConvertClock Other Timing Requirements The sample and con version lev el timing of M Series device s work such that clock signals are gated of f unless the proper timing requir ements are met.
Chapter 4 Analog Input © National Instruments Corporation 4-21 NI 6238/6239 User Manual Figure 4-13. S ingle External S ignal Driving ai/SampleClock and ai/ConvertCloc k Simultaneously AI Convert Clo.
Chapter 4 Analog Inpu t NI 6238/6239 User Manual 4-22 ni.com AI Start T rigger Signal Use the AI Start T rigger (ai/StartTri gger) signal to be gin a measurement acquisition. A measurement acq uisition consists of one or more samples. If you do not use triggers, begin a meas urement with a so ftware command.
Chapter 4 Analog Input © National Instruments Corporation 4-23 NI 6238/6239 User Manual complete description of the use of ai/StartT rigger and ai/ReferenceTrigger in a pretriggered D A Q operation. AI Reference T rigger Signal Use a reference trigger (ai/ReferenceT ri gger) signal to stop a measurement acquisition.
Chapter 4 Analog Inpu t NI 6238/6239 User Manual 4-24 ni.com Using a Digital Source T o use ai/ReferenceT rigger with a di gital source, specify a source and an edge. The source can be an y of the follo wing signals: • Input PFI <0..5> •R T S I < 0 .
Chapter 4 Analog Input © National Instruments Corporation 4-25 NI 6238/6239 User Manual Routing AI Pause T rigger Signal to an Output Te r m i n a l Y ou can ro ute ai/PauseT rigger ou t to R TSI <0..7>. Note Pause triggers are only sensiti ve to th e le vel of the source, not the edge.
© National Instruments Corporatio n 5-1 NI 6238/6239 User Manual 5 Analog Output NI 6238/6239 devices ha ve two A O chann els controlled by a single clock and capable of wav efo rm generation. Figure 5-1 shows the analog current output circuitry of NI 6238 and NI 6239 de vices.
Chapter 5 Analog Output NI 6238/6239 User Manual 5-2 ni.com D ACs. It allows you to do wnload the points of a wa veform to your M Series device without host computer interaction. AO Sample Clock The A O Sample Clock signal reads a sample from the D A C FIFO and generates the A O voltage.
Chapter 5 Analog Output © National Instruments Corporatio n 5-3 NI 6238/6239 User Manual Non-Buffered In non-buf f ered acquisitions, data i s written dir ectly to the DA Cs on the device. T ypically , hardware-timed, non -b uffered operations are used to write single samples with good latency and known time increments between them.
Chapter 5 Analog Output NI 6238/6239 User Manual 5-4 ni.com the buf fer at a fast enough rate to k e ep up with the generation, the buff er will underflo w and cause an error . Analog Output T riggering Analog output supports two different triggering actions: • Start tr igger • Pause trigger A digital trigger can initiate these actions.
Chapter 5 Analog Ou tput © National Instruments Corporatio n 5-5 NI 6238/6239 User Manual Maximum W orking V oltag e section of t he NI 6238/6239 S pecifications . Exceeding the maximum input supply voltage or maximum working voltage of A O signals distorts the measurement results.
Chapter 5 Analog Output NI 6238/6239 User Manual 5-6 ni.com Using a Digital Source T o use ao/StartT rigger , specify a sour ce and an edge. The source can be one of the following signals: • A pulse initi ated by host software • Input PFI <0..5> •R T S I < 0 .
Chapter 5 Analog Output © National Instruments Corporatio n 5-7 NI 6238/6239 User Manual onboard clock, the generation resumes as so on as the pause trig ger is deasserted, as shown in Figure 5-4.
Chapter 5 Analog Output NI 6238/6239 User Manual 5-8 ni.com Y ou also can specify whether the samples are paused when ao/PauseT rigger is at a logic high or low le vel. Routing AO Pause T rigge r Signal to an Output Te r m i n a l Y ou can ro ute ao/PauseT rigger ou t to R TSI <0.
Chapter 5 Analog Output © National Instruments Corporatio n 5-9 NI 6238/6239 User Manual Other Timing Requirements A counter on your device internally generates ao/SampleClock unless you select some external source. ao/StartT r igger starts the counter and either the software or hardware can stop it afte r a f inite generation completes.
Chapter 5 Analog Output NI 6238/6239 User Manual 5-10 ni.com ao/SampleClockT imebase is not av ailable as an output on the I/O connector . Y ou might use ao/SampleClockT imebase if you want to use an e xternal sample clock signal, but need to divide the signal do wn.
© National Instruments Corporatio n 6-1 NI 6238/6239 User Manual 6 Digital Input and Output NI 6238/6239 devices hav e six static digita l input lines, P0.<0..5>. These lines also can be used as PFI inputs. In addition , the NI 6238/623 9 devices ha ve four static digi tal output lines, P1.
Chapter 6 Digital Input and Output NI 6238/6239 User Manual 6-2 ni.com 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..
Chapter 6 Digital Input and Output © National Instruments Corporatio n 6-3 NI 6238/6239 User Manual Figure 6-2. NI 6239 Digital I/O Co nnections (DO Sink) Caution Exceeding the maximum input voltage or maximum working v oltage ratings, which are listed in the NI 6238/6239 Specifications , can damage the D A Q device and the computer .
Chapter 6 Digital Input and Output NI 6238/6239 User Manual 6-4 ni.com Getting Started with DIO Applications in Software Y ou can use NI 6238/ 6239 devices in the follo wing digital I/O applications: .
© National Instruments Corporatio n 7-1 NI 6238/6239 User Manual 7 Counters NI 6 238/6239 devices hav e two general-purpose 32-bi t counter/timers and one frequency generator , as shown in Figure 7-1. The general-purpose counter/timers can be used for many measurement and pulse generation applications.
Chapter 7 Counters NI 6238/6239 User Manual 7-2 ni.com Figure 7-1. M Series Counters The counters have se ven input signals, although in most applications onl y a fe w inputs are used. For information on connecting co unter signals, refer to the Default Counter Terminals section.
Chapter 7 Counters © National Instruments Corporatio n 7-3 NI 6238/6239 User Manual Counter Input Applications Counting Edges In edge counting appl ications, the co unter counts edges on its Source after the counter is armed. Y ou can conf igure the counter to count risi ng or falling edges on its Source input.
Chapter 7 Counters NI 6238/6239 User Manual 7-4 ni.com Figure 7-3. Single Point (On-Demand) Edge Counting with Pause T rigger Buffered (Sample Clock) Edge Counting W ith buffered edge counting (edge counting using a sample clock), the counter counts the nu mber of edges on the Source input after the counter is armed.
Chapter 7 Counters © National Instruments Corporatio n 7-5 NI 6238/6239 User Manual Non-Cumulative Buffe red Edge Counting Non-cumulativ e edge counting is similar to buf f ered (sample clock) edge counting. Ho wev er, the counter resets after each acti ve edge of the Sample Clock.
Chapter 7 Counters NI 6238/6239 User Manual 7-6 ni.com Pulse-Width Measurement In pulse-width measuremen ts, the counter measures the width of a pulse on its Gate input signal. Y ou can configur e the counter to measure the width of high pulses or low pulses on the Gate signal.
Chapter 7 Counters © National Instruments Corporatio n 7-7 NI 6238/6239 User Manual The counter counts the number of edges o n the Source input whi le the Gate input remains acti ve. On each trailing ed ge of the Gate signal, the counter stores the count in a hardware sa ve re gi ster .
Chapter 7 Counters NI 6238/6239 User Manual 7-8 ni.com Single Period Measurement W ith sing le period measurement, the counter counts the num ber of rising (or falling) edges on the Source inp ut occurring between two activ e edges of the Gate input.
Chapter 7 Counters © National Instruments Corporatio n 7-9 NI 6238/6239 User Manual Figure 7-9. Buffered Period Measu rement Note that if you are using an external signal as the Source, at least one Source pulse should occu r between each acti ve edge of the Gate signal.
Chapter 7 Counters NI 6238/6239 User Manual 7-10 ni.com Buffered Semi-Period Measurement In b uffered semi-period measurement, on each edge of the Gate signal, the counter stores the count in a hardware sa ve register . A DMA con troller transfers the stored v a lues to host memory .
Chapter 7 Counters © National Instruments Corporation 7-11 NI 6238/6239 User Manual Y ou can route the signal to measure (F1) to the Gate of a counter . Y ou can route a kno wn timebase (Ft) to th e Source of the counter . The known timebase can be 80MHzT imebase.
Chapter 7 Counters NI 6238/6239 User Manual 7-12 ni.com Figure 7-12. Method 1b Method 2—Measure High Frequency with T wo Counters In this method, you measure one pul se of a known width using your signal and deri ve the frequency of your signal fr om the result.
Chapter 7 Counters © National Instruments Corporation 7-13 NI 6238/6239 User Manual Figure 7-13. Method 2 Method 3—Measure Large Range of Frequencies Using T wo Counters By using two counters, yo u can accurately measure a signal that might be high or low frequency .
Chapter 7 Counters NI 6238/6239 User Manual 7-14 ni.com Figure 7-14. Method 3 Then route the Counter 0 Internal Output signal to the Gate input of Counter 1. Y ou can route a signal of kno wn frequenc y (F2) to the Counter 1 Source input. F2 can be 80MHzTimebase.
Chapter 7 Counters © National Instruments Corporation 7-15 NI 6238/6239 User Manual 80 MHz T imebase. Y our measurement may return 1600 ±1 cycles depending on the phase of the signal with respect to the timebase. As your frequency becomes larger , this error of ±1 c ycle becomes more significant; T able 7-1 illustrates thi s point.
Chapter 7 Counters NI 6238/6239 User Manual 7-16 ni.com For information on connecting co unter signals, refer to the Default Counter Terminals section. Position Measurement Y ou can use the coun ters to perform position measurements with quadrature encoders or two-pulse encoders.
Chapter 7 Counters © National Instruments Corporation 7-17 NI 6238/6239 User Manual Figure 7-15. X1 Encoding X2 Encoding The same behavior holds for X2 encodi ng ex cept the counter increments or decrements on each edge of channel A, depending on which channel leads the other .
Chapter 7 Counters NI 6238/6239 User Manual 7-18 ni.com Channel Z behavior—when it goes high and how long it stays high—differs with quadrature encoder designs. Y ou mu st refer to the documentation for your quadrature encoder to obtain timing of channe l Z with respect to channels A and B.
Chapter 7 Counters © National Instruments Corporation 7-19 NI 6238/6239 User Manual For information on connecting co unter signals, refer to the Default Counter Terminals section.
Chapter 7 Counters NI 6238/6239 User Manual 7-20 ni.com Figure 7-20. Single T wo-Signal Edge-Separation Measurement Buffered T wo-Signal Edge- Separation Measurement Buffered and single two-signal edge-sep aration measurements are similar , but b uffered measurement m easures multiple interv als.
Chapter 7 Counters © National Instruments Corporation 7-21 NI 6238/6239 User Manual Counter Output Applications Simple Pulse Generation Single Pulse Generation The counter can output a single pulse. The pulse appears on the Counter n Internal Output sign al of the counter .
Chapter 7 Counters NI 6238/6239 User Manual 7-22 ni.com Figure 7-23. Single Pulse Generation with Start T rigger Retriggerable Single Pulse Generation The counter can output a single pulse in response to each pulse on a hardware Start T rigger signal.
Chapter 7 Counters © National Instruments Corporation 7-23 NI 6238/6239 User Manual Pulse T rain Generation Continuous Pulse T rain Generation This function generates a train of pul ses with program mable frequency and duty cycle. The pulses appear on the Counter n Internal Output signal of the counter .
Chapter 7 Counters NI 6238/6239 User Manual 7-24 ni.com Frequency Generation Y ou 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 wav e at many different frequencies.
Chapter 7 Counters © National Instruments Corporation 7-25 NI 6238/6239 User Manual Frequenc y Output can be routed out to an y output PFI <6..9> or R TSI <0.
Chapter 7 Counters NI 6238/6239 User Manual 7-26 ni.com frequency of the system. Figure 7-28 sho ws an example of pulse generation for ETS; the delay from the trigger to the pulse increases after each subsequent Gate activ e edge.
Chapter 7 Counters © National Instruments Corporation 7-27 NI 6238/6239 User Manual performing. T abl e 7-3 lists how this terminal is used in various applications. Routing a Signal to Counter n Source Each counter has independent input selectors fo r the Counter n Source signal.
Chapter 7 Counters NI 6238/6239 User Manual 7-28 ni.com Counter n Gate Signal The Counter n Gate signal can perform many dif ferent operations depending on the application includi ng starting and stopping the counter, and saving the counter contents.
Chapter 7 Counters © National Instruments Corporation 7-29 NI 6238/6239 User Manual • ai/StartTrigger •P X I _ S T A R In addition, Count er 1 Internal Output , Counter 1 Gate, Coun ter 1 Source, or Counter 0 Gate can be routed to Counter 0 Aux.
Chapter 7 Counters NI 6238/6239 User Manual 7-30 ni.com waiting for the Gate signal wh en it is armed. Coun ter output operation s 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.
Chapter 7 Counters © National Instruments Corporation 7-31 NI 6238/6239 User Manual Routing Frequency Output to a T erminal Y ou can route Frequenc y Output to an y output PF I <6.
Chapter 7 Counters NI 6238/6239 User Manual 7-32 ni.com Counter T riggering Counters support three different trigge ring actions—arm st art, start, and pause. Arm Start T rigger T o begin any counter input or output function, you must first enable, or arm, the counter .
Chapter 7 Counters © National Instruments Corporation 7-33 NI 6238/6239 User Manual Other Counter Features Cascading Counters Y ou can int ernally route the Count er n Internal Output and Counter n TC signal of each counter to the Gate inputs of the other counter .
Chapter 7 Counters NI 6238/6239 User Manual 7-34 ni.com The filter setting for each input can be conf igured independently . On power up, the filters are disabled. Figure 7- 29 shows an example of a lo w-to-high transition on an input that has its filter set to 125 ns (N = 5).
Chapter 7 Counters © National Instruments Corporation 7-35 NI 6238/6239 User Manual Figure 7-30. Pres caling Prescaling is intended to be used for frequency measurement where the measurement is made on a continu ous, repetitiv e signal.
Chapter 7 Counters NI 6238/6239 User Manual 7-36 ni.com Figure 7-31. Duplicate Count Pr evention Example On the first rising edge of the G ate, 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 pre vious rising edge of Gate.
Chapter 7 Counters © National Instruments Corporation 7-37 NI 6238/6239 User Manual Figure 7-32. Duplicate Count Example Example Application That Pr events Duplicate Count W ith duplicate count prevention enabled, the counter synchronizes both th e Source and Gate signals to the 80 MHz T imeb ase.
Chapter 7 Counters NI 6238/6239 User Manual 7-38 ni.com counter value and Counter n Internal Output signals change synchronously to the 80 MHz T i mebase. Note that duplicat e count prev ention should o nly be used if the frequency of the Source signal is 20 MH z or less.
Chapter 7 Counters © National Instruments Corporation 7-39 NI 6238/6239 User Manual Otherwise, the mode depends on the signal that drives Counter n Source.
Chapter 7 Counters NI 6238/6239 User Manual 7-40 ni.com Figure 7-35. Other Internal Sour ce Mode External Source Mode In external source mode, the de vice generates a delayed Source signal by delaying the Source signal by se veral nanoseconds.
© National Instruments Corporatio n 8-1 NI 6238/6239 User Manual 8 PFI NI 6238/6239 devices ha ve 10 Programmable Function Interface (PFI) signals—six input si gnals and four outpu t signals. Each PFI <0..5>/P0.<0..5> can be configured as a timing input signal for AI or counter/timer functions or a st atic digital input.
Chapter 8 PFI NI 6238/6239 User Manual 8-2 ni.com 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 outp ut, it is called P 0.
Chapter 8 PFI © National Instruments Corporatio n 8-3 NI 6238/6239 User Manual Exporting T iming Output Signals Using PFI T erminals Y ou can ro ute any of the follo wing timing signals to any PFI <6.
Chapter 8 PFI NI 6238/6239 User Manual 8-4 ni.com Figure 8-3. PFI Inpu t Signa ls Connections PFI Filters Y ou can enable a programmable debouncing filter on each PFI, R TSI, or PXI_ST AR signal. When th e filters are enabled, your de vice samples the input on each rising edge of a filter clock.
Chapter 8 PFI © National Instruments Corporatio n 8-5 NI 6238/6239 User Manual The filter setting for each input can be conf igured independently . On power up, the filters are dis abled. Figure 8- 4 sho ws an example of a lo w-to-high transition on an input that has its filter set to 125 ns (N = 5).
Chapter 8 PFI NI 6238/6239 User Manual 8-6 ni.com Consult the device specifi cations for details. Howe ver, you should avoid these fault conditions b y follo wing these guidelines. •D o no t connect any digital output line to any e xternal signal source, ground signal, or power supply .
Chapter 8 PFI © National Instruments Corporatio n 8-7 NI 6238/6239 User Manual Figure 8-5. NI 623 8 Digital I/O Connections (DO Source) P1.<0..3> P1.
Chapter 8 PFI NI 6238/6239 User Manual 8-8 ni.com Figure 8-6. NI 6239 Digital I/O Co nnections (DO Sink) Caution Exceeding the maximum input voltage or maximum working v oltage ratings, which are listed in the NI 6238/6239 Specifications , can damage the D A Q device and the computer .
© National Instruments Corporatio n 9-1 NI 6238/6239 User Manual 9 Isolation and Digital Isolators NI 6232/6233 devices are isolated data acquisition devices. As sho wn in Figure 9-1, the analog input, analog output, counter s, and PFI/static DIO circuitry are referenced to an isolated gr ound .
Chapter 9 Isolation and Digital Isolators NI 6238/6239 User Manual 9-2 ni.com The non-isolated ground is connected to the chassis groun d 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.
Chapter 9 Iso lation and Digital Isolators © National Instruments Corporatio n 9-3 NI 6238/6239 User Manual • Impro ved safety —Isolation creates an insulation barrier so you can make measurements at ele vated volt ages w hile protecting against large transient voltage spikes.
© National Instruments Corporation 10-1 NI 6238/6239 User Manual 10 Digital Routing and Clock Generation The digital routing circuitr y has the following three main functions. • Manages the flow of data be tween the b us interface and the acquisition/generat ion sub-systems (analog inpu t, analog output, digital I/O, and the counters).
Chapter 10 Digital Ro uting and Clock Generation NI 6238/623 9 User Manu al 1 0-2 ni.com Caution R TSI signals are not isolated from the chassis. 80 MHz Timebase The 80 MHz T imebase can be used as the Source input to the 32-bit general-purpose counter/timers.
Chapter 10 Digital Routing and Clock Generati on © National Instruments Corporation 10-3 NI 6238/6239 User Manual 10 MHz Reference Clock The 10 MHz reference clock can be used to synchronize other devices to your M Series de vice. The 10 MHz refere nce clock can be routed to the R TSI <0.
Chapter 10 Digital Ro uting and Clock Generation NI 6238/623 9 User Manu al 1 0-4 ni.com • Share trigger signals between devices Many National Instruments D A Q, motion, vision, and CAN devices support R TSI. In a PCI system, the R TSI bus consists of the R TSI b us interface and a ribbon cable.
Chapter 10 Digital Routing and Clock Generati on © National Instruments Corporation 10-5 NI 6238/6239 User Manual Using R TSI as Outputs R TSI <0..7> are bidirection al terminals. As an output, yo u can driv e any of the following signals to any R TSI term inal.
Chapter 10 Digital Ro uting and Clock Generation NI 6238/623 9 User Manu al 1 0-6 ni.com Using R TSI T erminals as T iming Input Signals Y ou can use R TSI terminals to route external timing signals to many different M S eries functions. Each R TSI terminal can be routed to any of the following signals.
Chapter 10 Digital Routing and Clock Generati on © National Instruments Corporation 10-7 NI 6238/6239 User Manual The filter setting for each input can be conf igured independently . On power up, the filters are disabl ed. Figure 10 -3 shows an e xample of a low-to-high transition on an input that has its filter set to 125 ns (N = 5).
Chapter 10 Digital Ro uting and Clock Generation NI 6238/623 9 User Manu al 1 0-8 ni.com PXI_CLK10 PXI_CLK10 is a common low-sk e w 10 MHz clock reference clock for synchronization of multiple modu les in a PXI measurement or control system.
Chapter 10 Digital Routing and Clock Generati on © National Instruments Corporation 10-9 NI 6238/6239 User Manual input on each rising edge of a filter clock. M Series de vices use an onboard oscillator to generate the filt er clock with a 40 MHz frequency .
Chapter 10 Digital Ro uting and Clock Generation NI 6238/6239 User Manual 10-10 ni.com When a PFI input i s routed directly to R TSI, or a R TSI in put is routed directly to PFI, the M Series device does not use the f iltered version of the input signal.
© National Instruments Corporation 11-1 NI 6238/6239 User Manual 11 Bus Interface The bus interf ace circuitry of NI 6238/6 239 devices ef ficiently mov es data between host memory and the meas urement and acquisition circuits. NI 6238/6239 devices are a vailable for the following platforms.
Chapter 11 Bus Interface NI 6238/623 9 User Manu al 1 1-2 ni.com Each DMA controller supports packing and unpacking of data through the FIFOs to connect different size de vi ces and optimize PCI bus utilization and automatically handles unalig ned memory buf fers.
Chapter 11 Bus Interface © National Instruments Corporation 11-3 NI 6238/6239 User Manual Using PXI with CompactPCI Using PXI-compatib le products with st andard CompactPCI products is an important feature provided by PXI Har dware Specif ication Revision 2.
Chapter 11 Bus Interface NI 6238/623 9 User Manu al 1 1-4 ni.com Interrupt Request (IRQ) IRQ transfers rely on the CPU to service data transfer requests. The device notifies the CPU when it is ready to tr ansfer data. The data transfer speed is tightly coupled to the rat e at which the CPU can service the inter rupt requests.
© National Instruments Corporation 12-1 NI 6238/6239 User Manual 12 T riggering A trigger is a signal that caus es an action, such as starting or stopping the acquisition of data. When you configure a trigger , you must decide how you want to produce the trigger and the action you want the trigger to cause.
Chapter 12 T riggering NI 6238/623 9 User Manu al 1 2-2 ni.com Y ou also can program yo ur D A Q device to perform an action in response to a trigger from a digital source.
© National Instruments Corporation A-1 NI 6238/6239 User Manual A Device-Specific Information This appendix contains device pinout s, specif ications, cable and accessory choices, and other information for the NI 6238 and NI 6239 MS e r i e s isolated devices.
Appendix A Device-Speci fic Information NI 6238/6239 User Manual A- 2 ni.com Figure A-1. NI 6238 Pin out Table A-1. NI 6238 Device Default NI-D AQmx Counter/T imer Pins Counter/Timer Signal Default Pin N umber (Name) Por t CTR 0 SRC 13 (PFI 0) P0.0 CTR 0 GA TE 32 (PFI 1) P0.
Appendix A Device-Specific Information © National Instruments Corporation A-3 NI 6238/6239 User Manual Note For more information abou t default NI-D A Qmx counter inputs, refer to Connecting Counter Signals in the NI-DA Qmx Help or the LabVIEW 8.x Help .
Appendix A Device-Speci fic Information NI 6238/6239 User Manual A- 4 ni.com vision, and motion devices. Since PXI devices use PXI backplane signals for timing an d synchronization, no cables are required.
Appendix A Device-Specific Information © National Instruments Corporation A-5 NI 6238/6239 User Manual Figure A-2. NI 6239 Pinout Table A-2. NI 6239 Device Default NI-D AQmx Counter/T imer Pins Counter/Timer Signal Default Pin N umber (Name) Por t CTR 0 SRC 13 (PFI 0) P0.
Appendix A Device-Speci fic Information NI 6238/6239 User Manual A- 6 ni.com Note For more information abou t default NI-D A Qmx counter inputs, refer to Connecting Counter Signals in the NI-DA Qmx Help or the LabVIEW 8.x Help . NI 6239 Specifications Refer to the NI 6239 Specifications , av ailable on the NI-D A Q De vice Document Br o wser or ni.
Appendix A Device-Specific Information © National Instruments Corporation A-7 NI 6238/6239 User Manual vision, and motion devices. Since PXI devices use PXI backplane signals for timing an d synchronization, no cables are required.
© National Instruments Corporation B-1 NI 6238/6239 User Manual B T roubleshooting This section contains some common questions about M Series de vices. If your questions are not answered here, refer to the National Instrum ents KnowledgeBase at ni.com/kb .
Appendix B T roubleshooting NI 6238/6239 User Manual B- 2 ni.com In an isolated device, lea ving the AI GND terminal unconnected will cause the signal to drift and e ventually rail.
Appendix B T roubleshooting © National Instruments Corporation B-3 NI 6238/6239 User Manual Counters When multiple sampl e clocks on my bu ffered counter measur ement occur bef ore consecutive edges on my source, I see weird behavior .
© National Instruments Corporation C-1 NI 6238/6239 User Manual C T echnical Support and Professional Ser vices Visit the following sections of the National Instruments Web site at ni.com for technical support an d professional services: • Support —Online technical support resources at ni.
Appendix C T echnical Support and Professional Services NI 6238/6239 User Manual C- 2 ni.com • Calibration Certificate —If your product supports calibration, you can obtain the calibration certificate for your product at ni.com/calibration . If you searched ni.
© National Instruments Corporation G-1 NI 6238/6239 User Manual Glossar y Numbers/Symbols % Percent. + Positiv e of, or plus. – Negati ve of, or minus. ± Plus or minus. < Less than. > Greater than. ≤ Less than or equal to. ≥ Greater than or equal to.
Glossary NI 6238/6239 User Manual G-2 ni.com AI 1. Analog input. 2. Analog input channel signal. AI GND Analog input groun d signal. AI SENSE Analog input sense signal.
Glossary © National Instruments Corporation G-3 NI 6238/6239 User Manual ASIC Application-specific integrated circuit—A proprietary semiconduct or component designed and manufactur ed to perform a set of specific functions for a specif ic customer .
Glossary NI 6238/6239 User Manual G-4 ni.com cascading Process of extending the counting ra nge of a counter chip by connecting to the next higher counter . CE European emissions control standard. channel Pin or wire lead to which you apply or from which you read the analog or digital signal.
Glossary © National Instruments Corporation G-5 NI 6238/62 39 User Manual counter 1. Software. A memory location used to store a count of certain occurrences. 2. Hardware. A circuit that counts e vents . When it refers to an instrument, it refers to a frequency counter .
Glossary NI 6238/6239 User Manual G-6 ni.com 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 D A Q device whenev er the CPU receives a soft ware signal to ac quire a single data point.
Glossary © National Instruments Corporation G-7 NI 6238/6239 User Manual digital signal A representation of information by a set of discrete v alues according to a prescribed law . These values are represented by numbers. digital trigger A TTL lev el signal having two discrete le vels—a high and a low le vel.
Glossary NI 6238/6239 User Manual G-8 ni.com F FIFO First- In-First-Ou t memory buf fer —A data buf f ering technique that functions like a shift register where the oldest values (f irst in) come out first.
Glossary © National Instruments Corporation G-9 NI 6238/62 39 User Manual ft Feet. function 1. A built-in ex ecution element, co mparable to an operator , function, or statement in a con v entional language.
Glossary NI 6238/6239 User Manual G-10 ni.com impedance 1. The electrical characteristic of a circuit expressed in ohms and/or capacitance/inductance. 2. Resistance. in. Inch or inches. instrument driv er A set of high-le vel software functions that controls a specif ic GPIB, VXI, or RS232 programmable instrument or a specific plug-in D A Q device.
Glossary © National Instruments Corporation G-11 NI 6238/6239 User Manual K kHz K ilohertz—A unit o f frequency; 1 kHz = 10 3 = 1,000 Hz. kS 1,000 samples. L LabVIEW A graphical programming language. LED Light-Emitting Di ode—A semicondu ctor light source.
Glossary NI 6238/6239 User Manual G-12 ni.com MITE MXI Interface T o Everything—A custom ASIC designed b y National Instruments that implements the PCI bu s interf ace. The MITE supports bus mastering for high-speed dat a transfers ov er the PCI bus.
Glossary © National Instruments Corporation G-13 NI 6238/6239 User Manual NI-PGIA See instrumentation am plifier . non-referenced signal sources Signal sources with voltage signals t hat are not connected to an absolute reference or system ground. Also called floatin g signal sources.
Glossary NI 6238/6239 User Manual G-14 ni.com power source An in strument that provides one or more sources of A C or DC power . Also known as po wer supply .
Glossary © National Instruments Corporation G-15 NI 6238/6239 User Manual real time 1. Displays as it comes in; no delays. 2. A property of an event or system in which data is processed and acted upon as it is acquired instead of being accumulated and processed at a later time.
Glossary NI 6238/6239 User Manual G-16 ni.com SCXI Signal Conditioning eX tensions for Instrumen tation—The N ational Instruments pr oduct line for condit ioning low-le vel signals with in an external chassis near sensors so that on ly high-le vel signals are sent to D A Q devices in the noisy PC en vironment.
Glossary © National Instruments Corporatio n G-17 NI 6238/6239 User Manual source impeda nce A parameter of sig nal sources that reflects current-driving ability of voltage sources (lo wer is better) and the v olt age-driving ability of current sources (higher is better).
Glossary NI 6238/6239 User Manual G-18 ni.com trigger 1. Any e vent that causes or starts some form of data capture. 2. An external stimulus that initiates one or more instrum ent functions. T ri gger stimuli include a front panel button, an external input voltage pulse, or a bus trigger command.
Glossary © National Instruments Corporation G-19 NI 6238/6239 User Manual V s Signal source voltage. virtual channel See channel . W wa veform 1. The plot of the instantan eous amplitude of a si gnal as a function of time. 2. Multiple voltage readings taken at a specific sampling rate.
© National Instruments Corporatio n I-1 NI 6238/6239 User Manual Index Symbols .NET languages documentatio n, xvii Numerics 10 MHz reference clock, 10-3 100 kHz Timebase, 10-2 20 MHz Timebase, 10-2 8.
Index NI 6238/6239 User Manual I-2 ni.co m triggering, 5-4 troubleshooting, B-2 ANSI C documentation, xvii AO FIFO, 5-1 AO Pause Trigger signal, 5-6 AO Sample Clock signal, 5-8 AO Sample Clock Timebas.
Index © National Instruments Corporatio n I-3 NI 6238/6239 User Manual conventions used in the manual, xiii Counter n A signal, 7-29 Counter n Aux signal, 7-28 Counter n B signal, 7-29 Counter n Gate.
Index NI 6238/6239 User Manual I-4 ni.co m digital input and output, 6-1 isolation, 9-3 isolators, 9-1 routing, 10-1 signals, connecting, 6-2, 8-6 source, triggering, 12-1 digital I/O circuitry, 6-1 c.
Index © National Instruments Corporatio n I-5 NI 6238/6239 User Manual non-buffered hardware-timed, 5-3 pulse for ETS, 7-25 pulse train, 7-23 retriggerable singl e pulse, 7-22 simple pulse, 7-21 sing.
Index NI 6238/6239 User Manual I-6 ni.co m using quadrature encoders, 7-16 using two pulse enco ders, 7-18 measuring high frequency with two counters, 7-12 large range of frequencies using two counter.
Index © National Instruments Corporatio n I-7 NI 6238/6239 User Manual pulse-width measurement, 7-6 buffered, 7-6 single, 7-6 PXI and PXI Express, 11-2 clock, 11-2 clock and trigger signals, 1 0-7 co.
Index NI 6238/6239 User Manual I-8 ni.co m Counter n Z, 7-29 counter timing, 7-26 counters, 7- 26 exporting timing out put using PFI terminals, 8-3 FREQ OUT, 7-30 Frequency Output, 7-30 minimizing out.
Index © National Instruments Corporatio n I-9 NI 6238/6239 User Manual U using PFI termin als as static digital I/Os, 8-3 as timing input, 8-2 to export timing output signals, 8-3 using RTSI as outpu.
An important point after buying a device National Instruments NI 6239 (or even before the purchase) is to read its user manual. We should do this for several simple reasons:
If you have not bought National Instruments NI 6239 yet, this is a good time to familiarize yourself with the basic data on the product. First of all view first pages of the manual, you can find above. You should find there the most important technical data National Instruments NI 6239 - thus you can check whether the hardware meets your expectations. When delving into next pages of the user manual, National Instruments NI 6239 you will learn all the available features of the product, as well as information on its operation. The information that you get National Instruments NI 6239 will certainly help you make a decision on the purchase.
If you already are a holder of National Instruments NI 6239, but have not read the manual yet, you should do it for the reasons described above. You will learn then if you properly used the available features, and whether you have not made any mistakes, which can shorten the lifetime National Instruments NI 6239.
However, one of the most important roles played by the user manual is to help in solving problems with National Instruments NI 6239. Almost always you will find there Troubleshooting, which are the most frequently occurring failures and malfunctions of the device National Instruments NI 6239 along with tips on how to solve them. Even if you fail to solve the problem, the manual will show you a further procedure – contact to the customer service center or the nearest service center