LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Collection Synchronization

To whom it may concern,

 

I am new to Labview so please be patient.

 

My goal in my experiment to take pictures and collect force data at the same time so that they can be lined up.

 

Here is all of my equipment:

DAQ USBX-6341 board.

Cameras (plugged into digital p0.0 channel/port)

Force Sensor (plugged into analog channel/port 1)

Test Machine (plugged into COM5)

 

Currently, I have a code that  has an analog input that syncs up with the start of a digital output just on the rising edge. The analog input is used as a trigger for the digital output and both are on the same clock. From what I have been told/read, this should synchronize the devices.

 

Today, I ran some tests with my test machine that strains a material. I entered in all the necessary parameters and then ran the test.  The trigger system worked effectively and the cameras started collecting data once I pressed run.

 

Unfortunately, there was a delay between the force sensor and the cameras.

 

For example, at frame 1100, the cameras showed that the specimen had not been strained. Meanwhile, at force sample 1100, the force sensor was near its peak value. This means that the force sensor starts collecting data BEFORE the camera gets the signal. This means the force sensor and cameras are not synchronized.

 

Do you have any idea why this would be? Is it because we are triggering the cameras off of the force sensor? Is there a way to make this delay more reliable?

 

Would using a digital pulse within labview be a potential solution?

 

I also have a digital pulse generator in my lab that I could use so that the force sensor data and the camera each took a picture at the same time as a pulse was sent out, rather than simply starting off the same trigger.

 

Any ideas?

 

I have attached my code to look at.

 

Thanks

 

Gcass

 

0 Kudos
Message 1 of 2
(2,098 Views)

Hi gcass,

 

It looks like your code is off to a good start, but some of the key synchronization features of multi-function synched VIs are missing (DAQmx Timing VIs should typically appear on both tasks). This might be why you are experiencing delays between your tasks. To properly synch two tasks (or multiple devices) there are several resources that I would suggest checking out:

 

Synchronizing USB Data Acquisition - From One Device to Multiple Systems

 

Synchronizing DSA, S Series, and X Series Devices With a Single NI-DAQmx Task

 

Furthermore, check out a few examples in the NI Example Finder under the category Hardware Input and Output >> DAQmx >> Synchronization. There are examples for Multi-Device or Multi-Function systems, you may need to borrow ideas from both. Hope that helps.

 

Tim W.

Applications Engineering

National Instruments

http://www.ni.com/support 

 

 

0 Kudos
Message 2 of 2
(2,062 Views)