[Estimated Time: 15 Minutes]
Many examples are shipped with LabVIEW to serve as reference or starting points for sensor data acquisition applications. These examples are free to use and install automatically with the NI-DAQmx driver.
NI-DAQmx includes more than 30 built-in channel types that you can use to customize the scaling of the signal. This eliminates the need to convert from a voltage or current to an engineering unit such as [g] or [Pa] separately because it is built in to the acquisition process.
Figure 4. DAQmx Analog Input Channel Types
Within the LabVIEW environment, navigate to Help»Find Examples to open the NI Example Finder. Then browse by Task to Hardware Input and Output»DAQmx»Analog Input to find 15 new shipping examples; these programs are compatible with USB, PCI, PCI Express, PXI, and PXI Express DAQ as well as USB, Ethernet, and WiFi NI CompactDAQ platforms.
Force, pressure, torque, current, voltage, sound pressure, resistance, accelerometer, RTD, and thermistor are just a few of the different sensor types supported by these examples.
Figure 5. LabVIEW Front Panel of NI-DAQmx Shipping Example
The LabVIEW Front Panel (Figure 5) in these shipping examples are preconfigured to save you time as you begin your application. Use the controls (inputs) to set up the acquisition parameters and data-logging settings and to view a graph to visualize the data.
On the LabVIEW Block Diagram (Figure 6), the code is properly organized and documented so you can understand the functionality and add in analysis if required.
Figure 6. LabVIEW Block Diagram of NI-DAQmx Shipping Example
You can find examples for text-based programming by navigating to Start»All Programs»National Instruments»NI-DAQ»Text-Based Code Support.
For more advanced LabVIEW programs, reference LabVIEW Templates. These templates help guide you to write programs using the best practices of LabVIEW Architects around the world.