Example Code

Synchronize Measurements With cDAQ Strain Gauge Module

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Hardware

  • Data Acquisition (DAQ)

    Software

  • LabVIEW

    Driver

  • NI DAQmx

Code and Documents

Attachment

Overview

This example achieves that Synchronizing measurements of different types (strain, temperature, voltage) can be done by creating a single task that uses a common sample clock.

Description

This VI performs acquires strain measurements and temperature measurements on different physical channels. The Sample Clock Rate is set for the Strain Gage measurement, DAQmx 8.5 sets the Sample Clock Rate appropriately for the Thermocouple measurement.

 

Requirements

Software

  • LabVIEW 2012 or compatible
  • NI-DAQmx 9.5.5 or compatible

Hardware

  • NI Multifunction DAQ Device

 

Steps to Implement or Execute Code

  1. Configure Timing for Sample Clock. The Sampling Rate and Sample Clock Source must be configured.

  2.  

    Configure the Strain Gage Module (Channel, Gage and Bridge) Parameters.

  3.  

    Enter the list of physical channels for the thermocouple measurement.

  4.  

    Make sure all strain gages are in their relaxed state.

  5.  

    Run the VI and do not start straining the gages until data starts being plotted.

 

Additional Information or References

 

Block Diagram Steps:

1. Create a Strain input task for your strain channels.

2. Create a Thermocouple input task for your thermocouple channels.

3. Set timing parameters. Note that sample mode set to Continuous Samples.

4. Select the Sample Clock source

5. Start the acquisitions

6. Read the Waveform data in a loop until the user hits the stop button or an error occurs.

7. Call the Clear Task VI to clear the Task. Use the popup dialog box to display an error if any. IV. I/O Connections Overview: Make sure your signal input terminal matches the Physical Channel I/O control.

 

cDAQ example.PNG

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

 

 

Product Support Engineer
National Instruments

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.