LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Analog Output Generator

Hello everybody,

 

I have a problem when I try to to build a signal generator on Labview. I would like to add a switch to turn on and turn off the generator.

 

 

I include the code of what I did.

 

d1.png

Thank you very much for your help.

0 Kudos
Message 1 of 2
(2,520 Views)

Hi !

 

A simple way of doing what you want would be to start from this example from LabVIEW Example Finder:

In LabVIEW, Help>LabVIEW Example Finder>Hardware Input & output>DAQmx>Analog ouput>Voltage (non-regeneration) Continous Output.vi

 

Then, in the while loop, instead of always sending a signal, you could use a Case Structure bounded to a Boolean Control on the Front Panel, lets name it Generation On?:

-If Generaion On? == True, then in that case, you put your code generating your signal.

-If Generation On? == False, then just send bunches of 0s !.

 

It will do the trick.

 

Another way that I would recommand if you have time to play, is to use a Simple State Machine.

Let me know if it fits your need.

 

Regards

 

Victor F. | Systems Engineer
Certified LabVIEW Developer | Certified TestStand Architect
National Instruments Budapest

0 Kudos
Message 2 of 2
(2,451 Views)