LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Configuring SI Read to read for fixed duration?

Hi,

Is there a way to configure Sound Input Read so that it reads data from the soundcard for a fixed duration of time? For example, if I want to record for only 17 milliseconds once a trigger from another VI is given, how should I go about it?

Thanks.
0 Kudos
Message 1 of 7
(3,192 Views)
Hi Keshav,
 
Have you tried using the Acquire Sound express VI?
It has a duration input whish sets the number of seconds for which you want to acquire sound.
 
Hopefully this helps.
Aashish M
CEO
TransferFi
www.transferfi.com
0 Kudos
Message 2 of 7
(3,168 Views)
Thanks Aashish. I have one more question for you, if you don't mind 😃 Is it possible I could use the positive edge of a square wave to trigger the Acquire Sound Express (or the SI Read) VI to start recording data? The Generate Waveform vi could be used to produce the square wave, and I tried the Trigger and Gate function but I'm not sure how to wire it.

Thanks
0 Kudos
Message 3 of 7
(3,156 Views)
Bump. Anyone? All I want to know is if it is possible to trigger data acquisition (from any source, really - whether it's the soundcard or a DAQ) using a square wave generated within LabView?

Basically, the falling edge of the square wave should be the indication to start acquiring. I just can't figure out what vi would do this and how I would wire it.

Any help whatsoever would be greatly appreciated. This is pretty much the only problem I'm facing with my project right now.
0 Kudos
Message 4 of 7
(3,105 Views)

Hey Keshav,

 

You could try creating a case structure with a trigger activating the true command and therefore on a true output of a trigger you'll start acquiring.

 

For a better understanding of triggering, refer to Basic Level Triggering of Waveforms. This leads you to an example VI called Basic Level Triggering of Waveforms. The example shows how you can trigger a generated waveform in LabVIEW and the data output from the trigger.

 

Hopefully this helps!!

Aashish M
CEO
TransferFi
www.transferfi.com
0 Kudos
Message 5 of 7
(3,100 Views)
Hi Aashish,

Thanks for the link! What I had in mind was something like this - I use the Generate Waveform vi to get a square wave, and I invert it so that the negative edge now becomes ON (logic 1) and positive becomes OFF (logic 0), this is given to one input of an AND gate, the other input being constant 1. The output of this AND gate should be the indication to start acquiring, if its 1 it records and if 0 then not.

If there was something like a transistor in which I gave the signal to be recorded as the input, and the output of the AND gate as the Vcc, then it would pass the signal only when Vcc is being given, basically when the negative edge of the original square wave falls. I just can't seem to find a function within Labview that would do this.

I know I'm not being very clear but I hope you get what my problem is! I've gone through the example but it still doesn't address what I'm facing.

If you could give me any more suggestions I'd be grateful.

Thanks in advance!
Keshav

0 Kudos
Message 6 of 7
(3,087 Views)

Hey Keshav,

Are you trying to clip your main acquisition signal?
If you are, you'd probably want to have a look at the examples presented in the forum post I am trying to emulate the characteristics of germanium transistors using the Y[i]=Clip{X[i]}PtByPt..... I found a few interesting examples there on signal clipping.

But I have a feeling that you are looking into using a simpler triggering method, in which everything can be configured in one VI. Well, we don't do magic, but we do have an Express VI called Trigger and Gate, under Express>Signal Manipulation in the Functions palette. This uses triggering to extract a segment out of a signal.

Hopefully something here helps!!

Aashish M
CEO
TransferFi
www.transferfi.com
0 Kudos
Message 7 of 7
(3,064 Views)