LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Acquisition not constant (total number of samples changing every loop) - NI USB 6003 DAQ

Hi everyone,

I am a Masters Student working in the field of Mechanical Engineering a beginner. I am a beginner in LabVIEW and NI DAQ systems.

I am stuck with a problem where my USB 6003 DAQ is not collecting constant number of Samples every time. I have a nested loop configuration in my VI. Once the outer loop condition is satisfied, the inner loop activates. The condition to switch between loops is a digital input (trigger) from arduino. Once the pins from arduino goes HIGH, the USB 6003 gets the digital signal which makes the inner loop active. 

In to parallel to the triggering is the starting of a stepper motor. So the purpose is that as soon as the stepper motor starts, the Data acquisition begins which is happening inside the inner loop. 

What's inside the inner loop is the analog signal from the equipment connected. I am actually doing NDT scanning of discs and the sequence goes like this:

1. As soon as the motor start rotating the disc (and the trigger pins from arduino goes HIGH), the scanning begins and Data acquisitions starts.

2. Once a revolution is complete, the data acquisition stops (and the trigger pins from arduino goes LOW) and radial increment is performed.

3. Again, the motor start rotating and data acquisition starts too.

 

What I have observed is a small lag between the VI to switch from outer to inner loop. The motor starts rotating but the VI still takes a fraction of second to start the inner loop. 

 

I am trying hard to solve the issue but it seems that there is some unknown which I do not understand. I have shared the pictures of my circuit and shared the VI and arduino file for help. Will extremely appreciate if someone can solve my issue.

 

Best Regards,

0 Kudos
Message 1 of 3
(167 Views)

Not all forum users have the latest LabVIEW version. Please save your VI to an earlier version (File >> Save For Previous Version), preferably 2019.

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
0 Kudos
Message 2 of 3
(139 Views)

THe short delay you are observing could be caused by windows, in reading the trigger signal and starting the dat acquisition. 


I'm not sure how you programmed the code (my LV version is 2020) but you can try use a hardware trigger on USB6003 (from the spec, the trigger can be done by PFI0 or PFI1, if you wire the trigger signal to these terminals and program the code to use as trigger, then the data acquisition will start regardless of windows. 

LVNinja_0-1747925293894.png

 

0 Kudos
Message 3 of 3
(125 Views)