LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to terminate waveform generation at zero value: analog generation

Hallo,

 

I am kind of stuck in a situation. 

 

<this is done> I want to generate a waveform with increasing frequency and measure while generating. 

<this is done> I want to save the data files.

 

<problem description> I see that everytime when the measurements are done I stop the waveform generation. But it stops at current location which can be any location in the waveform. For ex see the attached VI. (this is focuses the simplest version of the VI)

 

 <problem> everytime last wave stops somewhere in between and new wave starts at zero. So I have a jump in generation which spoils my measurement. I thought of putting it zero after the task is done. This works though I am not happy.. as still it gives me a jump in analog generation. Which sometime is problematic for the speaker connected. 

 

 

is there any other solution for this? Or how to know what is the current voltage at the analog output without measuring it? If I know the voltage I can bring it smoothly to zero (linear interpolation between the value and zero).

 

Can anybody help me in this?

0 Kudos
Message 1 of 6
(2,828 Views)

You say you stop the waveform generation when the measurement is done. Why not add some logic that only stops waveform generation when the measurement is done AND the waveform is at zero (or crosses zero)?

0 Kudos
Message 2 of 6
(2,824 Views)

Do a google search for swept sine labview. This should get you started. Select the example that fit you best. And post it for more help if needed



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 3 of 6
(2,816 Views)

Thnk you for quick replies..

 

I do not want to make a contineous swept sinus .. though the code look like that.. I need to generated them seperately at descrete frequencies. So an example pf swept sinus (which i googled so far) wont work though i can use them for something else ;).

 

Please give ideas about how to stop a sin waveform at zero crossing. !!

0 Kudos
Message 4 of 6
(2,800 Views)

Best is to create the waveform to be a integer number of complete cycles then send that to the Analog Out.  Use the Waveform Generation VIs from the Signal Processing palette. You will have a different number of samples for each frequency.

 

Lynn

0 Kudos
Message 5 of 6
(2,795 Views)

@ Lynn

Thank you for response. 

 

I am doing the same.. i generate single wave with 200 sample in it (see example file in first post) and then this wave contineously sent to the AO-0 (See example again). Now i need to measure the response for certain time. This certain time is determined by the measuring module so i do not know a priori when it will be done. Until the measurement is done the generation will be contineous and will terminate as soon as the measurements are finished. that means i do not have a module before terminating to look for when the generated sine will be at zero.

 

If i could determine this i can bring it down 'smoothly' to zero.

 

Any further help? 

0 Kudos
Message 6 of 6
(2,777 Views)