1 Telemark University College Department of Electrical Engineering, Information Technology and Cybernetics Data Acquisition in LabVIEW HANS- PETTER HALVORSEN, Faculty of Technology, Postboks 203, Kjølnes ring 56, N-3901 Porsgrunn, Norway. Tel: Fax:
2 Preface This tutorial explains the basic concepts of a Data Acquisition in LabVIEW. You find this document and additional resources online at: You should have some basic knowledge about LabVIEW, e.g., the Introduction to LabVIEW tutorial. This document is available for download at For more information about LabVIEW, visit: In addition to LabVIEW, you will need to install the driver NI- DAQmx. 2
3 Table of Contents Preface... 2 Table of Contents... iii 1 Introduction to LabVIEW Dataflow programming Graphical programming Benefits Introduction to Data Acquisition Introduction to DAQ - Data Acquisition Physical input/output signals DAQ device/hardware Driver software Your software application (Application software) MAX Measurement and Automation Explorer NI- DAQmx DAQ Assistant NI USB Physical input/output signals Transducers Signals Analog Signals Digital Signals MAX NI- DAQmx iii
4 iv Table of Contents DAQ Assistant Simulating a DAQ Device DAQ Devices Performing Analog- to- Digital Conversion Performing Digital- to- Analog Conversion Using Counters Using Digital I/O NI USB Connect NI USB to the PC Testing the USB in MAX Using NI USB in LabVIEW DAQ Assistant Analog Input Analog Output Logging to File Writing to Measurement File Read from Measurement File... 46
5 1 Introduction to LabVIEW LabVIEW (short for Laboratory Virtual Instrumentation Engineering Workbench) is a platform and development environment for a visual programming language from National Instruments. The graphical language is named "G". Originally released for the Apple Macintosh in 1986, LabVIEW is commonly used for data acquisition, instrument control, and industrial automation on a variety of platforms including Microsoft Windows, various flavors of UNIX, Linux, and Mac OS X. Visit National Instruments at The code files have the extension.vi, which is an abbreviation for Virtual Instrument. LabVIEW offers lots of additional Add- Ons and Toolkits. 1.1 Dataflow programming The programming language used in LabVIEW, also referred to as G, is a dataflow programming language. Execution is determined by the structure of a graphical block diagram (the LV- source code) on which the programmer connects different function- nodes by drawing wires. These wires propagate variables and any node can execute as soon as all its input data become available. Since this might be the case for multiple nodes simultaneously, G is inherently capable of parallel execution. Multi- processing and multi- threading hardware is automatically exploited by the built- in scheduler, which multiplexes multiple OS threads over the nodes ready for execution. 1.2 Graphical programming LabVIEW ties the creation of user interfaces (called front panels) into the development cycle. LabVIEW programs/subroutines are called virtual instruments (VIs). Each VI has three components: a block diagram, a front panel, and a connector panel. The last is used to represent the VI in the block diagrams of other, calling VIs. Controls and indicators on the front panel allow an operator to input data into or extract data from a running virtual instrument. However, the front panel can also serve as a programmatic interface. Thus a virtual instrument can either be run as a program, with the front panel serving as a user interface, or, when dropped as a node onto the block diagram, the front panel defines the inputs and outputs for the given node through the connector pane. This implies each VI can be easily tested before being embedded as a subroutine into a larger program. 1
6 2 Introduction to LabVIEW The graphical approach also allows non- programmers to build programs simply by dragging and dropping virtual representations of lab equipment with which they are already familiar. The LabVIEW programming environment, with the included examples and the documentation, makes it simple to create small applications. This is a benefit on one side, but there is also a certain danger of underestimating the expertise needed for good quality "G" programming. For complex algorithms or large- scale code, it is important that the programmer possess an extensive knowledge of the special LabVIEW syntax and the topology of its memory management. The most advanced LabVIEW development systems offer the possibility of building stand- alone applications. Furthermore, it is possible to create distributed applications, which communicate by a client/server scheme, and are therefore easier to implement due to the inherently parallel nature of G- code. 1.3 Benefits One benefit of LabVIEW over other development environments is the extensive support for accessing instrumentation hardware. Drivers and abstraction layers for many different types of instruments and buses are included or are available for inclusion. These present themselves as graphical nodes. The abstraction layers offer standard software interfaces to communicate with hardware devices. The provided driver interfaces save program development time. The sales pitch of National Instruments is, therefore, that even people with limited coding experience can write programs and deploy test solutions in a reduced time frame when compared to more conventional or competing systems. A new hardware driver topology (DAQmxBase), which consists mainly of G- coded components with only a few register calls through NI Measurement Hardware DDK (Driver Development Kit) functions, provides platform independent hardware access to numerous data acquisition and instrumentation devices. The DAQmxBase driver is available for LabVIEW on Windows, Mac OS X and Linux platforms.
7 2 Introduction to Data Acquisition This chapter explains the basic concepts of using DAQ in LabVIEW. Topics: Introduction to DAQ - Data Acquisition MAX Measurement and Automation Explorer NI- DAQmx LabVIEW is very powerful when it comes to creating DAQ applications. LabVIEW includes a set of VIs that let you configure, acquire data from, and send data to DAQ devices. Often, one device can perform a variety of functions, such as analog- to- digital (A/D) conversion, digital- to- analog (D/A) conversion, digital I/O, and counter/timer operations. Each device supports different DAQ and signal generation speeds. Also, each DAQ device is designed for specific hardware, platforms and operating systems. National Instruments, the inventor of LabVIEW, also make DAQ devices, so the integration with the DAQ devices from NI and the LabVIEW software is seamless and makes it easy to do I/O operations from the LabVIEW environment. 2.1 Introduction to DAQ - Data Acquisition The purpose of data acquisition is to measure an electrical or physical phenomenon such as voltage, current, temperature, pressure, or sound. PC- based data acquisition uses a combination of modular hardware, application software, and a computer to take measurements. While each data acquisition system is defined by its application requirements, every system shares a common goal of acquiring, analyzing, and presenting information. Data acquisition systems incorporate signals, sensors, actuators, signal conditioning, data acquisition devices, and application software. So summing up, Data Acquisition is the process of: Acquiring signals from real- world phenomena Digitizing the signals Analyzing, presenting and saving the data 3
8 4 Introduction to Data Acquisition The DAQ system has the following parts involved, see Figure: The parts are: Physical input/output signals DAQ device/hardware Driver software Your software application (Application software) For an Introduction to Data Acquisition, see this webcast: Physical input/output signals A physical input/output signal is typically a voltage or current signal. A voltage signal can typically be a 0-5V signal, while a current signal can typically be a 4-20mA signal DAQ device/hardware DAQ hardware acts as the interface between the computer and the outside world. It primarily functions as a device that digitizes incoming analog signals so that the computer can interpret them A DAQ device (Data Acquisition Hardware) usually has these functions: Analog input Analog output Digital I/O Counter/timers We have different DAQ devices, such as: Desktop DAQ devices where you need to plug a PCI DAQ board into your computer. The software is running on a computer.
9 5 Introduction to Data Acquisition Portable DAQ devices for connection to the USB port, Wi- Fi connections, etc. The software is running on a computer Distributed DAQ devices where the software is developed on your computer and then later downloaded to the distributed DAQ device Driver software Driver software is the layer of software for easily communicating with the hardware. It forms the middle layer between the application software and the hardware. Driver software also prevents a programmer from having to do register- level programming or complicated commands in order to access the hardware functions. Driver software from National Instruments: NI- DAQmx NI- DAQmx Base The DAQ Assistant, included with NI- DAQmx, is a graphical, interactive guide for configuring, testing, and acquiring measurement data. With a single click, you can even generate code based on your configuration, making it easier and faster to develop complex operations. Because DAQ Assistant is completely menu- driven, you will make fewer programming errors and drastically decrease the time from setting up your DAQ system to taking your first measurement. NI- DAQmx Base offers a subset of NI- DAQmx functionality on Windows and Linux, Mac OS X, Windows Mobile and Windows CE.
10 6 Introduction to Data Acquisition Your software application (Application software) Application software adds analysis and presentation capabilities to the driver software. Your software application normally does such tasks as: Real- time monitoring Data analysis Data logging Control algorithms Human machine interface (HMI) In order to create your DAQ application you need a programming development tool, such as LabVIEW. 2.2 MAX Measurement and Automation Explorer Measurement & Automation Explorer (MAX) provides access to your National Instruments devices and systems. With MAX, you can: Configure your National Instruments hardware and software Create and edit channels, tasks, interfaces, scales, and virtual instruments Execute system diagnostics View devices and instruments connected to your system Update your National Instruments software In addition to the standard tools, MAX can expose item- specific tools you can use to configure, diagnose, or test your system, depending on which NI products you install. As you navigate through MAX, the contents of the application menu and toolbar change to reflect these new tools.
11 7 Introduction to Data Acquisition 2.3 NI-DAQmx The NI- DAQmx Driver software is the layer of software for easily communicating with the hardware. It forms the middle layer between the application software and the hardware. Driver software also prevents a programmer from having to do register- level programming or complicated commands in order to access the hardware functions. The DAQmx palette in LabVIEW:
12 8 Introduction to Data Acquisition The DAQ Assistant is an easy way to start using the DAQ features in LabVIEW. We will learn more about the DAQ Assistant in a later chapter DAQ Assistant The DAQ Assistant, included with NI- DAQmx, is a graphical, interactive guide for configuring, testing, and acquiring measurement data. With a single click, you can even generate code based on your configuration, making it easier and faster to develop complex operations. Because DAQ Assistant is completely menu- driven, you will make fewer programming errors and drastically decrease the time from setting up your DAQ system to taking your first measurement. 2.4 NI USB-6008 NI USB is a simple and low- cost multifunction I/O device from National Instruments.
13 9 Introduction to Data Acquisition The device has the following specifications: 8 analog inputs (12- bit, 10 ks/s) 2 analog outputs (12- bit, 150 S/s) 12 digital I/O USB connection, No extra power- supply neeeded Compatible with LabVIEW, LabWindows/CVI, and Measurement Studio for Visual Studio.NET NI- DAQmx driver software The NI USB is well suited for education purposes due to its small size and easy USB connection.
14 3 Physical input/output signals Data acquisition involves gathering signals from measurement sources and digitizing the signal for storage, analysis, and presentation on a PC. Data acquisition (DAQ) systems come in many different PC technology forms for great flexibility when choosing your system. Scientists and engineers can choose from PCI, PXI, PCI Express, PXI Express, PCMCIA, USB, Wireless and Ethernet data acquisition for test, measurement, and automation applications. There are five components to be considered when building a basic DAQ system Transducers and sensors Signals Signal conditioning DAQ hardware Driver and application software In this chapter we focus on Transducers, sensors and Signals. 3.1 Transducers Data acquisition begins with the physical phenomenon to be measured. This physical phenomenon could be he temperature of a room, the intensity of a light source, the pressure inside a chamber, the force applied to an object, or many other things. An effective DAQ system can measure all of these different phenomena. A transducer is a device that converts a physical phenomenon into a measurable electrical signal, such as voltage or current. The ability of a DAQ system to measure different phenomena depends on the transducers to convert the physical phenomena into signals measurable by the DAQ hardware. Transducers are synonymous with sensors in DAQ systems. There are specific transducers for many different applications, such as measuring temperature, pressure, or fluid flow. Below we see some common phenomena and the transducers used to measure them. Phenomenon Temperature Transducer Thermocouple, RTD, Thermistor 10
15 11 Physical input/output signals Light Sound Force and Pressure Position and Displacement Acceleration ph Photo Sensor Microphone Strain Gage, Piezoelectric Transducer Potentiometer, LVDT, Optical Encoder Accelerometer ph Electrode Different transducers have different requirements for converting phenomena into a measurable signal. Some transducers may require excitation in the form of voltage or current. Other transducers may require additional components and even resistive networks to produce a signal. Refer to ni.com/sensors for more information on transducers. 3.2 Signals The appropriate transducers convert physical phenomena into measurable signals. However, different signals need to be measured in different ways. For this reason, it is important to understand the different types of signals and their corresponding attributes. Signals can be categorized into two groups: Analog Digital Analog Signals Analog input is the process of measuring an analog signal and transferring the measurement to a computer for analysis, display, or storage. An analog signal is a signal that varies continuously. Analog input is most commonly used to measure voltage or current. You can use many types of devices to perform analog input, such as multifunction DAQ (MIO) devices, high- speed digitizers, digital multimeters, and Dynamic Signal Acquisition (DSA) devices.
16 12 Physical input/output signals An analog signal can be at any value with respect to time. A few examples of analog signals include voltage, temperature, pressure, sound, and load. The three primary characteristics of an analog signal is: Level Shape Frequency Level Because analog signals can take on any value, the level gives vital information about the measured analog signal. The intensity of a light source, the temperature in a room, and the pressure inside a chamber are all examples that demonstrate the importance of the level of a signal. When measuring the level of a signal, the signal generally does not change quickly with respect to time. The accuracy of the measurement, however, is very important. A DAQ system that yields maximum accuracy should be chosen to aid in analog level measurements.
17 13 Physical input/output signals Shape Some signals are named after their specific shape - sine, square, sawtooth, and triangle. The shape of an analog signal can be as important as the level, because by measuring the shape of an analog signal, you can further analyze the signal, including peak values, DC values, and slope. Signals where shape is of interest generally change rapidly with respect to time, but system accuracy is still important. The analysis of heartbeats, video signals, sounds, vibrations, and circuit responses are some applications involving shape measurements. Frequency All analog signals can be categorized by their frequency. Unlike the level or shape of the signal, frequency cannot be directly measured. The signal must be analyzed using software to determine the frequency information. This analysis is usually done using an algorithm known as the Fourier transform. When frequency is the most important piece of information, it is important to consider including both accuracy and acquisition speed. Although the acquisition speed for acquiring the frequency of a signal is less than the speed required for obtaining the shape of a signal, the signal must still be acquired fast enough that the pertinent information is not lost while the analog signal is being acquired. The condition that stipulates this speed is known as the Nyquist Sampling Theorem. Speech analysis, telecommunication, and earthquake analysis are some examples of common applications where the frequency of the signal must be known. 3.3 Digital Signals A digital signal cannot take on any value with respect to time. Instead, a digital signal has two possible levels: high and low. Digital signals generally conform to certain specifications that define characteristics of the signal. Digital signals are commonly referred to as transistor- to- transistor logic (TTL). TTL specifications indicate a digital signal to be low when the level falls within 0 to 0.8 V, and the signal is high between 2 to 5 V. The useful information that can be measured from a digital signal includes the state and the rate.
18 14 Physical input/output signals State Digital signals cannot take on any value with respect to time. The state of a digital signal is essentially the level of the signal - on or off, high or low. Monitoring the state of a switch - open or closed - is a common application showing the importance of knowing the state of a digital signal. Rate The rate of a digital signal defines how the digital signal changes state with respect to time. An example of measuring the rate of a digital signal includes determining how fast a motor shaft spins. Unlike frequency, the rate of a digital signal measures how often a portion of a signal occurs. A software algorithm is not required to determine the rate of a signal
19 4 MAX Measurement & Automation Explorer (MAX) provides access to your National Instruments devices and systems. With MAX, you can: Configure your National Instruments hardware and software Create and edit channels, tasks, interfaces, scales, and virtual instruments Execute system diagnostics View devices and instruments connected to your system Update your National Instruments software In addition to the standard tools, MAX can expose item- specific tools you can use to configure, diagnose, or test your system, depending on which NI products you install. As you navigate through MAX, the contents of the application menu and toolbar change to reflect these new tools. LabVIEW installs MAX to establish all devices and channel configuration parameters. MAX reads the information the Device Manager records in the Windows Registry and assigns a logical device number to each DAQ device. You use the device number to refer to the device in LabVIEW. You can access MAX by selecting Tools»Measurement & Automation Explorer in LabVIEW. This displays the primary MAX window. 15
20 16 MAX Before using a data acquisition board, you must confirm that the software can communicate with the board by configuring the devices. For Windows, the Windows Configuration Manager keeps track of all the hardware installed in the computer, including National Instruments DAQ devices. The Windows Configuration Manager automatically detects and configures Plug & Play (PnP) devices. Windows Configuration Manager If you have a PnP device, such as an E Series MIO device, the Windows Configuration Manager automatically detects and configures the device. If you have a non- PnP device, or legacy device, you must configure the device manually using the Add New Hardware option in the Control Panel. You can verify the Windows Configuration by accessing the Device Manager.
21 5 NI-DAQmx Driver software is the layer of software for easily communicating with the hardware. It forms the middle layer between the application software and the hardware. Driver software also prevents a programmer from having to do register- level programming or complicated commands in order to access the hardware functions. Driver software from National Instruments: NI- DAQmx NI- DAQmx Base The DAQ Assistant, included with NI- DAQmx, is a graphical, interactive guide for configuring, testing, and acquiring measurement data. With a single click, you can even generate code based on your configuration, making it easier and faster to develop complex operations. Because DAQ Assistant is completely menu- driven, you will make fewer programming errors and drastically decrease the time from setting up your DAQ system to taking your first measurement. NI- DAQmx Base offers a subset of NI- DAQmx functionality on Windows and Linux, Mac OS X, Windows Mobile and Windows CE. National Instruments DAQ boards have a driver engine that communicates between the board and the application software. There are two driver engines, NI- DAQmx and Traditional NI- DAQ. You can also use the DAQ Assistant, an Express VI that communicates with NI- DAQmx, in LabVIEW to communicate with the DAQ board. In addition, National Instruments provides Measurement & Automation Explorer (MAX) for configuring DAQ boards. The NI- DAQmx Driver software is the layer of software for easily communicating with the hardware. It forms the middle layer between the application software and the hardware. Driver software also prevents a programmer from having to do register- level programming or complicated commands in order to access the hardware functions. The DAQmx palette in LabVIEW: 17
22 18 NI- DAQmx DAQ Assistant The DAQ Assistant, included with NI- DAQmx, is a graphical, interactive guide for configuring, testing, and acquiring measurement data. With a single click, you can even generate code based on your configuration, making it easier and faster to develop complex operations. Because DAQ Assistant is completely menu- driven, you will make fewer programming errors and drastically decrease the time from setting up your DAQ system to taking your first measurement. Scales You can configure custom scales for your measurements using MAX. This is very useful when working with sensors. It allows you to bring a scaled value into your application without having to work directly with the raw values. For example, you can use a temperature sensor that represents temperature with a voltage. The conversion equation for the temperature is, Voltage x 100 = Celsius. After a scale is set, you can use it in your application program, providing the temperature value, rather than the voltage. When performing analog input, the task can be timed to: Acquire 1 Sample Acquire n Samples Acquire Continuously 5.2 Simulating a DAQ Device You can create NI- DAQmx simulated devices in NI- DAQmx 7.4 or later. Using NI- DAQmx simulated devices: You can try NI products in your application without the hardware.
23 19 NI- DAQmx Later, when you acquire the hardware, you can import the NI- DAQmx simulated device configuration to the physical device using the MAX Portable Configuration Wizard. You can work on your applications on a portable system and upon returning to the original system, you can easily import your application work. Creating NI- DAQmx Simulated Devices To create an NI- DAQmx simulated device, right- click Devices and Interfaces and select Create New. The Create New dialog box prompts you to select a device to add. Select NI- DAQmx Simulated Device and click Finish. In the Choose Device dialog box, select the family of devices for the device you want to simulate. Select the device and click OK. If you select a PXI device, you are prompted to select a chassis number and PXI slot number. If you select an SCXI chassis, the SCXI configuration panels open.
24 6 DAQ Devices DAQ hardware acts as the interface between the computer and the outside world. It primarily functions as a device that digitizes incoming analog signals so that the computer can interpret them A DAQ device (Data Acquisition Hardware) usually has these functions: Analog input Analog output Digital I/O Counter/timers We have different DAQ devices, such as: Desktop DAQ devices where you need to plug a PCI DAQ board into your computer. The software is running on a computer. Portable DAQ devices for connection to the USB port, Wi- Fi connections, etc. The software is running on a computer Distributed DAQ devices where the software is developed on your computer and then later downloaded to the distributed DAQ device. 20
25 21 DAQ Devices Most DAQ devices have four standard elements: analog input, analog output, digital I/O, and counters. The DAQ device transfers the measured signals to a computer through different bus structures. For example, you can plug a DAQ device into the PCI bus or the USB port of a computer or the Personal Computer Memory Card International Association (PCMCIA) socket of a laptop. You also can use PXI/CompactPCI to create a portable, versatile, and rugged measurement system. 6.1 Performing Analog-to-Digital Conversion Analog- to- digital conversion is a process of acquiring and translating signals into digital data so that a computer can process it. Analog- to- digital converters (ADCs) are circuit components that convert a voltage level into a series of ones and zeroes. ADCs sample the analog signal on each rising or falling edge of a sample clock. In each cycle, the ADC takes a snapshot of the analog signal, measures and converts it into a digital value. The ADC obtains and approximates the signal with fixed precision and converts it into a series of digital values. 6.2 Performing Digital-to-Analog Conversion Digital- to- analog conversion is the opposite of analog- to- digital conversion. In digital- to- analog conversion, the computer generates the data. 6.3 Using Counters A counter is a digital timing device. You typically use counters for event counting, frequency measurement, period measurement, position measurement, and pulse generation. 6.4 Using Digital I/O
26 22 DAQ Devices Digital signals are electrical signals that transfer digital data over a wire. These signals typically have only two states: on and off, also known as high and low, or 1 and 0. When sending a digital signal across a wire, the sender applies a voltage to the wire and the receiver uses the voltage level to determine the value being sent. The voltage ranges for each digital value depend on the voltage level standard being used. Digital signals have many users: Digital signals control or measure digital devices such as switches or LEDs
27 7 NI USB-6008 NI USB is a simple and low- cost multifunction I/O device from National Instruments. The device has the following specifications: 8 analog inputs (12- bit, 10 ks/s) 2 analog outputs (12- bit, 150 S/s) 12 digital I/O USB connection, No extra power- supply needed Compatible with LabVIEW, LabWindows/CVI, and Measurement Studio for Visual Studio.NET NI- DAQmx driver software The NI USB is well suited for education purposes due to its small size and easy USB connection. 7.1 Connect NI USB-6008 to the PC Configuring and testing: USB can be configured and tested using MAX (Measurement and Automation Explorer), which is installed with the NI- DAQmx Driver Software. The first time you connect the USB to the PC, the Windows Hardware Installer Wizard will open. The wizard searches the PC for the necessary driver software for the USB This driver software was installed along with the installation of the NI- DAQ software. When the wizard has finished the installation of the driver software, the USB is ready for use. 23
28 24 NI USB Testing the USB-6008 in MAX Before you start to use the USB in an application, you should test the device in the Measurement and Automation Explorer (MAX). In the MAX window, expand the Devices and Interfaces node and then NI DAQmx Devices. Right- click on the NI USB device and select Self- Test.
29 25 NI USB Hopefully the self- test passes without errors. Then, you should test the individual channels of the USB to check that the input signals are detected correctly by the USB- 6008, and that the output signals generated by the USB have correct values. This I/O can be tested in several ways, depending on which channels you actually want to test. We will perform a simple loopback test: Here, let us test analog output channel 0 (AO0) and the analog input channel 0 (AI0) to see if they work correctly. We will perform a very simple test, which is sufficient if we are to check that both AO0 and AI0 work correctly. The test procedure, which is denoted loopback, is to connect the AI0 channel to the AO0 channel. Then we generate some legal voltage at AO0. If AI0 detects the same voltage, we know that both AO0 and AI0 work. (We may then repeat this procedure for other channels.) If for some reason AI0 detects some other voltage than the value we set for AO0, then there is an error in either the AI0 channel or in the the AO0 channel, and further investigations are necessary. To prepare for the loopback test, we wire together AI0 and AO0. To see the terminals of the USB- 6000, select Device Pinouts from the right- click menu.
30 26 NI USB The Figure shows the AI0 and AO0 channels wired together. To actually perform the loopback test, right- click on the NI USB device in MAX, and then select Test Panels.. in order to open the Test Panels. In the Test Panels window, select the Analog Output tab.
31 27 NI USB In the Analog Output tab, select any voltage between 0V and 5V. Next, click the Analog Input tab in the Test Panels window.
32 28 NI USB The Analog Input tab should indicate the same (or almost the same) voltage as is set out on AO0. There may be a small difference between the values due to the limited resolution in the DA- converter (digital- to- analog) and in the AD- converter (analog- to- digital).
33 29 NI USB You should also always use a multi- meter to check if the voltage levels on the output and input channels are correct according to your settings.
34 30 NI USB Using NI USB-6008 in LabVIEW In order to use the NI USB in LabVIEW you need to use the DAQmx functions, see Figure below. DAQmx Data Acquisition palette:
35 31 NI USB DAQ Assistant The easiest ways is to use the DAQ Assistant Analog Input When you drag the DAQ Assistant icon on your Block Diagram, the following window appears:
36 32 NI USB In this window you need to select either Acquire Signals (i.e., Input Signals) or Generate Signals (i.e., Output Signals). Select Acquire Signals Analog Input Voltage. In the next window you select which Analog Input you want to use. Select ai0 (Analog Input channel 0) and click Finish.
37 33 NI USB The following window appears:
38 34 NI USB In the Timing Settings Select 1 Sample (On Demand).
39 35 NI USB The next step is to select the Signal Input Range. A common signal is 0-5V. You may also rename the name of the channel (right- click on the name):
40 36 NI USB You are now finished with the configuration. Click OK in the DAQ Assistant window The DAQ Assistant icon appears on the Block Diagram:
41 37 NI USB Example: Wire the data output to a numeric indicator like this (and hit the Run button): Then numeric indicator will show, e.g., the following value: [End of Example] Example: If you want a continuous acquisition, put a While loop around the DAQ Assistant like this: We can also communicate with the DAQ device without using the DAQ Assistant:
42 38 NI USB For more advanced applications this approach is recommended. [End of Example] Analog Output Analog Output is similar.
43 39 NI USB- 6008
44 40 NI USB Example: Or inside a loop for continuous writing to the DAQ device: However you should not use the DAQ Assistant inside a loop because of the lack of performance. The following is therefore better:
45 41 NI USB In this example we have used some of the other Vis in the DAQmx paletter as well. The Front Panel may loook like this. In this example we assume that we connect wires for Analog Out and Analog In together like this (a socalled loopback test):
46 42 NI USB We can also communicate with the DAQ device without using the DAQ Assistant: For more advanced applications this approach is recommended. [End of Example]
47 8 Logging to File In many cases you want to write your data you get from the DAQ device to a text file for later use. In this chapter we will learn how to write to a measurement file in LabVIEW. We will also learn how to read the same file. You can use the Write to Measurement File function on the File I/O palette in LabVIEW for writing data to text files You can save your data in a tab separated text (LVM data file format) or as a binary (TDMS file format) file. If we use the LVM, it is easy to open and view the data in Notepad. 8.1 Writing to Measurement File We will use the Write to Measurement File function in the File I/O palette in LabVIEW for writing data to text files. We will also focus on the LVM data file format, not the TDMS file format which give binary files. 43
48 44 Logging to File When you drag in the Write to Measurement File, a configuration dialog window will automatically pop up. Recommended settings for the Write To Measurement File is as follows: Example: Example of LabVIEW Program that write data to a Measurement File: Front Panel:
49 45 Logging to File In this application we log data from a process based on a manual control signal. Both the input signal u and the output signal (temperature) is saved to a Measurement File. Block Diagram: The LVM file may look something like this:
50 46 Logging to File The first column is the time, the second column is the input signal, and the third column is the output signal. [End of Example] 8.2 Read from Measurement File When you drag in the Read from Measurement File, a configuration dialog window will automatically pop up. Recommended settings for the Read From Measurement File :
51 47 Logging to File Example: Example of LabVIEW Program that read data from a Measurement File: This application reads the data and plots it in 2 different graphs.
52 48 Logging to File Block Diagram: [End of Example]
53 Telemark University College Faculty of Technology Kjølnes Ring 56 N Porsgrunn, Norway Hans- Petter Halvorsen, M.Sc. Telemark University College Faculty of Technology Department of Electrical Engineering, Information Technology and Cybernetics E- mail: Blog: Room: B- 237a
Introduction to Data Acquisition Overview This tutorial is part of the National Instruments Measurement Fundamentals series. Each tutorial in this series, will teach you a specific topic of common measurement
Telemark University College Department of Electrical Engineering, Information Technology and Cybernetics DAQ in MATLAB HANS-PETTER HALVORSEN, 2012.09.11 Faculty of Technology, Postboks 203, Kjølnes ring
Telemark University College Department of Electrical Engineering, Information Technology and Cybernetics Wireless Data Acquisition in HANS-PETTER HALVORSEN, 2011.02.03 LabVIEW Faculty of Technology, Postboks
National Instruments: LabVIEW LabVIEW is a graphical programming language that uses icons instead of lines of text to create applications. In contrast to textbased programming languages, where instructions
NATIONAL INSTRUMENTS The Software is the Instrument Application Note 065 Measuring Temperature withthermistors a Tutorial David Potter Introduction Thermistors are thermally sensitive resistors used in
Siemens and National Instruments Deliver Integrated Automation and Measurement Solutions The Need for Integrated Automation and Measurement Manufacturing lines consist of numerous decoupled systems for
ECONseries Low Cost USB Data Acquisition Modules ECONseries Low Cost USB DAQ The ECONseries is a flexible yet economical series of multifunction data acquisition modules. You choose the number of analog
M E A S U R E M E N T T I P S Volume 9, Number 3 Simplify Data Acquisition with a Built-in LXI Web Server Snapshot: Make temperature measurements quickly and easily There are many applications in which
Digital to Analog Conversion Using Pulse Width Modulation Samer El-Haj-Mahmoud Electronics Engineering Technology Program Texas A&M University Instructor s Portion Summary The purpose of this lab is to
Using Products with LabVIEW * This application note applies to PCI-GPIB-1M, PCI-GPIB-300K, PCM-GPIB, as well as to ISA- and PC104- boards How NI Compatibility Works National Instruments (NI) provides the
Exercise 10: Basic LabVIEW Programming In this exercise we will learn the basic principles in LabVIEW. LabVIEW will be used in later exercises and in the project part, as well in other courses later, so
OpenStax-CNX module: m13035 1 DSP Laboratory: Analog to Digital and Digital to Analog Conversion Erik Luther This work is produced by OpenStax-CNX and licensed under the Creative Commons Attribution License
Control Analog Out, Digital Out, and Pulse Out Exercise 8 Completed front panel and block diagram In this exercise, you will create a program to control the SensorDAQ s analog out terminal (this is pin
SignalPad Data Logging and Analysis Software Overview SignalPad is a data logging and analysis application developed with National Instruments LabVIEW. The configuration-based user interface provides ready-to-run
Three Levels of Data-Logging Software from National Instruments One of the most common data acquisition applications is simply logging acquired data to disk or a database for future analysis. Most National
Objective Cell Phone Vibration Experiment Most cell phones are designed to vibrate. But at what frequency do they vibrate? With an accelerometer, data acquisition and signal analysis the vibration frequency
PH-315 Portland State University Labview VI Example Virtual Filters Written by: Dan Lankow 2014 1. ABSTRAT For this lab, you will be introduced to Labview. You will be implementing a Low Pass, High Pass,
Telemark University College Department of Electrical Engineering, Information Technology and Cybernetics Linear Algebra in LabVIEW HANS-PETTER HALVORSEN, 9. DESEMBER 2009 Faculty of Technology, Postboks
DAQ Getting Started Guide This guide describes how to confirm your NI data acquisition (DAQ) device is operating properly. Install your application and driver software, then your device, using the instructions
NETWORK ENABLED EQUIPMENT MONITOR Remotely Monitor Sensors over the Internet Connect Sensors to the Web to Remotely Monitor Equipment, Processes or Other Applications A Complete, Easy to Deploy, Stand-Alone
Technical Teaching Equipment Computer Controlled Generating Stations Control and Regulation Simulator, with SCADA SCE EDIBON SCADA System Teaching Technique used 4 5 2 Data Acquisition Board Cables and
Getting Started with the LabVIEW Mobile Module Version 2009 Contents The LabVIEW Mobile Module extends the LabVIEW graphical development environment to Mobile devices so you can create applications that
Spring 11 Lab 4 - Data Acquisition Lab 4-1 Lab 4 - Data Acquisition Format This lab will be conducted during your regularly scheduled lab time in a group format. Each student is responsible for learning
Introduction EET 310 Programming Tools LabVIEW Part 1 (LabVIEW Environment) LabVIEW (short for Laboratory Virtual Instrumentation Engineering Workbench) is a graphical programming environment from National
Accurate Measurement of the Mains Electricity Frequency Dogan Ibrahim Near East University, Faculty of Engineering, Lefkosa, TRNC firstname.lastname@example.org Abstract The frequency of the mains electricity supply
Telemark University College Department of Electrical Engineering, Information Technology and Cybernetics OPC and Real-Time Systems in LabVIEW HANS-PETTER HALVORSEN, 2012.01.11 Faculty of Technology, Postboks
Distance-Learning Remote Laboratories using LabVIEW Introduction Laboratories, which are found in all engineering and science programs, are an essential part of the education experience. Not only do laboratories
Getting Started with the LabVIEW Mobile Module Contents The LabVIEW Mobile Module extends the LabVIEW graphical development environment to Mobile devices so you can create applications that run on Windows
Telemark University College Department of Electrical Engineering, Information Technology and Cybernetics SCADA, OPC and Database Systems HANS-PETTER HALVORSEN, 2012.08.20 Faculty of Technology, Postboks
Tablets in Data Acquisition Introduction In the drive to smaller and smaller data acquisition systems, tablet computers bring a great appeal. Desktop personal computers gave engineers the power to create
Evaluation Board for Universal Frequency-to- Digital Converters UFDC-1 and UFDC-1M-16 EVAL-UFDC-1/UFDC-1M-16 FEATURES Full-Featured Evaluation Board for the Universal Frequency-to-Digital Converters UFDC-1
FAST Fourier Transform (FFT) and Digital Filtering Using LabVIEW Wei Lin Department of Biomedical Engineering Stony Brook University Instructor s Portion Summary This experiment requires the student to
EBERSPÄCHER ELECTRONICS automotive bus systems solutions for network analysis DRIVING THE MOBILITY OF TOMORROW 2 AUTOmotive bus systems System Overview Analyzing Networks in all Development Phases Control
Høgskolen i Telemark Telemark University College Department of Electrical Engineering, Information Technology and Cybernetics Introduction to Virtualization Hans- Petter Halvorsen, 2013.11.27 Faculty of
Application Note 133 Eight Ways to Increase GPIB System Performance Amar Patel Introduction When building an automated measurement system, you can never have too much performance. Increasing performance
Servo Motors (SensorDAQ only) Project 7 Servos are small, relatively inexpensive motors known for their ability to provide a large torque or turning force. They draw current proportional to the mechanical
Intelligent Home Monitoring System Chetana Sarode, Prof.Mr.H.S.Thakar Department of Electronics &telecommunication, SKNCOE Department of Electronics &telecommunication, SKNCOE ABSTRACT Intelligent home
LabVIEW Day 1 Basics Vern Lindberg LabVIEW first shipped in 1986, with very basic objects in place. As it has grown (currently to Version 10.0) higher level objects such as Express VIs have entered, additional
Telemark University College Department of Electrical Engineering, Information Technology and Cybernetics Hardware-in-the-Loop Simulation Introduction What is Hardware-in-the-Loop (HIL) Simulation or What
Transmitter Interface Program Operational Manual Version 3.0.4 1 Overview The transmitter interface software allows you to adjust configuration settings of your Max solid state transmitters. The following
Introduction to Outline Definitions about Labview Main features and advantages Environment G Language principal components Labview in a measurement scenario What is LabVIEW? LabVIEW alias LABoratory Virtual
Telemark University College Department of Electrical Engineering, Information Technology and Cybernetics Control and Simulation HANS-PETTER HALVORSEN, 2011.08.12 in LabVIEW Faculty of Technology, Postboks
EasyC Programming Tips PART 1: EASYC PROGRAMMING ENVIRONMENT The EasyC package is an integrated development environment for creating C Programs and loading them to run on the Vex Control System. Its Opening
Medical Device Design: Shorten Prototype and Deployment Time with NI Tools NI Technical Symposium 2008 FDA Development Cycle From Total Product Life Cycle by David W. Fiegal, M.D., M.P.H. FDA CDRH Amazon.com
USE OF VIRTUAL INSTRUMENTS IN RADIO AND ATMOSPHERIC EXPERIMENTS P.N. VIJAYAKUMAR, THOMAS JOHN AND S.C. GARG RADIO AND ATMOSPHERIC SCIENCE DIVISION, NATIONAL PHYSICAL LABORATORY, NEW DELHI 110012, INDIA
Annexure - I Technical Training Module ( 30 Days) Section 1 : Programmable Logic Controller (PLC) 1. Introduction to Programmable Logic Controller - A Brief History, Need and advantages of PLC, PLC configuration,
FYS3240 PC-based instrumentation and microcontrollers LabVIEW Real-Time and Embedded Spring 2011 Lecture #10 Bekkeng, 11.5.2011 Embedded Computing An embedded system is a computer system designed to perform
E.d.a.s.VX Data acquisition on board road and track vehicles The E.d.a.s.VX System is designed for portable applications running on 12 Volts DC, and is capable of measuring at selectable rates up to 30,000,000
LabVIEW DSP Test Integration Toolkit for TI DSP Contents The LabVIEW DSP Test Integration Toolkit for TI DSP gives you the ability to use LabVIEW and the TI Code Composer Studio (CCS) Integrated Development
ELET 3156 DL - Laboratory #6 Conversion Between Analog and Digital Signals There is no pre-lab work required for this experiment. However, be sure to read through the assignment completely prior to starting
14.1 bs^ir^qfkd=obcib`qflk= Ñçê=emI=rkfuI=~åÇ=léÉåsjp=eçëíë bî~äì~íáåö=oéñäéåíáçå=ñçê=emi=rkfui=~åç=lééåsjp=eçëíë This guide walks you quickly through key Reflection features. It covers: Getting Connected
Quick Start Using DASYLab with your Measurement Computing USB device Thank you for purchasing a USB data acquisition device from Measurement Computing Corporation (MCC). This Quick Start document contains
DATA ACQUISITION FROM IN VITRO TESTING OF AN OCCLUDING MEDICAL DEVICE Florentina ENE 1, Carine GACHON 2, Nicolae IONESCU 3 ABSTRACT: This paper presents a technique for in vitro testing of an occluding
17 Data Storage & Downloading The SFM does not store data on internal memory. Data is stored on Non-Volatile storage: MicroSD cards. Data can be downloaded via USB Cable, wireless Radio Frequency (RF),
Fall 2009 Lecture 1 Operating Systems: Configuration & Use CIS345 Introduction to Operating Systems Mostafa Z. Ali email@example.com 1-1 Chapter 1 Introduction to Operating Systems An Overview of Microcomputers
SA-9600 Surface Area Software Manual Version 4.0 Introduction The operation and data Presentation of the SA-9600 Surface Area analyzer is performed using a Microsoft Windows based software package. The
Best Practises for LabVIEW FPGA Design Flow 1 Agenda Overall Application Design Flow Host, Real-Time and FPGA LabVIEW FPGA Architecture Development FPGA Design Flow Common FPGA Architectures Testing and
Basics of Simulation Technology (SPICE), Virtual Instrumentation and Implications on Circuit and System Design Patrick Noonan Business Development Manager National Instruments Electronics Workbench Group
Using NI CompactDAQ Controllers When architecting a system with an NI CompactDAQ controller, there are many factors to consider. For example, developing and deploying a Windows-based system is going to
Journal of Instrumentation Technology, 2013, Vol. 1, No. 1, 1-5 Available online at http://pubs.sciepub.com/jit/1/1/1 Science and Education Publishing DOI:10.12691/jit-1-1-1 Importance of Home Alarm System
Bioreactor Process Plant Powered by NI LabVIEW and NI CompactRIO Segment: Industry Country: Singapore Author(s): Sanka Hettiarachchi, Providev Kevin Kho, Technologies Unlimited Products: NI crio-9075 (Integrated
Data Sheet High Power Programmable DC Power Supplies The PVS10005, PVS60085, and PVS60085MR programmable DC power supplies offer clean output power up to 5.1 kw, excellent regulation, and fast transient
Rome 30/05/2007 PRAGMA ENGINEERING Srl Next-Generation ATS (Sistemi ATE di Nuova Generazione) Rome 30/05/2007 Mission & Vision Pragma Engineering supplies design and development services, manufacturing
Data Acquisition System (USB) Measurement & Control. Super-Low Priced. Record and output signals with the USB-AD14f. The USB data acquisition system accomodated in a stable aluminum housing is ideal for
JTAGjet series SIGNUM SYSTEMS CORPORATION USB 2.0 Driver for JTAGjet and ADM51 Installation Instructions COPYRIGHT NOTICE Copyright (c) 2011 by Signum Systems Corporation. All rights are reserved worldwide.
Guest PC for Mac OS X Version 1.6 User Guide Copyright 1996-2005 Lismore Software Systems, Ltd. All rights reserved. Table of Contents About Guest PC... 1 About your Virtual Computer... 1 Creating a Virtual
Using the NI 17xx Smart Camera Direct Drive Lighting Controller Overview The use of proper lighting is often overlooked when designing a machine vision application. More robust and accurate inspections
Connect students to science and technology. With NI mydaq & LabVIEW Hunter Smith K 12 Coordinator More than 30,000 companies Including 90% of Fortune 500 manufacturing companies Stay ahead of the class.
Lab 5 Digital I/O Digital electronics is the heart and soul of modern computers. The ability to set and read digital lines is essential to digital circuit diagnostics. Figure 5.0. Four bit Digital Counter
MICROGATE SERIAL COMMUNICATIONS RUN TIME KIT WINDOWS GUIDE MicroGate Systems, Ltd http://www.microgate.com MicroGate and SyncLink are registered trademarks of MicroGate Systems, Ltd. Copyright 2012-2016
1 Instrumentação Suportada em Computadores Pessoais PC-Based Instrumentation A. Lopes Ribeiro firstname.lastname@example.org 2 Objectives To give the students the ability to design and implement automated data acquisition
g.tec medical engineering GmbH Sierningstrasse 14, A-4521 Schiedlberg Austria - Europe Tel.: (43)-7251-22240-0 Fax: (43)-7251-22240-39 email@example.com, http://www.gtec.at Building a Simulink model for real-time
LESSON 13 Managing Devices OBJECTIVES After completing this lesson, you will be able to: 1. Open System Properties. 2. Use Device Manager. 3. Understand hardware profiles. 4. Set performance options. Estimated
Implementing PID Temperature Control Using LabVIEW Carlton Prewit, Rafic Bachnak Department of Computing and Mathematical Sciences Texas A&M University Corpus Christi Session XXXX Abstract Feedback control
Utilizing the Latest Technologies in Data Acquisition Agenda Computer Based DAQ Fundamentals Utilizing New Technologies 2 PC-Based Data Acquisition (DAQ) Transducer Signal Signal Conditioning DAQ Software
CHAPTER 11: Flip Flops In this chapter, you will be building the part of the circuit that controls the command sequencing. The required circuit must operate the counter and the memory chip. When the teach
VIRTUAL INSTRUMENTATION João Paiva dos Santos firstname.lastname@example.org Lab SPEPSI Instituto Politécnico de Beja Beja, 15th May, 2014 Overview What and why Hardware Software Some standards Remote use Example
Overview Out-of-the-Box Spreadsheet-Style Setup, Data Acquisition, & Display Software Features Included with all Daq Series and Personal Daq/000 Series products from IOtech Spreadsheet-style channel configuration
Data acquisition system (USB) Measurement & Control. Extremely powerful. Precisely record and output signals with the USB-AD16f: The high-performance USB data acquisition system accomodated in a stable
Operating Systems and Windows What is an Operating System? The most important program that runs on your computer. It manages all other programs on the machine. Every PC has to have one to run other applications
1.3 Expand ANSI C and.net Development with Express Technology Bridging Validation and Test with Common Software Technology 47 Interactive versus Automated Measurements/Tests Interactive Measurements Benchtop
DT-CONFIG SOFTWARE Config software for D2 systems USER S MANUAL CONTENTS 1. Introductions ------------------------------------------------------------------- 3 2. System Requirement and Connection ----------------------------------------
SUDT AccessPort TM Advanced Terminal / Monitor / Debugger Version 1.37 User Manual Version 1.0 - January 20, 2015 CHANGE HISTORY Version Date Description of Changes 1.0 January 20, 2015 Initial Publication
NI Platform for automotive measurement and test applications Simulation Rapid Control Prototyping Design Validation In-Vehicle Acquisition Hardware in the Loop Manufacturing Test Christoph Wimmer ASM Stuttgart
DATENBLATT USB-DIO32HS HABEN SIE FRAGEN ODER WÜNSCHEN SIE EIN INDIVIDUELLES ANGEBOT? Unser Team berät Sie gerne persönlich. TELEFON + 49 (0) 81 41/36 97-0 TELEFAX + 49 (0) 81 41/36 97-30 E-MAIL email@example.com
I2C PRESSURE MONITORING THROUGH USB PROTOCOL. Product Details: To eradicate human error while taking readings such as upper precision or lower precision Embedded with JAVA Application: Technology Used:
Setting up a Local Interconnect Network (LIN) using dspace MicroAutoBox 1401/1501 Simulink Blocks Guiseppe Ferro Design Team 4 3/22/13 Executive Summary Learn how to setup and properly use the Real- Time