LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Obtaining a Time of Flight in a Non-Destructive Testing Application

Hello friends,

 

I'm working on a research project with LabVIEW 2018, an NI USB-4431, and some transducers. The idea is that an actuating pulse excitation is converted to a mechanical wave at one transducer. This wave will attenuate through a solid medium and be sensed at another transducer some time later. There, the wave gets converted back to an electric signal and picked up by the DAQ. So naturally, there will be a time delay between the generated signal at the actuator and the response signal at the sensor, albeit a small one. However, my results usually show both the actuated and sensed signals recorded by the DAQ at the exact same time:

Seaweed_1-1634141214443.png

It may be difficult to see the sensed signal (green), but if you squint you will notice it peaks at the same time the actuating signal (white) does. Here it is again but zoomed in:

Seaweed_2-1634141562953.png

I checked the sample indices to verify. So I believe the problem to be misalignment of analog input and output clocks.

 

I did some reading into the literature and discovered a block diagram setup for simultaneous actuating and sensing with aligned clocks. 

 

Seaweed_0-1634139719272.png

The problem I'm having now is that Dev1/ao/SampleClock is not in the drop-down for my analog input sampling clock. Instead I'm getting Dev1/ao/StartTrigger, along with a number of other options. When I try to run the program with Dev1/ao/StartTrigger selected, I get no response and this error message (-200077):

 

DAQmx Timing (Sample Clock).vi:4730003<append>
<B>Property: </B>SampClk.Src
<B>Requested Value: </B>/Dev1/ao/StartTrigger
<B>Possible Values: </B>empty string, OnboardClock

<B>Task Name: </B>_unnamedTask<337>

 

My question is given my circumstance, how do I align the clocks so that I can observe a time of flight between the actuation and sensing signals? The VI is attached. 

 

Thanks in advance for any and all help!

0 Kudos
Message 1 of 5
(1,244 Views)

Your device does simultaneous sampling, so a simpler option will be to acquire both the excitation and response signals on 2 AI channels in the same task.  It'll help you avoid tricky details about the output-side and input-side filter delays inherent to Delta-Sigma based converters.  And then you also won't really have to sync up with the AO task b/c the AI data is sync'ed inherently.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 2 of 5
(1,240 Views)

Are you suggesting that I select multiple input channels in the front panel when I use the drop-down? Because that's what I have been doing; sorry I probably should've attached a screenshot of my front panel. Here it is:

Seaweed_0-1634147105285.png

Or are you suggesting that I wire two separate AI blocks in the block diagram to the same graph output rather than one AI block and one AO block?

 

0 Kudos
Message 3 of 5
(1,221 Views)

So is your plot on the screen (the green and white) two input signals? If so, then they're already sharing a clock, and it's probably electrical noise or something in your system. If you're plotting the AO signal with the AI signal, then clock shift could be an issue.

 

Kevin's thought was to just use pure AI instead of using any AO to do your timing. If you jump a wire from your output to another AI then you can sample both of them and not have to worry about any clock sharing. Plus you could then use any other signal generator without modifying your program.

 

But to answer your question- right click the Timing source dropdown, select "IO Name Filtering", then check the box for "Include Advanced Terminals". SampleClock should then show up in the list.

0 Kudos
Message 4 of 5
(1,215 Views)

Depending on your signal conditioning ... are you shure that the grenn signal is comming from your sensor?  How does it look like, if you don't mount the sensor? 

I just asked myself if that green signal is crosstalk?

 

and the green signal arives prior than the exitation signal ...  filter artifacts?

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 5 of 5
(1,175 Views)