LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous generation of waveform

Hi all ,

 

I am trying to generate the continuous sine wave from the analog output of the DAQ card. I want to change the amplitude of the sine wave during run time but i am not completely successful in doing this.
Moreover,  my block diagram has three main parts

 

1) Initialization portion
2) Sinewave generation portion
3) termination portion

 

These three portions are in the while loop, due to some time taken initialization portion and termination portion , the response in the oscilloscope is like


 ...... straight line ... sinewave..... straight line..... sinewave..... straight line .... and so on.

 

How can i generate the sine wave continuosly such that whenever i change the amplitude , it should change smoothly without any distortion. I am stuck, plz reply.

 

Any help will be greatly appreciated.

0 Kudos
Message 1 of 16
(4,400 Views)

Look at the shipping exam[le called Cont Gen Voltage Wfm-Int Clk-Non Regeneration where the waveform typte, amplitude, and frequency are all settable.

Message 2 of 16
(4,390 Views)

I use labview 8.2 and I cant find this example in the NI Example finder ,Plz tell me  its location or directory.

0 Kudos
Message 3 of 16
(4,384 Views)

Hardware Input and Output>DAQmx>Analog Generation.

0 Kudos
Message 4 of 16
(4,381 Views)

In my version of labview "Analog generation" is not present.

 

Please tell me the simple logic of doing this . The amplitude control is in the Inintialization portion.

0 Kudos
Message 5 of 16
(4,373 Views)

Nevermind. Found out you are not using an NI DAQ card. Ihave no idea how your cardbworks and you have not even posted your code.

0 Kudos
Message 6 of 16
(4,368 Views)

 

I am using advantech PCI card and the code is also attached. Please read the problem in the First message.

and also convert this VI in labview v8.2

 

Thanks for your help  in advance.

0 Kudos
Message 7 of 16
(4,341 Views)

 

 

Please anyone reply. I am stuck.

0 Kudos
Message 8 of 16
(4,325 Views)

Most of us here are familiar with NI cards.  I don't know a thing about your card so I can't say much.  Your subvi's are missing, which makes it even harder for me or anyone to give you advice.  But I can say this.  Usually you will use some subvi to setup the card parameters, like timing, triggering, frequency, amplitude, etc.  If you want to change the frequency on the fly, you need to use the subvi that handles this function.  First you must stop the session (or task), reconfigure the parameter (frequency), then start the task again.  You have what looks like subvi's to setup the card inside the loop.  You only have to put the one that sets the parameter you want to change (frequency) inside the loop.  No need to set amplitude and triggering, and everything else over and over again.

 

To change the frequency on the fly, you should use an event structure.  Create a numeric control called Frequency.  Create a Frequency Value Change event.  Inside the event, stop the task, reconfigure the frequency, start the task again.  Then you could add a Stop button and create an event case for it.  Inside the stop event, stop the task and do whatever clean up is necessary (turining off power, etc).  Send a boolean to stop the loop from the Stop event.

 

- tbob

Inventor of the WORM Global
Message 9 of 16
(4,262 Views)

 

Hi tbob

 

Thanks for the reply, for viewing the VI completely , plz install Advantech PCI-1712 driver. Since i am a labview novice, therefore i am facing this problem. Attached are the some of the VIs which contains case structure and events that i have tried but they are not working properly. How to eliminate the delay in between sine waves thats what i want to do.  Plz look into the following VIs and tell me my mistake . Thanks

Download All
0 Kudos
Message 10 of 16
(4,251 Views)