You are on page 1of 4
@ 7 When you odit Task Settings © tational Instruments Corporation 59 Sten 3 Prototype Year Ampito Kk, save your changes. You can configure the following settings for a task. Task Timing ‘You use timing to control when a signal is generated. With hardware timing, a digital signal, typically a clock on your DAQ device, controls the rate of generation, Hardware clocks are periodic digital edges that measure time. Clocks mark the passing of time or align other signals in time. Clocks usually do not cause actions in the sense that triggers do, and their names usually do not refer to actions, except for the sample clock. Different devices have different clocks, Check your device pinout to verify the available clocks. You can configure the acquisition mode and clock setting for a hardware clock. Acquisition Mode + 1 Sample (On Demand)—Specifies that the task acquires one sample upon a user request. This type of acquisition is sometimes referred to as software timed because there is no clock involved in the process. The 1 Sample (On Demand) acquisition mode is controlled manually or through a software structure such as a loop. + 1 Sample (Hardware Timed)—Specifies that the task acquires cone sample on an edge of 2 hardware clock. +N Samples—Specifies that the task acquires a finite number of samples, N, where iV is specified by the samples to read parameter. Refer to the Clock Settings section for more information about the samples to read parameter, + Continueus—Specifies that the task acquires data until stopped. Contiriuous acquisition automatically creates a memory buffer, ata Acquistion: 7 Stas to Sucaess steos 8 aus Acauistion 7 Staps to Suocoss 510 aicom Prototoe Your Application Clock Settings + Samples to Read—This option applies only when you specify an N samples acquisition or a continuous acquisition, i ~ N Samples—Set the number of samples you want to acquire with the Samples to Read parameter. The NI-DAQmx driver allocates temporary memory for the acquired data until the data is transferred to a permanent memory location. The Samples to Read parameter determines the size of the temporary memory, or buffer. | — Continuous—The Samples to Read parameter has little relevancy i unless the samples to read value is greater than the buffer the driver | automatically allocates for the application. The Samples to Read | value depends on the specified rate, in which case the buffer size 1 becomes the samples to read value. } Note In LabVIEW, when you use the DAQ Assistant Express VI for a continuous 1 acquisition, the samples to read parameter determines the number of samples to readin | each iteration, Sampling Rate | One of the most important elements of an analog input or analog output measurement system is the rate at which the measurement device samples an input signal or generates an output signal. The scan rate, or sampling rate in NEDAQmx, determines how often a sample is read, or generated, A fast input sampling rate, measured in Hertz or Samples/second (S/s), acquires more points in a given time and can form a better representation of the original signal than a slow sampling rate. For example, generating a 1 Hz signal using 1,000 points per cycle at 1,000 S/s produces a more accurate representation of a signal than generating 2 signal using 10 points per cycle at a sample rate of 10 Sis. Aliasing Aliasing is a misrepresentation of the analog signal that results from a sampling rate that is too slow. Undersampling causes the signal to appear as if it has a different frequency than'it actually does. To avoid aliasing, sample at a rate several times faster than ‘the frequency of the signal. Figure 5-7 shows an adequately sampled signal andthe aliasing effects of undersampling. -_—______—— Step 5 Profane Your a [i Adequately Sampled : . Aliasing For frequency measurements, scientists and engineers use the Nyquist theorem to determine the sampling rate. According to the Nyquist theorem, you must sample at a rate greater than twice the maximum frequency component in the signal you are acquiring to accurately represent the s The Nyquist frequency is the maximum frequency you can represent accurately without aliasing for a given sampling rate. The Nyquist frequency is one half the sampling frequency. Signals with frequency components above the Nyquist frequency appear aliased between DC (0 frequency) and the Nyquist frequency. The alias frequency is the absolute value of the difference between the frequency of the input signal and the closest integer multiple of the sampling rate. Sampling at twice the rate of the highest signal component is often inadequate for practical purposes. Real-world signals often contain frequency components that exist above the Nyquist frequency. These frequency components are exroneously aliased and added to the components of the signal that are sampled accurately, producing distorted sampled data, Therefore, for practical reasons, sampling usually occurs at a rate of several times the maximum frequency. A sampling rate of 5 to 10 times the maximum frequency is a typical industry standard © ational nsraments Corporation sar Data Acquistion: 7 Steps to Suacess NATIONAL » INSTRUMENTS . (os ec) ERIE rere ae ee re ra rr are Acquiring Data with the DAQmx Acquire Step »Table of Contents With the DAQenx Acquire stap, you can acquire analog signals sing any WI-DAQmx compatible device In your system, LabVIEW Signalexpress Help June 2008 Configuring the DAQmx Acquire Step ae From the step configuration, you can access the device configuration parameters, such as 371268)-01 the Input channels, the sample rate at which to acquire data, and the number af samples tp acquire at each iteration. You also can configure more advaaced parameters, such as the »View Product Info Start Wigger, the reference trigger, and clock, Finally, You can synchronize the DAQmy. Acquire step with other hardware Steps by configuring a digital trigger and using a tigger Signal from another device as the trigger source. You also can synchronize mullple devices by sharing clock and master limebase signals Acqui: ‘To acquire signals with the DAQmx Acquire step, you must understand the relationship between the acquisition timing modes and the LabVIEW Signalexpress sun modes, The following table shows how the N Samples, 1 Sample (On Demand), and Continuous Samples acquisition mades work in relation to the Run Once and Rum Continuously modes. ition Timing [x Sampie (on nti 5 ee N Samples __[eontinuous soma Run Once [The device acquires [The device acquires N samples and [The davice acquires N samples and stops. The Jone sample and |stops. The device generates a start |device generates a start bigger at tie beginning stops. rigger at the beginning of the or the acquisition. acquisivon. Run [The device acquires |The device acquires NV samples [The device acquires time contiguaus Blocks af N [Continuously one sample repeatedly untl you stop the lsamples unél you stop the execution, The éevice repeatedly unt you execution. The device generates a {generates a start trigger at the beginning of the [stop the execution. _ [start rigger at each iteration [rst iteration. Resources + Controling Stand-Alone aiid Modular Instruments with MI LABVIEW Signalexp per Zane ~ NI Developer + Quickly View, Manage and Configure Gevices and Channels in LabVIEW SignalExpress 8€” Channel View: « Nt : Developer Zone + How to transition fram a VI Logger Task to a LabVIEW SignalExpress praject 2- Developer Zone ~ NI Developer Zone Your Feedback! Poor | Excellent » Yes No Document Quality? Answered Your Question? © PAGSComments «2 3 4 5 cum role | Pmvacy | Legal| Cong © 2009 Matin rstamnts Copan, Argh reed. | GLE hs Page Htplzenest com eleroncaer-Xha/7 Zens. Otteaseesswbiacgiing daa!

You might also like