Example Code

Synchronize Analog Input on Multiple USB Devices Using LabVIEW with DAQmx

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 shows you how to synchronize AI for multiple USB devices.

 
Description
This example shows you how to synchronize AI for multiple USB devices. You need to create an analog input voltage channel for both the Master and Slave devices. Then set timing parameters.  Note that sample mode set to Continuous Samples.  In this example, the Rate must be the same for both devices since we are sharing the sample clock.

 

Requirements

Software:

  1. LabVIEW 2012 (or compatible)
  2. NI-DAQmx


Steps to Implement or Execute Code

  1. Specify your USB devices that you want to synchronize.
  2. Run the application.

 

Additional Information or References

VI Snippet

00.png

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

With warm regards,

David D.

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

Comments
kusg
Member
Member
on

Thanks for the tutorial on how to setup multi-device usb synchronization. It would be great if the example code is also available in DAQmx ANSI C.

vinayakakhil
Member
Member
on

I have an issue regarding synchronizing  two USB 6210 data acquisition cards. From one DAQ I am acquiring 3 phase voltage data using  3 analog (ai0,ai1,ai2) channels and another 6210 used to acquire 3 phase current data  (ai0,ai1,ai2). Sample rate of each channel is 80k . So my aim is to synchronize the ai0 of usb1 and ai0 usb2 so that the data acquisition is happening simultaneously . This is applicable for ai1 and ai2 of two usb devices. I have seen your model and try to run the model. it is showing the massage

 

Error -89136 occurred at DAQmx Start Task.vi:7220002

 

Possible reason(s):

Specified route cannot be satisfied, because the hardware does not support it.

Property: SampClk.OutputTerm
Destination Device: Dev1
Destination Terminal: PFI0

Task Name: _unnamedTask<CA10>

 

Kindly help me sort out this issue

 

Juld23
Member
Member
on

I am a beginner in LabVIEW programming,

I am in project of end  study, I am mounting a test bench for the measurement of temperature (thermocouple type K), voltage and position. this acquisition must continue. The position I will use the displacement sensor of Keyence LK-G3000 series (Laser sensor).

To begin I tried to make a small Vi of temperature but I am confronted by several problem.

Can someone direct me on how I will proceed to enlighten me the way. That is to say how I can take me.